/* ========================================
   BLOXXY - Bestellformular Modal Styling
   ======================================== */

/* Modal Overlay */
.order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease-out;
}

.order-modal.active {
    display: block;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Backdrop */
.order-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* Modal Container */
.order-modal-container {
    position: relative;
    max-width: 1000px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Scrollbar Styling für bessere Optik */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Webkit Scrollbar Styling (Chrome, Safari, Edge) */
.order-modal-container::-webkit-scrollbar {
    width: 8px;
}

.order-modal-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 24px 0;
}

.order-modal-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.order-modal-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button - Fixiert oben rechts */
.order-modal-close {
    position: sticky;
    top: 20px;
    right: 20px;
    float: right;
    margin: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.08);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-modal-close:hover {
    background: white;
    border-color: var(--primary-color);
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.order-modal-close i {
    font-size: 18px;
    color: var(--text-primary);
}

/* Modal Header */
.modal-header {
    text-align: center;
    padding: 20px 40px 30px;
    border-bottom: 1px solid var(--border-color);
    clear: both;
}

.modal-header-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 24px rgba(255, 138, 60, 0.3);
}

.modal-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Lizenz-Auswahl */
.license-selection {
    padding: 0 0 40px 0;
}

.testlizenz-highlight {
    padding: 20px 40px 0;
}

.license-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px;
}

.license-card {
    background: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.license-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.license-card-popular {
    border-color: var(--primary-color);
    border-width: 3px;
    background: rgba(255, 138, 60, 0.03);
}

.license-card-test {
    border-color: var(--success-color);
    border-width: 3px;
    background: rgba(16, 185, 129, 0.03);
}

.license-card-test:hover {
    border-color: var(--success-color);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
}

.license-card-test .license-select-btn:hover {
    background: #059669;
}

.license-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.license-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary-color);
}

.license-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.license-price {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 24px;
    line-height: 1;
}

.license-price small {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.license-features {
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
    text-align: left;
}

.license-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.license-features i {
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.license-select-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.license-select-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 138, 60, 0.3);
}

/* Bestellformular View */
.order-form-view {
    padding: 0 0 40px 0;
}

.back-to-selection {
    display: none;
}

/* Order Info Box */
.order-info-box {
    background: #FFF7ED;
    border: 1px solid rgba(255, 138, 60, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 0 40px 30px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.order-info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 20px;
}

.order-info-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.order-info-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Order Form Styling */
.order-form {
    padding: 0 40px;
}

.order-form h3 {
    font-size: 20px;
    margin: 30px 0 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-form h3 i {
    color: var(--primary-color);
}

.form-section-help {
    font-size: 13px;
    color: var(--text-secondary);
    margin: -10px 0 20px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-section-help i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: var(--danger-color);
    margin-left: 4px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 138, 60, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-help {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-checkbox label {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
}

.form-checkbox a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.form-checkbox a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(255, 138, 60, 0.25);
    margin-top: 24px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 60, 0.35);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-footer-text {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Success View */
.order-success-view {
    padding: 60px 40px;
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 48px;
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.success-message {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.success-btn {
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.success-btn-primary {
    background: var(--primary-color);
    color: white;
}

.success-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 60, 0.3);
}

.success-btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.success-btn-secondary:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-modal-container {
        margin: 2vh auto;
        max-height: 96vh;
        border-radius: 20px;
    }
    
    /* Scrollbar auf Mobile komplett verstecken */
    .order-modal-container::-webkit-scrollbar {
        display: none;
    }
    
    .order-modal-container {
        scrollbar-width: none;
    }

    .modal-header {
        padding: 40px 24px 24px;
    }

    .modal-header-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .license-options {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .order-form {
        padding: 0 24px;
    }

    .order-info-box {
        margin: 0 24px 24px;
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .license-price {
        font-size: 36px;
    }

    .order-success-view {
        padding: 40px 24px;
    }

    .success-actions {
        flex-direction: column;
        width: 100%;
    }

    .success-btn {
        width: 100%;
        justify-content: center;
    }
}

