/* ================================================
   ORDER MODAL — Multi-step Order Form
   ================================================ */

/* ========= MODAL OVERLAY ========= */
#order-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    overflow-y: auto;
}

#order-modal.active {
    display: flex;
}

/* ========= MODAL CONTAINER ========= */
.order-container {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: orderSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes orderSlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========= CLOSE BUTTON ========= */
.order-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.order-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: scale(1.1);
}

/* ========= HEADER ========= */
.order-header {
    padding: 32px 32px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.order-header p {
    color: #888;
    font-size: 0.9rem;
}

/* ========= REFERENCE SITE BADGE ========= */
.order-ref-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 32px;
    padding: 10px 16px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
    color: #fbbf24;
    font-size: 0.85rem;
}

.order-ref-badge i {
    font-size: 0.9rem;
    color: #fbbf24;
}

.order-ref-badge strong {
    color: white;
    font-weight: 700;
}

.recap-ref-row .recap-value {
    color: #fbbf24;
    font-weight: 700;
}

/* ========= PROGRESS STEPS ========= */
.order-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 32px 0;
}

.order-step-dot {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #666;
    transition: all 0.3s;
    background: transparent;
}

.step-circle.active {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.step-circle.done {
    border-color: #4ade80;
    color: #111;
    background: #4ade80;
}

.step-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    transition: background 0.3s;
}

.step-line.done {
    background: #4ade80;
}

/* ========= FORM BODY ========= */
.order-body {
    padding: 28px 32px;
}

.order-step-content {
    display: none;
}

.order-step-content.active {
    display: block;
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========= FORMULA SELECTOR ========= */
.formula-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.formula-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.formula-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.formula-card.selected {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.06);
}

.formula-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.formula-card.selected .formula-radio {
    border-color: #fbbf24;
}

.formula-card.selected .formula-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #fbbf24;
    border-radius: 50%;
}

.formula-info {
    flex: 1;
}

.formula-name {
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
}

.formula-desc {
    color: #888;
    font-size: 0.8rem;
    margin-top: 2px;
}

.formula-price {
    font-weight: 800;
    color: #fbbf24;
    font-size: 1rem;
    white-space: nowrap;
}

/* ========= FORM FIELDS ========= */
.order-field {
    margin-bottom: 16px;
}

.order-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.order-field label .required {
    color: #ef4444;
}

.order-field input,
.order-field textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    outline: none;
}

.order-field input:focus,
.order-field textarea:focus {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.03);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

.order-field input::placeholder,
.order-field textarea::placeholder {
    color: #555;
}

.order-field textarea {
    resize: vertical;
    min-height: 100px;
}

.order-field .field-error {
    color: #ef4444;
    font-size: 0.78rem;
    margin-top: 4px;
    display: none;
}

.order-field.has-error input,
.order-field.has-error textarea {
    border-color: #ef4444;
}

.order-field.has-error .field-error {
    display: block;
}

.order-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========= FILE UPLOAD ========= */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 16px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.04);
}

.upload-zone i {
    font-size: 2rem;
    color: #555;
    margin-bottom: 12px;
    display: block;
    transition: color 0.2s;
}

.upload-zone:hover i,
.upload-zone.dragover i {
    color: #fbbf24;
}

.upload-zone p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.upload-zone .upload-hint {
    color: #555;
    font-size: 0.78rem;
}

.upload-zone .upload-btn-text {
    color: #fbbf24;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* File Previews */
.file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #ccc;
    max-width: 200px;
}

.file-preview-item .file-icon {
    color: #fbbf24;
    font-size: 0.9rem;
}

.file-preview-item .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-preview-item .file-remove {
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px;
    transition: transform 0.15s;
}

.file-preview-item .file-remove:hover {
    transform: scale(1.2);
}

.upload-note {
    color: #666;
    font-size: 0.78rem;
    margin-top: 8px;
    text-align: center;
}

/* ========= RECAP (Step 3) ========= */
.order-recap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.recap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recap-row:last-child {
    border-bottom: none;
}

.recap-label {
    color: #888;
    font-size: 0.85rem;
}

.recap-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recap-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid rgba(251, 191, 36, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recap-total .recap-label {
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.recap-total .recap-value {
    color: #fbbf24;
    font-size: 1.4rem;
    font-weight: 800;
}

/* ========= ACTION BUTTONS ========= */
.order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.order-btn-pay {
    background: #fbbf24;
    color: #111;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.order-btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.5);
}

.order-btn-callback {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
}

.order-btn-callback:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.order-btn i {
    font-size: 1.1rem;
}

.order-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========= NAVIGATION (Prev/Next) ========= */
.order-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.order-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Inter', sans-serif;
}

.order-nav-prev {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

.order-nav-prev:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.order-nav-next {
    background: #fbbf24;
    color: #111;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

.order-nav-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.35);
}

.order-nav-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ========= CONFIRMATION ========= */
.order-confirmation {
    text-align: center;
    padding: 40px 32px;
}

.order-confirmation .confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.1);
    border: 2px solid #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: #4ade80;
}

.order-confirmation h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.order-confirmation p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.order-confirmation .confirm-close-btn {
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.order-confirmation .confirm-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ========= STRIPE BADGE ========= */
.stripe-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #888;
    font-size: 0.75rem;
    margin-top: 12px;
}

.stripe-badge i {
    color: #635bff;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 640px) {
    .order-container {
        max-height: 95vh;
        border-radius: 16px;
    }

    .order-header {
        padding: 24px 20px 16px;
    }

    .order-header h2 {
        font-size: 1.3rem;
    }

    .order-steps {
        padding: 16px 20px 0;
    }

    .step-line {
        width: 24px;
    }

    .order-body {
        padding: 20px;
    }

    .order-row {
        grid-template-columns: 1fr;
    }

    .order-nav {
        padding: 16px 20px 20px;
    }

    .formula-card {
        padding: 12px 14px;
    }

    .formula-price {
        font-size: 0.9rem;
    }
}