/* ===================== HALAMAN ORDER - JASA PENOMORAN ===================== */

/* Loading spinner di tombol UPLOAD */
@keyframes spin { to { transform: rotate(360deg); } }
.btn-upload-main .spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
.btn-upload-main.loading {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-upload-main.loading .spinner { display: inline-block; }
.btn-upload-main.loading .btn-label::after { content: '...'; }

/* Blokir seleksi teks di seluruh panel order */
.order-panel, .order-right, .preview-box, .benefits-box, .warning-box {
    user-select: none;
    -webkit-user-select: none;
}

/* Page Title */
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* ===== ORDER WRAPPER (2 kolom) ===== */
.order-wrapper {
    display: flex;
    gap: 20px;
    padding: 28px 40px 60px;
    align-items: flex-start;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}

/* Bungkus page header juga agar sejajar */
.page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 40px 18px;
    text-align: center;
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}

/* ===== KIRI: Upload + Paket ===== */
.order-left {
    width: 48%;
    flex-shrink: 0;
}

.order-panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 16px;
    padding: 22px;
    color: #e2e8f0;
}

/* No. Telepon */
.phone-field {
    margin-bottom: 16px;
}

.phone-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 6px;
}

.phone-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 14px;
    color: #e2e8f0;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    background: rgba(255,255,255,0.06);
}

.phone-optional-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    color: #6b7280;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    padding: 1px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 6px;
}

.phone-hint {
    font-size: 11px;
    color: #6b7280;
    margin-top: 5px;
    line-height: 1.5;
}

.phone-hint b { color: #a78bfa; }

.phone-input::placeholder { color: #4b5563; }

.phone-input:focus {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.12);
}

/* Upload Area */
#fileInput { display: none; }

.upload-area {
    border: 2px dashed rgba(124,58,237,0.4);
    border-radius: 12px;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s;
    margin-bottom: 18px;
    background: rgba(124,58,237,0.06);
}

.upload-area:hover {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.12);
}

.upload-area p {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
}

.upload-area span {
    font-size: 12px;
    color: #6b7280;
}

.file-display {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: rgba(124,58,237,0.12);
    border: 1px solid rgba(124,58,237,0.35);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #a78bfa;
    word-break: break-all;
}

.file-remove {
    cursor: pointer;
    color: #6b7280;
    font-weight: 700;
    padding: 0 4px;
    flex-shrink: 0;
    margin-left: 10px;
}
.file-remove:hover { color: #ef4444; }

/* Pilih Paket Label */
.pilih-paket-label {
    font-weight: 600;
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 10px;
}

/* ===== TAB PILIH PAKET ===== */
.paket-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
    padding-top: 12px;
    overflow: visible;
}

.paket-tab {
    flex: 1;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    padding: 10px 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    text-align: center;
    transition: 0.2s;
    position: relative;
    z-index: 0;
}

.paket-tab:hover {
    border-color: #a78bfa;
    background: rgba(124,58,237,0.1);
}

.paket-tab.active {
    border-color: #7c3aed;
    border-width: 2px;
    background: rgba(124,58,237,0.14);
    z-index: 2;
    margin-bottom: -2px;
    padding-bottom: 12px;
}

.tab-name {
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 3px;
    line-height: 1.3;
}

.paket-tab.active .tab-name { color: #a78bfa; }

.tab-sub {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.tab-format {
    position: absolute;
    top: -16px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #facc15;
    background: #3b2a00;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1.5px solid #facc15;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(250,204,21,0.25);
}

.paket-tab:not(.active) .tab-format { color: #a38000; background: #1e1a00; border-color: #a38000; box-shadow: none; }
.tab-format:empty { display: none; }

/* ===== PANEL OPSI ===== */
.paket-opts-panel {
    border: 2px solid #7c3aed;
    border-radius: 0 0 12px 12px;
    padding: 14px 16px;
    background: rgba(124,58,237,0.08);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}


.populer-badge {
    display: inline-block;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ===== OPTION BUTTONS GRID ===== */
.opts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(124,58,237,0.2);
}

/* 4-kolom untuk Paket 1 (ada Posisi/Letak) */
.opts-grid-4 {
    grid-template-columns: 1.6fr 1.2fr 0.8fr 1fr;
}


.opts-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.opt-btn {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 5px 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: 0.15s;
    user-select: none;
    text-align: center;
}

.opt-btn:hover {
    border-color: #a78bfa;
    color: #a78bfa;
    background: rgba(124,58,237,0.12);
}

.opt-btn.selected {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
    font-weight: 600;
}

/* Grid posisi 2 kolom: [Tengah][Bawah] / [Kanan][Atas] / [Kiri] */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

/* Upload Button */
.btn-upload-main {
    display: block;
    width: 100%;
    padding: 13px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    letter-spacing: 1.5px;
    transition: 0.2s;
}

.btn-upload-main:hover {
    background: #a855f7;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
}

/* ===== KANAN: Info + Preview ===== */
.order-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Benefits */
.benefits-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 14px;
    padding: 18px 22px;
}

.benefits-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px;
}

.benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.benefits-list li {
    font-size: 13px;
    color: #86efac;
}

/* Warning */
.warning-box {
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 12px;
    color: #fbbf24;
    line-height: 1.5;
    transition: 0.3s;
}

.warning-box.warning-ok {
    background: rgba(52, 211, 153, 0.06);
    border-color: rgba(52, 211, 153, 0.25);
    color: #34d399;
}

/* ===== PREVIEW BOX ===== */
.preview-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 14px;
    padding: 18px 20px;
    color: #e2e8f0;
    flex: 1;
}

.preview-label {
    font-size: 11px;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.preview-paket-name {
    font-weight: 800;
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 3px;
}

.preview-paket-sub {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 12px;
}

.preview-detail-list {
    list-style: disc;
    margin: 0 0 16px 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.preview-detail-list li {
    font-size: 12px;
    color: #9ca3af;
}

/* Preview pages (miniature) */
.preview-pages {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-page {
    width: 62px;
    height: 82px;
    border: 1.5px solid rgba(124,58,237,0.3);
    border-radius: 5px;
    position: relative;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* Lines in page (decorative) */
.preview-page::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 6px;
    right: 6px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    box-shadow: 0 6px 0 rgba(255,255,255,0.08), 0 12px 0 rgba(255,255,255,0.08),
                0 18px 0 rgba(255,255,255,0.08), 0 24px 0 rgba(124,58,237,0.2);
}

.page-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 700;
    color: #4b5563;
    text-align: center;
    white-space: nowrap;
}

.page-num-bottom {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

.page-num-topright {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

.page-num-topcenter {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

.page-num-topleft {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

.page-num-bottomright {
    position: absolute;
    bottom: 5px;
    right: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

.page-num-bottomleft {
    position: absolute;
    bottom: 5px;
    left: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #a78bfa;
}

/* ===== INACTIVE PAKET — options bisa diklik tapi tidak terlihat terpilih ===== */
.paket-card:not(.active) .opts-grid {
    opacity: 0.45;
}

/* Sembunyikan warna ungu selected di paket non-aktif */
.paket-card:not(.active) .opt-btn.selected {
    background: #f3f4f6;
    color: #555;
    border-color: #e5e7eb;
    font-weight: normal;
}

.paket-card:not(.active) .paket-card-header {
    opacity: 0.8;
}

/* ===== VALIDASI ===== */
.validation-msg {
    display: none;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f87171;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.9;
}
.validation-msg.show { display: block; }

/* ===== MOBILE ===== */
@media (max-width: 900px) {
    .page-header {
        padding: 20px 16px 14px;
    }

    .page-title {
        font-size: 20px;
    }

    .order-wrapper {
        flex-direction: column;
        padding: 20px 16px 40px;
        gap: 16px;
    }

    /* Kiri dan kanan masing-masing full width */
    .order-left,
    .order-right {
        width: 100%;
    }

    /* Kolom kanan (benefits, warning, preview) tampil di bawah */
    .order-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .opts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .opts-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .paket-tabs {
        gap: 4px;
    }

    .tab-name {
        font-size: 10px;
    }
}
