/*
 * Order Page V3 — Clean, Modern, Professional
 * Redesigned for SMM Fastzone
 */

/* Hide breadcrumb/header */
.page-content:has(.order-page-v3) nav[aria-label="breadcrumb"],
.page-content:has(.order-page-v3) .page-header {
    display: none;
}

/* ========================================
   LAYOUT
   ======================================== */

.order-page-v3 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   HEADER
   ======================================== */

.order-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border-radius: 18px;
    padding: 26px 30px;
    position: relative;
    overflow: hidden;
}

.order-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.order-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 16px;
}

.order-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-title i {
    font-size: 20px;
    opacity: 0.9;
}

.order-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.order-header-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 12px 20px;
}

.order-balance-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.order-balance-value {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

/* ========================================
   GRID
   ======================================== */

.order-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* ========================================
   FORM CARD
   ======================================== */

.order-form-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 28px;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.form-section-title i {
    color: #6366f1;
    font-size: 14px;
}

/* Form Groups */
.form-row-v3 {
    margin-bottom: 14px;
}

.form-row-v3:last-child {
    margin-bottom: 0;
}

.form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group-v3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label-v3 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.required {
    color: #ef4444;
}

.form-input-v3 {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
}

.form-input-v3:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input-v3::placeholder {
    color: #9ca3af;
}

textarea.form-input-v3 {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 11px;
    color: #9ca3af;
}

/* Refill Badge */
.refill-badge {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.refill-badge.refill-no {
    color: #9ca3af;
}

/* Description Box */
.description-box {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
}

/* Service Info Grid */
.service-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.service-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    text-align: center;
}

.sii-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sii-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.sii-price {
    color: #6366f1;
}

/* Total Price Box */
.total-price-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
}

.total-price-currency {
    font-size: 13px;
    font-weight: 600;
    color: #6366f1;
}

.total-price-value {
    font-size: 16px;
    font-weight: 800;
    color: #4338ca;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.form-error {
    font-size: 13px;
    color: #ef4444;
    font-weight: 600;
}

.form-actions-btns {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-order-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-order-reset:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-order-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 10px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-order-submit:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-order-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   SIDEBAR
   ======================================== */

.order-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 90px;
}

.order-info-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.order-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.order-info-header i {
    color: #6366f1;
    font-size: 14px;
}

.order-info-body {
    padding: 16px 18px;
}

.order-info-text {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
}

/* Steps */
.order-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef2ff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

/* ========================================
   DARK THEME
   ======================================== */

.dark-theme .order-form-card,
.dark-theme .order-info-card {
    background: #1e293b;
    border-color: #334155;
}

.dark-theme .form-section {
    border-color: #334155;
}

.dark-theme .form-section-title,
.dark-theme .form-label-v3 {
    color: #f1f5f9;
}

.dark-theme .form-input-v3 {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.dark-theme .form-input-v3:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dark-theme .service-info-item {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .sii-value {
    color: #f1f5f9;
}

.dark-theme .description-box {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .total-price-box {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.dark-theme .order-info-header {
    border-color: #334155;
    color: #f1f5f9;
}

.dark-theme .order-info-text,
.dark-theme .step-text {
    color: #94a3b8;
}

.dark-theme .btn-order-reset {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

.dark-theme .form-actions {
    border-color: #334155;
}

.dark-theme .order-header {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #7c3aed 100%);
}

.dark-theme .order-page-v3 .select2-container--default .select2-selection--single {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-theme .order-page-v3 .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f1f5f9 !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .order-grid {
        grid-template-columns: 1fr;
    }

    .order-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .order-header {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .order-header-content {
        flex-direction: column;
        text-align: center;
    }

    .order-header-balance {
        align-items: center;
        width: 100%;
    }

    .order-title {
        font-size: 20px;
        justify-content: center;
    }

    .order-form-card {
        padding: 20px;
        border-radius: 14px;
    }

    .service-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions-btns {
        margin-left: 0;
        justify-content: stretch;
    }

    .btn-order-submit,
    .btn-order-reset {
        flex: 1;
        justify-content: center;
    }
}
