/* ===== Base Styles ===== */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 80px;
    color: #333;
    background: none;
    position: relative;
    min-height: 100vh;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Blurred flashing background image */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1613758235402-745466bb7efe?auto=format&fit=crop&w=1920&q=90')
    center/cover no-repeat;
    filter: blur(6px) brightness(0.55) contrast(.65);
    z-index: -1;
    animation: flashBackground 6s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes flashBackground {
    0%, 100% { filter: blur(6px) brightness(1.1); }
    50% { filter: blur(6px) brightness(1.4); }
}

/* ===== Container ===== */
.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%); /* was -50%, now lower */
    width: 90%;
    max-width: 700px;
    background: #F0FBFF;
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.7s ease-in;
    height: 65vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 20;
}

/* Mobile fix */
@media (max-width: 600px) {
    .container {
        transform: translate(-50%, -30%); /* push downward more */
        height: 70vh; /* optional: better fit on phones */
        padding: 30px 20px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2 {
    text-align: center;
    color: #1e3a8a;
    font-size: 28px;
    margin-bottom: 10px;
}

.totalQtyLabel {
    white-space: pre-line;
}

#message {
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    transition: opacity 0.4s ease;
}

@keyframes flashGreen {
    0%, 100% { color: #16a34a; text-shadow: 0 0 10px #22c55e; }
    50% { color: #22c55e; text-shadow: 0 0 20px #4ade80; }
}

.flash-success {
    animation: flashGreen 1s ease-in-out infinite;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #1e293b;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* ===== Action Buttons ===== */
#checkBtn, #placeOrderBtn {
    display: block;
    width: 50%;
    max-width: 280px;
    margin: 20px auto;
    padding: 12px;
    background: linear-gradient(90deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    border: 1px solid rgba(191, 219, 254, 0.8);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
}

#checkBtn:hover, #placeOrderBtn:hover {
    background: linear-gradient(90deg, #bfdbfe, #93c5fd);
    transform: translateY(-2px);
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* ===== Slot Section ===== */
.slot-section {
    background-color: rgba(241, 245, 249, 0.9);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.slot-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.item-select {
    flex: 1;
}

.qty-select {
    flex: 1;             /* allow it to grow */
    min-width: 50px;
}

.slot-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.add-btn {
    background-color: #93c5fd;
    color: #1e3a8a;
    font-size: 14px;
    padding: 6px 10px;
}

.add-btn:hover {
    background-color: #60a5fa;
}

.remove-btn {
    background-color: #fda4af;
    color: #7f1d1d;
    font-size: 14px;
    padding: 6px 10px;
}

.remove-btn:hover {
    background-color: #fb7185;
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Error Styles ===== */
.error-inline {
    color: red;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    display: block;
    margin-top: 5px;
    visibility: hidden;
}

.error-inline.visible {
    visibility: visible;
}

.error-center {
    color: red;
    text-align: center;
    font-style: italic;
    font-size: 15px;
    margin-top: 15px;
    display: none;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background-color: #cbd5e1;
}

.btn-confirm {
    background-color: #1e3a8a;
    color: white;
}

.hidden {
    display: none !important;
}

/* ===== Branding & Header ===== */
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.8rem;
    text-align: center;
    background: linear-gradient(90deg, #ff512f, #dd2476, #24c6dc, #ff512f);
    background-size: 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGradient 6s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 200, 255, 0.4);
}

@keyframes logoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes logoGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,200,255,0.4); }
    50% { text-shadow: 0 0 20px rgba(255,255,255,1), 0 0 40px rgba(255,100,255,0.8); }
}

/* ===== Banner ===== */
.banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    font-size: 1.2rem;
    padding: 0.9rem 0;
    overflow: visible;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    letter-spacing: 1px;
    z-index: 2000;
}

.banner-text {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    will-change: transform, opacity;
    transform: translateZ(0);
    background: linear-gradient(90deg, #ff8a00, #e52e71, #9b00ff, #00c3ff, #ff8a00);
    background-size: 500%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* remove the pause-causing padding */
    padding-left: 0;
    animation-delay: 0s !important;

    animation:
            scrollBanner 30s linear infinite,   /* you can adjust speed here */
            gradientShift 8s ease-in-out infinite,
            shimmerGlow 3s ease-in-out infinite;
}


@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmerGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(255,255,255,0.3), 0 0 25px rgba(255,255,255,0.5); }
    50% { text-shadow: 0 0 25px rgba(255,255,255,0.6), 0 0 50px rgba(255,255,255,0.9); }
}

/* ===== Footer Buttons (Placed in Banner, Right Side) ===== */
.footer-buttons {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding: 8px 0;
    align-items: center;
}


.footer-buttons button {
    background: linear-gradient(90deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    white-space: nowrap;
}

.footer-buttons button:hover {
    background: linear-gradient(90deg, #bfdbfe, #93c5fd);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.nav-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    overflow: visible !important;
    white-space: nowrap;
}

.nav-buttons button {
    white-space: nowrap;
    padding: 6px 12px;
    background: #dbeafe;
    border: 1px solid #bfdcff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}


/* Responsive Footer Buttons */
/*@media (max-width: 640px) {
    .footer-buttons {
        position: static;
        transform: none;
        margin-top: 8px;
        justify-content: center;
        flex-wrap: wrap;
        padding-top: 5px;
        width: 100%;
    }

    .footer-buttons button {
        width: 100%;
        padding: 10px;
        font-size: 1rem;
        border-radius: 8px;
    }
}*/

/* ===== Mobile Adjustments ===== */
@media (max-width: 768px) {
    .container {
        position: static;
        transform: none;
        width: 95%;
        max-width: none;
        margin: 80px auto 100px auto;
        height: auto;
        padding: 20px 16px;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }

    select.item-select,
    select.qty-select {
        width: 10px;
    }

    label {
        font-size: 0.95rem;
    }

    input, select {
        font-size: 1rem;
    }

    #checkBtn, #placeOrderBtn {
        width: 100%;
        font-size: 1rem;
    }
}

.textarea {
    width: 100% !important;
    height: 200px !important;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
    resize: none !important;
}
@keyframes scrollBanner {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Style disabled/Sold Out options */
.sold-out-option {
    color: #999 !important;
    font-style: italic;
}

/* Additional support for browsers that don't apply class to disabled options */
select option:disabled {
    color: #999 !important;
    font-style: italic;
    background-color: #f5f5f5;
}

/* DELIVERY PLAN ADMIN (DIV-BASED DESIGN) */

.dp-header-row,
.dp-row {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.dp-header-row {
    background: linear-gradient(90deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(59,130,246,0.25);
}

.dp-row {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.dp-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.dp-col {
    padding: 4px 6px;
    font-size: 15px;
}

/* Column widths */
.dp-id { width: 20%; font-weight: 600; }
.dp-date { width: 25%; }
.dp-driver { width: 35%; }
.dp-action { width: 20%; text-align: right; }

.dp-link {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}
.dp-link:hover { text-decoration: underline; }

.dp-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 15px;
    border: 1px solid #c9d6e2;
}

.dp-save-btn {
    padding: 8px 14px;
    background: #93c5fd;
    color: #1e3a8a;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

.dp-save-btn:hover {
    background: #60a5fa;
}

/* Responsive */
@media (max-width: 700px) {
    .dp-header-row { display: none; }

    .dp-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .dp-col {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .dp-action {
        text-align: left;
        margin-top: 8px;
    }

    /* ===== Address Suggestions ===== */
    #addrSuggestions {
        position: absolute;
        background: #ffffff;
        border: 1px solid #ccc;
        width: 100%;
        z-index: 2000;
        max-height: 180px;
        overflow-y: auto;
        border-radius: 6px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

    .suggestion-item {
        padding: 10px;
        cursor: pointer;
        font-size: 15px;
        border-bottom: 1px solid #eee;
    }

    .suggestion-item:hover {
        background: #f0f4ff;
    }

    .offer-fancy {
        color: #e6c195;                 /* Elegant gold shade */
        font-weight: 800;               /* Extra bold */
        font-size: 22px;                /* Larger */
        letter-spacing: 1px;            /* Slight spacing */
        text-shadow:
                0 0 5px rgba(255, 195, 113, 0.8),
                0 0 10px rgba(255, 166, 76, 0.7),
                0 0 15px rgba(255, 140, 0, 0.6);  /* Glow effect */
        animation: glowPulse 1.8s ease-in-out infinite;
    }

    /* Smooth glowing animation */
    @keyframes glowPulse {
        0% {
            text-shadow:
                    0 0 5px rgba(255, 195, 113, 0.8),
                    0 0 10px rgba(255, 166, 76, 0.7),
                    0 0 15px rgba(255, 140, 0, 0.6);
            transform: scale(1);
        }
        50% {
            text-shadow:
                    0 0 10px rgba(255, 195, 113, 1),
                    0 0 20px rgba(255, 166, 76, 1),
                    0 0 25px rgba(255, 140, 0, 1);
            transform: scale(1.05);
        }
        100% {
            text-shadow:
                    0 0 5px rgba(255, 195, 113, 0.8),
                    0 0 10px rgba(255, 166, 76, 0.7),
                    0 0 15px rgba(255, 140, 0, 0.6);
            transform: scale(1);
        }
    }

    .info-btn {
        margin-left: 8px;
        border-radius: 50%;
        width: 26px;
        height: 26px;
        border: none;
        background: #2563eb;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }

    .info-btn:disabled {
        background: #9ca3af;
        cursor: not-allowed;
    }

    /* === ITEM DETAIL BOTTOM SHEET — COMPACT VERSION === */

    .item-detail-modal-overlay {
        position: fixed;
        inset: 0;
        width: 100%;
        background: rgba(0,0,0,0.35);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 1000001;
    }

    .item-detail-modal-box {
        width: 50%;
        max-width: 100px;               /* smaller width */
        margin: 0 auto;
        background: #ffffff;
        border-radius: 16px 16px 0 0;
        padding: 8px 14px 12px;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.25);
        max-height: 35vh;               /* 🔥 smaller height */
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.22s ease-out;
    }

    .item-detail-modal-box.open {
        transform: translateY(0);
    }

    .item-detail-handle {
        width: 32px;                    /* smaller */
        height: 4px;
        border-radius: 999px;
        background: #d1d5db;
        margin: 4px auto 6px;
    }

    /* Header */
    .item-detail-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 6px;
    }

    .item-detail-title {
        font-size: 14px;                /* smaller text */
        font-weight: 600;
        margin: 0;
    }

    .item-detail-close {
        border: none;
        background: transparent;
        font-size: 20px;                /* smaller X */
        cursor: pointer;
    }

    /* Image */
    .item-detail-image-wrapper {
        width: 100%;
        height: 90px;                   /* 🔥 smaller image */
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 6px;
        background: #f3f4f6;
    }

    .item-detail-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Section titles */
    .item-detail-section-title {
        font-size: 11px;                /* smaller */
        font-weight: 700;
        margin-top: 6px;
        margin-bottom: 2px;
        text-transform: uppercase;
        color: #6b7280;
    }

    /* Content text */
    .item-detail-text {
        font-size: 12px;                /* smaller */
        margin: 0;
        color: #111827;
    }

    .item-detail-allergens {
        font-size: 11px;
        margin-top: 6px;
        color: #b91c1c;
        font-weight: 600;
    }
    .site-footer {
        flex-shrink: 0;
        text-align: center;
        position: sticky;
        bottom: 0;
        margin-top: 100px;
        padding: 15px 10px;
        font-size: 14px;
        color: #555;
        border-top: 1px solid #eee;
        background: #ffffffcc; /* slight white so it’s readable */
    }

    .site-footer a {
        color: #2563eb;
        text-decoration: none;
        margin: 0 4px;
    }

    /* Quantity Button Wrapper */
    .qty-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* PLUS / MINUS BUTTONS — CIRCULAR + LIGHT BLUE BACKGROUND */
    .qty-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: #dbeafe;             /* Light Blue (Tailwind: blue-100) */
        font-size: 20px;
        font-weight: 700;
        color: #1e40af;                  /* Deep Blue Text */
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.18s ease-in-out;
        box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25); /* Soft deep-blue shadow */
    }

    /* Hover effect */
    .qty-btn:hover:not(:disabled) {
        background: #bfdbfe;             /* Slightly darker blue */
        transform: scale(1.07);
    }

    /* Tap/Click effect */
    .qty-btn:active:not(:disabled) {
        transform: scale(0.93);
        background: #93c5fd;
    }

    /* Disabled state */
    .qty-btn:disabled {
        background: #e5e7eb;             /* Light gray */
        color: #9ca3af;
        cursor: not-allowed;
        box-shadow: none;
    }

    /* Quantity Number */
    .qty-display {
        font-size: 20px;
        font-weight: 700;
        min-width: 28px;
        text-align: center;
        color: #1e3a8a;                  /* Blue-800 */
    }

}


