/* Definisi variabel warna dari desain baru */
:root {
    --primary-yellow: #fde047;
    /* yellow-300 */
    --primary-orange: #f97316;
    /* orange-500 */
    --primary-blue: #3b82f6;
    /* blue-500 */
    --light-bg: #f0f9ff;
    /* sky-50 */
    --dark-bg: #0c132c;
    /* Warna custom gelap */
    --light-content: #020617;
    /* slate-950 */
    --dark-content: #e0f2fe;
    /* sky-100 */
    --light-subtle: #6b7280;
    /* gray-500 */
    --dark-subtle: #9ca3af;
    /* gray-400 */
    --light-border: #dbeafe;
    /* blue-100 */
    --dark-border: #1e293b;
    /* slate-800 */
    --cc-order-topbar-height: 130px;
    --cc-confirm-top-gap: 8px;
    --cc-confirm-bottom-gap: 8px;
}

/* Font dasar */
body {
    font-family: 'Poppins', sans-serif;
}

/* Efek glow neon untuk tombol utama */
.neon-glow {
    box-shadow: 0 0 5px var(--primary-yellow), 0 0 10px var(--primary-yellow), 0 0 15px var(--primary-orange);
}

/* Efek shadow untuk tombol lain */
.shadow-glow {
    box-shadow: 0 0 8px rgba(253, 224, 71, 0.6), 0 0 20px rgba(249, 115, 22, 0.4);
}

/* Styling glassmorphism untuk card */
.card-glass {
    background-color: rgba(255, 255, 255, 0.5);
    /* Lebih transparan di light mode */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Border lebih jelas */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Shadow lebih halus */
}

.dark .card-glass {
    background-color: rgba(12, 19, 44, 0.3);
    /* Sedikit lebih transparan di dark */
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Animasi gradient untuk header */
.animated-gradient {
    background-size: 200% 200%;
    animation: gradientAnimation 10s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Styling panah dropdown custom */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    /* Warna subtle-light */
    background-position: right 0.7rem center;
    /* Sedikit lebih ke dalam */
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    /* Sedikit lebih kecil */
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.dark .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    /* Warna subtle-dark */
}

/* Fallback tinggi minimum body */
body {
    min-height: max(900px, 100dvh);
    /* Sedikit lebih tinggi untuk footer */
    background-color: #fafaf8 !important;
    /* Solid milky white - no gradients or animations */
}

.dark body {
    background-color: #0c132c !important;
    /* Keep dark mode solid */
}

/* Hide dynamic background canvas */
#dynamic-background {
    display: none !important;
}

/* Styling tambahan dari order.css yang relevan (loader, modal animations) */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.page-count-loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: var(--primary-blue);
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animasi Modal (Tetap dari desain lama) */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.3s ease-out forwards;
}

/* Styling Progress Bar Upload (Tetap dari desain lama) */
#upload-progress-modal .bg-gradient-to-br {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

.dark #upload-progress-modal .bg-gradient-to-br {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

#upload-progress-modal .relative.w-32.h-32 {
    border-color: #475569;
}

.dark #upload-progress-modal .relative.w-32.h-32 {
    border-color: #64748b;
}

#progress-wave {
    background: linear-gradient(to top, var(--primary-blue), #67e8f9);
    transition: transform 0.3s ease-out;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    transform: translateY(100%);
    /* Mulai dari bawah */
}

.dark #progress-wave {
    background: linear-gradient(to top, var(--primary-orange), var(--primary-yellow));
}

#progress-wave::before,
#progress-wave::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 45%;
    left: -50%;
    animation: wave 5s linear infinite;
}

.dark #progress-wave::before,
.dark #progress-wave::after {
    background-color: rgba(0, 0, 0, 0.1);
}

#progress-wave::before {
    bottom: 0;
    opacity: 0.7;
}

#progress-wave::after {
    bottom: 3px;
    animation-duration: 7s;
    animation-direction: reverse;
    opacity: 0.5;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

#progress-text {
    color: white;
    font-size: 1.875rem;
    font-weight: 700;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#upload-status {
    color: var(--dark-content);
}

.dark #upload-status {
    color: var(--light-content);
}

#upload-error {
    color: #f87171;
}

.dark #upload-error {
    color: #fca5a5;
}

/* Scrollbar Kustom (Tetap dari desain lama) */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Keep confirmation modal strictly between top bar and bottom bar */
#confirmation-modal {
    top: calc(var(--cc-order-topbar-height) + var(--cc-confirm-top-gap)) !important;
    bottom: calc(var(--cc-bottom-height, 60px) + env(safe-area-inset-bottom) + var(--cc-confirm-bottom-gap)) !important;
    left: 0 !important;
    right: 0 !important;
    padding: 6px 10px !important;
}

/* Confirmation modal refresh */
.cc-confirm-modal {
    height: min(100%, 780px);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22);
}

.dark .cc-confirm-modal {
    border-color: rgba(71, 85, 105, 0.8);
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.6);
}

.cc-confirm-subtitle {
    color: var(--light-subtle);
}

.dark .cc-confirm-subtitle {
    color: var(--dark-subtle);
}

.cc-confirm-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.cc-confirm-footer {
    flex: 0 0 auto;
    padding-top: 0.1rem;
}

.cc-confirm-actions button {
    min-height: 46px;
}

.cc-confirm-summary {
    display: grid;
    gap: 0.8rem;
}

.cc-confirm-section {
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.76);
    padding: 0.8rem;
}

.dark .cc-confirm-section {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(30, 41, 59, 0.6);
}

.cc-confirm-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #334155;
}

.dark .cc-confirm-section-title {
    color: #cbd5e1;
}

.cc-confirm-doc-list {
    display: grid;
    gap: 0.6rem;
}

.cc-confirm-doc-card {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.65rem 0.7rem;
}

.dark .cc-confirm-doc-card {
    border-color: rgba(100, 116, 139, 0.6);
    background: rgba(15, 23, 42, 0.42);
}

.cc-confirm-doc-head {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #0f172a;
    line-height: 1.3;
}

.dark .cc-confirm-doc-head {
    color: #e2e8f0;
}

.cc-confirm-doc-meta {
    font-size: 0.74rem;
    line-height: 1.35;
    color: #64748b;
}

.dark .cc-confirm-doc-meta {
    color: #94a3b8;
}

.cc-confirm-paybox {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.78);
    padding: 0.65rem 0.7rem;
    max-height: 220px;
    overflow-y: auto;
}

.dark .cc-confirm-paybox {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(15, 23, 42, 0.55);
}

.cc-confirm-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.83rem;
    line-height: 1.35;
    color: #334155;
    padding: 0.15rem 0;
}

.cc-confirm-pay-row span:first-child {
    color: #64748b;
}

.cc-confirm-pay-row strong {
    color: #1e293b;
    font-weight: 700;
    white-space: nowrap;
}

.dark .cc-confirm-pay-row {
    color: #cbd5e1;
}

.dark .cc-confirm-pay-row span:first-child {
    color: #94a3b8;
}

.dark .cc-confirm-pay-row strong {
    color: #e2e8f0;
}

.cc-confirm-pay-row.discount span:first-child,
.cc-confirm-pay-row.discount strong {
    color: #16a34a;
}

.cc-confirm-pay-divider {
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    margin: 0.35rem 0;
}

.dark .cc-confirm-pay-divider {
    border-top-color: rgba(100, 116, 139, 0.65);
}

.cc-confirm-pay-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.5);
}

.cc-confirm-pay-total strong {
    color: #0f172a;
    font-size: 1.02rem;
    white-space: nowrap;
}

.dark .cc-confirm-pay-total {
    color: #f8fafc;
    border-top-color: rgba(100, 116, 139, 0.7);
}

.dark .cc-confirm-pay-total strong {
    color: #f8fafc;
}

.cc-confirm-total-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-radius: 0.95rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(251, 146, 60, 0.35);
    background: linear-gradient(90deg, rgba(254, 249, 195, 0.95) 0%, rgba(255, 237, 213, 0.96) 100%);
}

.dark .cc-confirm-total-strip {
    border-color: rgba(251, 146, 60, 0.45);
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.55) 0%, rgba(154, 52, 18, 0.52) 100%);
}

.cc-confirm-total-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
}

.cc-confirm-total-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #b45309;
    white-space: nowrap;
}

.dark .cc-confirm-total-label {
    color: #f8fafc;
}

.dark .cc-confirm-total-value {
    color: #fdba74;
}

@media (max-width: 640px) {
    #confirmation-modal {
        top: calc(var(--cc-order-topbar-height) + 4px) !important;
        bottom: calc(var(--cc-bottom-height, 60px) + env(safe-area-inset-bottom) + 4px) !important;
        padding: 4px 6px !important;
    }

    .cc-confirm-modal {
        height: 100%;
        max-height: 100%;
        border-radius: 1rem;
        padding: 0.75rem;
    }

    .cc-confirm-paybox {
        max-height: 190px;
    }

    .cc-confirm-header {
        margin-bottom: 0.45rem !important;
    }

    .cc-confirm-subtitle {
        display: none;
    }

    .cc-confirm-section {
        padding: 0.62rem;
    }

    .cc-confirm-section-title {
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }

    .cc-confirm-doc-list {
        gap: 0.45rem;
    }

    .cc-confirm-doc-card {
        padding: 0.52rem 0.56rem;
    }

    .cc-confirm-doc-head {
        font-size: 0.73rem;
        margin-bottom: 0.22rem;
    }

    .cc-confirm-doc-meta {
        font-size: 0.69rem;
        line-height: 1.28;
    }

    .cc-confirm-paybox {
        padding: 0.5rem 0.55rem;
        max-height: 152px;
    }

    .cc-confirm-pay-row {
        font-size: 0.74rem;
        padding: 0.1rem 0;
    }

    .cc-confirm-pay-total {
        font-size: 0.84rem;
    }

    .cc-confirm-pay-total strong {
        font-size: 0.9rem;
    }

    .cc-confirm-total-strip {
        margin-top: 0.5rem !important;
        margin-bottom: 0.45rem !important;
        padding: 0.52rem 0.65rem;
        border-radius: 0.74rem;
    }

    .cc-confirm-total-label {
        font-size: 0.73rem;
    }

    .cc-confirm-total-value {
        font-size: 1.01rem;
    }

    .cc-confirm-actions {
        gap: 0.5rem !important;
        padding-bottom: max(0.2rem, env(safe-area-inset-bottom));
    }

    .cc-confirm-actions button {
        min-height: 42px;
        font-size: 0.82rem;
        padding: 0.58rem 0.5rem !important;
        border-radius: 0.72rem !important;
    }

    #confirm-btn .btn-text {
        white-space: nowrap;
    }
}

@media (max-width: 390px) {
    #confirmation-modal {
        align-items: stretch !important;
        justify-content: center !important;
        padding: 4px !important;
    }

    .cc-confirm-modal {
        height: 100%;
        max-height: 100%;
        padding: 0.62rem;
        border-radius: 0.86rem;
    }

    .cc-confirm-body {
        padding-right: 0.18rem;
    }

    .cc-confirm-paybox {
        max-height: 136px;
    }

    .cc-confirm-total-strip {
        padding: 0.48rem 0.56rem;
        margin-bottom: 0.4rem !important;
    }

    .cc-confirm-total-label {
        font-size: 0.69rem;
    }

    .cc-confirm-total-value {
        font-size: 0.95rem;
    }

    .cc-confirm-actions {
        gap: 0.42rem !important;
    }

    .cc-confirm-actions button {
        min-height: 40px;
        font-size: 0.75rem;
        padding: 0.52rem 0.4rem !important;
    }
}

/* Styling Pilihan Pengiriman (Tetap dari desain lama) */
.delivery-option {
    border: 2px solid var(--light-border);
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.dark .delivery-option {
    border-color: var(--dark-border);
    background-color: #1e293b;
}

.delivery-option:hover {
    border-color: var(--primary-blue);
}

.dark .delivery-option:hover {
    border-color: var(--primary-yellow);
}

input[type="radio"]:checked+.delivery-option {
    border-color: var(--primary-blue);
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.dark input[type="radio"]:checked+.delivery-option {
    border-color: var(--primary-yellow);
    background-color: rgba(253, 224, 71, 0.1);
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.4);
}

/* Tombol GPS Wajib / Error State — harus pakai ID+class agar menang dari mobile green gradient */
#share-location-btn.gps-required,
.gps-required {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    color: white !important;
}

/* Glassmorphism for Payment Summary Section */
#section-pembayaran {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(219, 234, 254, 0.35) 50%, rgba(191, 219, 254, 0.3) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(59, 130, 246, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

.dark #section-pembayaran {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(51, 65, 85, 0.5) 50%, rgba(30, 58, 138, 0.35) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Glassmorphism for Address & Shipping Section */
/* Glassmorphism for Address & Shipping Section - UPDATED for Readability */
#section-pengiriman {
    /* Solid base with subtle gradient for better readability */
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.dark #section-pengiriman {
    /* Dark mode solid base */
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Styling Indikator Progress Dinamis */
#progress-indicator .step-item .step-circle {
    background-color: rgba(59, 130, 246, 0.3);
    /* blue-300/30 */
    color: rgba(224, 242, 254, 0.7);
    /* sky-100/70 */
    border: 1px solid rgba(59, 130, 246, 0.5);
    /* blue-400/50 */
    transition: all 0.3s ease-in-out;
}

#progress-indicator .step-item .step-text {
    color: rgba(224, 242, 254, 0.7);
    /* sky-100/70 */
    transition: all 0.3s ease-in-out;
}

#progress-indicator .step-item .step-line-right,
#progress-indicator .step-item .step-line-left {
    background-color: rgba(59, 130, 246, 0.3);
    /* blue-300/30 */
    transition: all 0.3s ease-in-out;
}

/* Dark mode styling */
.dark #progress-indicator .step-item .step-circle {
    background-color: rgba(30, 41, 59, 0.5);
    /* slate-800/50 */
    color: rgba(156, 163, 175, 0.7);
    /* gray-400/70 */
    border-color: rgba(59, 130, 246, 0.5);
    /* blue-500/50 */
}

.dark #progress-indicator .step-item .step-text {
    color: rgba(156, 163, 175, 0.7);
    /* gray-400/70 */
}

.dark #progress-indicator .step-item .step-line-right,
.dark #progress-indicator .step-item .step-line-left {
    background-color: rgba(30, 41, 59, 0.5);
    /* slate-800/50 */
}


/* Styling untuk step aktif */
#progress-indicator .step-item.active .step-circle {
    background-image: linear-gradient(to right, var(--primary-yellow), var(--primary-orange));
    color: white;
    border: none;
    box-shadow: 0 0 5px var(--primary-yellow), 0 0 10px var(--primary-yellow), 0 0 15px var(--primary-orange);
    /* neon-glow */
}

#progress-indicator .step-item.active .step-text {
    color: white;
    font-weight: 600;
    /* font-semibold */
}

/* Styling garis yang terhubung ke step aktif */
#progress-indicator .step-item.active .step-line-left,
#progress-indicator .step-item.active-prev .step-line-right {
    background-image: linear-gradient(to right, var(--primary-yellow), var(--primary-orange));
}

/* Khusus garis antara step 1 dan 2 saat step 2 aktif */
#progress-indicator .step-item#step-1.active~.step-item#step-2.active .step-line-left {
    background-image: linear-gradient(to right, var(--primary-yellow), var(--primary-orange));
}

/* Tambahan untuk styling form di doc.js agar konsisten */
.custom-select,
.custom-input,
.custom-textarea {
    background-color: rgba(255, 255, 255, 0.5);
    /* Corresponds to bg-white/50 */
    border-color: var(--light-border);
    color: var(--light-content);
    /* Explicitly set dark text color for light mode */
}

.dark .custom-select,
.dark .custom-input,
.dark .custom-textarea {
    background-color: rgba(30, 41, 59, 0.5);
    /* Corresponds to dark:bg-slate-800/50 */
    border-color: var(--dark-border);
    color: #60a5fa;
    /* A bright, readable blue (sky-400) for dark mode text, as requested. */
}

/* ========================================= */
/* Fitur: Efek Kilau Header (Sheen Effect)   */
/* ========================================= */

.sheen-header {
    /* Ini wajib agar pseudo-element ::after bisa diposisikan */
    position: relative;

    /* Ini wajib agar kilaunya tidak 'bocor' keluar header */
    overflow: hidden;
}

/* ::after adalah elemen 'cahaya' itu sendiri */
.sheen-header::after {
    content: '';
    position: absolute;
    top: 0;

    /* Mulai dari kiri, di luar layar */
    left: -150%;

    /* Lebar cahaya (dibuat lebar agar miringnya bagus) */
    width: 150%;
    height: 100%;

    /* Cahaya diagonal putih transparan */
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.25) 50%,
            /* Opacity cahaya (bisa diatur) */
            transparent 100%);

    /* Miringkan balok cahaya 25 derajat */
    transform: skewX(-25deg);

    /* Terapkan animasi */
    /* Nama: sheen-sweep
     Durasi: 5 detik
     Tunda: 2 detik (diam dulu 2 detik sebelum mulai)
     Loop: infinite (ulangi selamanya)
  */
    animation: sheen-sweep 5s ease-in-out 2s infinite;
}

/* Animasi yang menggerakkan cahaya dari kiri ke kanan */
@keyframes sheen-sweep {
    0% {
        left: -150%;
        /* Posisi awal di luar layar kiri */
    }

    100% {
        left: 150%;
        /* Posisi akhir di luar layar kanan */
    }
}

/* ========================================= */
/* Fitur: Pulse Effect Ringan (User Notice)  */
/* ========================================= */
@keyframes pulse-light {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(253, 224, 71, 0.4);
        /* transparent yellow */
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 10px 2px rgba(253, 224, 71, 0.3);
        /* subtle glow */
    }
}

.animate-pulse-light {
    animation: pulse-light 3s ease-in-out infinite;
}

/* ========================================= */
/* Tooltip Icon (Tanda Seru Berlingkar)       */
/* ========================================= */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    cursor: pointer;
    vertical-align: middle;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    color: white;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tooltip-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

.tooltip-hint {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 400;
    padding: 10px 14px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 50;
    width: max-content;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    line-height: 1.5;
    text-transform: none;
}

.tooltip-hint strong {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
    color: #fff;
    text-transform: none;
}

.tooltip-hint::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

@media (hover: hover) {
    .tooltip-wrapper:hover .tooltip-hint {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

.tooltip-hint.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Tooltip Optimization */
@media (max-width: 640px) {
    .tooltip-hint {
        max-width: 200px;
        font-size: 11px;
        padding: 8px 12px;
    }

    .tooltip-hint strong {
        font-size: 12px;
    }
}

/* ========================================= */
/* Option Card Radio/Checkbox Styling       */
/* ========================================= */

/* Hide radio button and checkbox circles */
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    display: none !important;
}

/* Center align text and content in option cards */
.option-card {
    justify-content: center !important;
    text-align: center !important;
}

.option-card>* {
    text-align: center !important;
}

/* Center align nested divs and spans */
.option-card div,
.option-card span {
    text-align: center !important;
    justify-content: center !important;
}

/* Center align Cover Type options (keep radio buttons visible) */
.cover-options-container .flex.flex-wrap {
    justify-content: center !important;
}

.cover-options-container label {
    justify-content: center !important;
}

/* Center align Fotokopi section (keep checkbox visible) */
.copy-section-container {
    text-align: center !important;
}

.copy-section-container .flex {
    justify-content: center !important;
}

/* Center align rangkap dropdown */
.copy-input-select {
    text-align: center !important;
    text-align-last: center !important;
    /* For select elements */
}

/* Center align and format estimate display */
.doc-estimate {
    text-align: center !important;
}

.doc-estimate-value {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--primary-orange);
}

/* Center align page selection inputs */
.specific-pages-input,
.range-row input {
    text-align: center !important;
}

.specific-pages-container,
.range-pages-container {
    text-align: center !important;
}

.add-range-btn {
    display: inline-block !important;
    margin: 0 auto !important;
}

/* ========================================= */
/* Mobile Card Reordering (Document Items)  */
/* ========================================= */

@media (max-width: 640px) {

    /* Make document-item a flex container */
    .document-item {
        display: flex;
        flex-direction: column;
    }

    /* Reorder cards to place page selection cards right after upload */
    .document-item [data-row="upload"] {
        order: 1;
    }

    .document-item [data-row="page-selection"] {
        order: 2;
    }

    .document-item [data-row="pages-siding"] {
        order: 3;
    }

    .document-item [data-row="color"] {
        order: 4;
    }

    .document-item [data-row="quality"] {
        order: 5;
    }

    .document-item [data-row="printmode"] {
        order: 6;
    }

    .document-item [data-row="copy"] {
        order: 7;
    }

    .document-item [data-row="binding"] {
        order: 8;
    }

    /* Items without data-row (cover options, estimasi, etc.) appear last */
    .document-item>*:not([data-row]) {
        order: 9;
    }
}

/* Base Mobile Optimization for inputs */
@media (max-width: 640px) {

    /* Reduce top spacing to make content stick to header */
    .pt-\[120px\] {
        padding-top: 80px !important;
        /* Adjusted for optimal spacing with smaller header */
    }



    .option-card {
        padding: 8px 10px;
        gap: 6px;
    }

    .option-card span {
        font-size: 13px;
    }

    .range-row input {
        width: 60px;
    }

    /* GPS Button Mobile Styling */
    #share-location-btn {
        font-size: 0.9em;
        /* Keep text readable, only reduce container */
        padding: 0.6rem 1.35rem !important;
        /* Reduce padding by ~10% */
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        /* Bright green gradient */
    }

    #share-location-btn:hover {
        background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
        /* Darker green on hover */
    }

    #share-location-btn .material-symbols-outlined {
        font-size: 20px;
        /* Keep icon size */
    }

    /* Mobile Header Optimization - Max 20% viewport height */
    .fixed.top-0>div>div {
        max-height: 20vh;
    }

    header {
        height: 50px !important;
        /* Reduced from 70px */
    }

    header h1 {
        font-size: 0.95rem !important;
        /* Slightly smaller title */
    }

    header button {
        padding: 0.25rem !important;
    }

    /* Progress Indicator Mobile Optimization for 4 steps */
    #progress-indicator {
        padding: 0.5rem 0.75rem 0.75rem !important;
        /* Reduced padding */
    }

    #progress-indicator .step-item .step-circle {
        width: 1.75rem !important;
        /* Reduced from 2rem (32px to 28px) */
        height: 1.75rem !important;
        font-size: 0.75rem !important;
        /* Smaller number */
    }

    #progress-indicator .step-item .step-text {
        font-size: 0.625rem !important;
        /* Reduced from 0.75rem (12px to 10px) */
        margin-top: 0.25rem !important;
        /* Reduced margin */
        line-height: 1.2;
    }

    #progress-indicator .step-item .step-line-right,
    #progress-indicator .step-item .step-line-left {
        top: 0.875rem !important;
        /* Adjust for smaller circles (14px) */
    }

    /* ========================================= */
    /* Standardized Mobile Button Sizing       */
    /* ========================================= */

    /* "Tambah Dokumen" button - Match reference standard */
    #add-document-btn {
        padding: 0.5rem 1rem !important;
        /* Match 'Pilih File Anda' */
        font-size: 0.875rem !important;
        /* 14px */
    }

    #add-document-btn .material-symbols-outlined {
        font-size: 1.125rem !important;
        /* 18px icon */
    }

    /* "Bayar" submit button - Slightly larger as primary CTA */
    #main-submit-btn {
        padding: 0.75rem 1.5rem !important;
        /* Proportional but not overwhelming */
        font-size: 1rem !important;
        /* 16px */
    }
}

/* ========================================= */
/* Pulse CTA for Choose File Button          */
/* ========================================= */
@keyframes pulse-cta {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

.animate-pulse-cta {
    animation: pulse-cta 2s ease-in-out infinite;
}

/* Custom File Input Wrapper */
.file-input-wrapper {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.file-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.file-input-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    /* py-2 px-4 */
    border-radius: 0.5rem;
    /* rounded-lg */
    border: none;
    font-weight: 600;
    /* font-semibold */
    font-size: 0.875rem;
    /* text-sm */
    color: white;
    background-image: linear-gradient(to right, var(--primary-yellow), var(--primary-orange));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* shadow-lg */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    animation: pulse-light 3s ease-in-out infinite;
}

.file-input-button:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* shadow-xl */
    opacity: 0.9;
}

/* Hide the "No file chosen" text and center the button */
.file-input {
    color: transparent;
    text-align: center;
    display: block;
}

.file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 1rem;
    /* py-2 px-4 */
    border-radius: 0.5rem;
    /* rounded-lg */
    border: none;
    font-weight: 600;
    /* font-semibold */
    font-size: 0.875rem;
    /* text-sm */
    color: white;
    background-image: linear-gradient(to right, var(--primary-yellow), var(--primary-orange));
    /* bg-gradient-to-r from-yellow-400 to-orange-500 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* shadow-lg */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    animation: pulse-light 3s ease-in-out infinite;
}

.file-input::file-selector-button:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* shadow-xl */
    opacity: 0.9;
}

/* ========================================= */
/* Disabled Binding Option Tooltip           */
/* ========================================= */
.binding-select option:disabled {
    color: #9ca3af;
    font-style: italic;
}

/* ========================================= */
/* Radio Card for Options (Quality, etc.)    */
/* ========================================= */
.option-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid var(--light-border);
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
    position: relative;
}

.dark .option-card {
    border-color: var(--dark-border);
    background-color: #1e293b;
}

.option-card:hover {
    border-color: var(--primary-blue);
}

.dark .option-card:hover {
    border-color: var(--primary-yellow);
}

.option-card.selected {
    border-color: var(--primary-blue);
    background-color: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.dark .option-card.selected {
    border-color: var(--primary-yellow);
    background-color: rgba(253, 224, 71, 0.08);
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.3);
}

.option-card input[type="radio"] {
    accent-color: var(--primary-blue);
}

.dark .option-card input[type="radio"] {
    accent-color: var(--primary-yellow);
}

/* ========================================= */
/* Page Range Row                            */
/* ========================================= */
.range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.range-row input {
    width: 80px;
    text-align: center;
}

.range-row .range-separator {
    font-size: 13px;
    color: var(--light-subtle);
    font-weight: 500;
}

.dark .range-row .range-separator {
    color: var(--dark-subtle);
}

.range-row .remove-range-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.2s;
}

.range-row .remove-range-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.add-range-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px dashed var(--primary-blue);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-range-btn:hover {
    background: rgba(59, 130, 246, 0.08);
}

.dark .add-range-btn {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.dark .add-range-btn:hover {
    background: rgba(253, 224, 71, 0.08);
}

/* ========================================= */
/* Per-Document Cost Estimate                */
/* ========================================= */
.doc-estimate {
    background: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    text-align: center;
    transition: all 0.3s;
}

.dark .doc-estimate {
    background: #1e293b;
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* ========================================= */
/* Gramasi select sub-field                  */
/* ========================================= */
.gramasi-container {
    margin-top: 6px;
    padding-left: 28px;
    transition: all 0.3s;
}

/* ========================================= */
/* Booklet Info Banner                       */
/* ========================================= */
.booklet-info {
    font-size: 11px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
    padding: 4px 10px;
    margin-top: 4px;
}

.dark .booklet-info {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Sub-section separator in document item */
.doc-section-label {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    margin-bottom: 12px;
    margin-top: 21px;
}

/* Center align specific labels in Document Section (Exclude Fotokopi which is <label>) */
#section-dokumen p.doc-section-label {
    text-align: center;
}



/* Enhancing form labels to match strong bold request */
label.block.text-sm {
    font-weight: 700 !important;
    font-size: 15.5px !important;
    letter-spacing: 0.3px;
    color: var(--primary-blue);
    /* Optional: harmonize color */
}

.doc-section-label:first-child {
    margin-top: 0;
}

.dark .doc-section-label {
    color: #60a5fa;
    border-bottom-color: rgba(59, 130, 246, 0.25);
}

/* ========================================= */
/* Document Section Card (Desktop Base)     */
/* ========================================= */
.doc-section-card {
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dark .doc-section-card {
    background-color: #1e293b;
    border-color: rgba(51, 65, 85, 0.5);
}

/* Mobile Card Layout for Document Details */
@media (max-width: 640px) {
    .doc-section-card {
        background-color: #ffffff;
        border: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }

    .dark .doc-section-card {
        background-color: #1e293b;
        border-color: rgba(51, 65, 85, 0.5);
    }

    .doc-section-label {
        font-size: 13.5px;
        padding-top: 0;
        margin-top: 0;
        padding-bottom: 8px;
        margin-bottom: 12px;
        text-align: left;
        border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    }

    /* Increase gap between section rows/cards on mobile */
    .grid {
        gap: 1.25rem;
        /* 20px */
        margin-bottom: 0px;
    }

    /* Ensure copy-section handles card correctly */
    .copy-section-container.doc-section-card {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}



.dark label.block.text-sm {
    color: #60a5fa;
}

/* ========================================= */
/* Sticky Cost Summary - Dark Mode           */
/* ========================================= */
.dark #sticky-breakdown {
    background: rgba(15, 23, 42, 0.97) !important;
    border-color: rgba(51, 65, 85, 0.6) !important;
}

.dark #sticky-cost-summary .flex.items-center.gap-3 {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(51, 65, 85, 0.6) !important;
}

.dark #sticky-toggle-btn {
    background: rgba(253, 224, 71, 0.1) !important;
    border-color: rgba(253, 224, 71, 0.25) !important;
    color: #fde047 !important;
}

/* ========================================= */
/* Section Wrapper Backgrounds (Gradient)    */
/* ========================================= */
/* Document Section (Solid Background) */
#section-dokumen {
    background: #ffffff;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

/* Delivery & Payment Sections (Gradient Background) */
/* Delivery & Payment Sections (Gradient Background) */
#section-pembayaran {
    background: radial-gradient(circle at top left, rgba(240, 249, 255, 0.98) 0%, rgba(224, 231, 255, 0.95) 50%, rgba(243, 232, 255, 0.92) 100%);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

/* Dark Mode - Document Section (Solid) */
.dark #section-dokumen {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

/* Dark Mode - Delivery & Payment Sections (Gradient) */
.dark #section-pembayaran {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(55, 30, 80, 0.85) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

/* ========================================= */
/* Force Solid Backgrounds for Form Elements */
/* ========================================= */
#section-dokumen select,
#section-dokumen input:not([type="radio"]):not([type="checkbox"]),
#section-dokumen textarea,
#section-pengiriman select,
#section-pengiriman input:not([type="radio"]):not([type="checkbox"]),
#section-pengiriman textarea,
#section-pembayaran select,
#section-pembayaran input:not([type="radio"]):not([type="checkbox"]),
#section-pembayaran textarea {
    background-color: #ffffff !important;
}

.dark #section-dokumen select,
.dark #section-dokumen input:not([type="radio"]):not([type="checkbox"]),
.dark #section-dokumen textarea,
.dark #section-pengiriman select,
.dark #section-pengiriman input:not([type="radio"]):not([type="checkbox"]),
.dark #section-pengiriman textarea,
.dark #section-pembayaran select,
.dark #section-pembayaran input:not([type="radio"]):not([type="checkbox"]),
.dark #section-pembayaran textarea {
    background-color: #1e293b !important;
}

/* ========================================= */
/* Document Upload Items - Distinct Colors  */
/* ========================================= */
.document-item {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.95) 0%, rgba(219, 234, 254, 0.85) 100%) !important;
    border-color: rgba(147, 197, 253, 0.4) !important;
    box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.15) !important;
}

.dark .document-item {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(30, 58, 138, 0.2) 100%) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
    box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.2) !important;
}

/* ========================================= */
/* Shipping Section: Sub-Group Containers    */
/* ========================================= */
.shipping-subgroup {
    padding: 0 0 4px;
}

.subgroup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #2563eb;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    text-align: center;
}

.dark .subgroup-header {
    color: #93c5fd;
    border-bottom-color: rgba(96, 165, 250, 0.3);
}

.subgroup-title {
    font-size: clamp(1.32rem, 1.1rem + 1vw, 1.8rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
}

.subgroup-caption {
    font-size: 0.94rem;
    line-height: 1.45;
    margin-top: 0;
    text-align: center;
}

.subgroup-icon {
    font-size: 18px !important;
    color: inherit;
    background: rgba(59, 130, 246, 0.1);
    padding: 4px;
    border-radius: 7px;
}

.dark .subgroup-icon {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.2);
}

/* Keep tap targets comfortable on touch devices */
#section-pengiriman select,
#section-pengiriman input:not([type="radio"]):not([type="checkbox"]),
#section-pengiriman textarea,
#section-pengiriman button:not(.address-chip):not(.address-link-btn) {
    min-height: 44px;
}

/* ========================================= */
/* Section Divider (Between Address & Ship)  */
/* ========================================= */
.section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 16px;
    padding: 0 4px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.25), transparent);
}

.dark .divider-line {
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.divider-icon {
    font-size: 17px !important;
    color: #60a5fa;
    opacity: 0.75;
    background: rgba(59, 130, 246, 0.06);
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dark .divider-icon {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
}

/* ========================================= */
/* Label Icons (Inline with Form Labels)     */
/* ========================================= */
.label-icon {
    font-size: 16px !important;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.8;
}

/* ========================================= */
/* Delivery Card Meta                         */
/* ========================================= */
.delivery-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.delivery-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.08);
}

.dark .delivery-meta-pill {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.18);
}

/* ========================================= */
/* Delivery Card Icons                       */
/* ========================================= */
.delivery-card-icon {
    font-size: 22px !important;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.delivery-option:hover .delivery-card-icon {
    transform: scale(1.15);
}

/* ========================================= */
/* Delivery Badge (GRATIS)                   */
/* ========================================= */
.delivery-badge-free {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #059669;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.18) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.dark .delivery-badge-free {
    color: #34d399;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(52, 211, 153, 0.3);
}

/* ========================================= */
/* Delivery Option Hover Enhancement         */
/* ========================================= */
.delivery-option {
    transition: all 0.2s ease-in-out, transform 0.15s ease;
}

.delivery-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

.delivery-option:active {
    transform: translateY(0);
}

/* ========================================= */
/* Address Quick Select                       */
/* ========================================= */
.address-link-btn {
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    transition: all 0.2s ease;
    min-height: 0 !important;
    line-height: 1.15;
}

.address-link-btn:hover {
    background: rgba(59, 130, 246, 0.14);
}

.dark .address-link-btn {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.2);
}

.address-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.address-chip {
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #1e3a8a;
    background: rgba(239, 246, 255, 0.95);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.18s ease;
    min-height: 0 !important;
}

.address-chip:hover {
    background: rgba(219, 234, 254, 0.95);
}

.address-chip.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.9);
}

.dark .address-chip {
    color: #bfdbfe;
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.35);
}

.dark .address-chip.active {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.address-preview {
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(219, 234, 254, 0.8) 100%);
    border-radius: 12px;
    padding: 10px 12px;
}

.dark .address-preview {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(30, 58, 138, 0.15);
}

.address-preview .title {
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.dark .address-preview .title {
    color: #93c5fd;
}

.address-preview .line {
    font-size: 12px;
    line-height: 1.45;
    color: #1f2937;
}

.dark .address-preview .line {
    color: #e2e8f0;
}

/* ========================================= */
/* Inline Validation                          */
/* ========================================= */
.field-error {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}

.input-error {
    border-color: rgba(220, 38, 38, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

/* ========================================= */
/* Self Pickup State                          */
/* ========================================= */
.pickup-mode-banner {
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.85) 100%);
}

.dark .pickup-mode-banner {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(6, 78, 59, 0.25);
}

#delivery-address-block {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#delivery-address-block.is-hidden {
    display: none;
}

/* ========================================= */
/* GPS Helper Text + Badge                    */
/* ========================================= */
.gps-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.gps-status-badge.pending {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(254, 243, 199, 0.85);
}

.gps-status-badge.success {
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(209, 250, 229, 0.85);
}

.gps-status-badge.error {
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(254, 226, 226, 0.9);
}

.dark .gps-status-badge.pending {
    color: #fcd34d;
    background: rgba(120, 53, 15, 0.45);
    border-color: rgba(245, 158, 11, 0.45);
}

.dark .gps-status-badge.success {
    color: #6ee7b7;
    background: rgba(6, 78, 59, 0.45);
    border-color: rgba(16, 185, 129, 0.45);
}

.dark .gps-status-badge.error {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.45);
    border-color: rgba(239, 68, 68, 0.45);
}

/* ========================================= */
/* GPS Helper Text                           */
/* ========================================= */
.gps-helper-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid rgba(59, 130, 246, 0.3);
}

.dark .gps-helper-text {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: rgba(59, 130, 246, 0.4);
}

/* ========================================= */
/* Save Address Mini-Card Toggle             */
/* ========================================= */
.save-address-toggle>div:first-child {
    transition: all 0.2s ease;
}

.save-address-toggle>div:first-child:hover {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.04);
    box-shadow: 0 2px 8px -2px rgba(59, 130, 246, 0.12);
}

.dark .save-address-toggle>div:first-child:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.08);
}

/* ========================================= */
/* Mobile Optimizations for Shipping Section */
/* ========================================= */
@media (max-width: 640px) {
    .subgroup-header {
        gap: 8px;
        margin-bottom: 6px;
        padding-bottom: 6px;
    }

    .subgroup-title {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .subgroup-caption {
        font-size: 0.84rem;
        line-height: 1.4;
        margin-bottom: 12px !important;
    }

    .subgroup-icon {
        font-size: 15px !important;
        padding: 3px;
    }

    .section-divider {
        margin: 14px 0 12px;
    }

    .divider-icon {
        font-size: 14px !important;
        padding: 3px;
    }

    .delivery-card-icon {
        font-size: 20px !important;
    }

    .delivery-badge-free {
        font-size: 10px;
        padding: 2px 8px;
    }

    .delivery-meta-row {
        gap: 5px;
    }

    .delivery-meta-pill {
        font-size: 10px;
        padding: 2px 8px;
    }

    .delivery-option {
        padding: 12px !important;
    }

    .address-chip-list {
        gap: 6px;
    }

    .address-chip {
        font-size: 11px;
        padding: 3px 9px;
    }

    .address-link-btn {
        font-size: 10.5px;
        padding: 2px 8px;
    }

    #section-pengiriman .doc-section-card {
        padding: 0.72rem;
    }

    #section-pengiriman select,
    #section-pengiriman input:not([type="radio"]):not([type="checkbox"]),
    #section-pengiriman textarea,
    #section-pengiriman button:not(.address-chip):not(.address-link-btn) {
        min-height: 46px;
    }

    #section-pengiriman textarea {
        min-height: 88px;
    }

    .gps-helper-text {
        font-size: 11px;
        padding: 6px 10px;
    }

    .save-address-toggle>div:first-child {
        padding: 10px !important;
    }
}
