/* Component Styles: Modals, Slide-Out Cart Drawer, Floating Mobile Actions & Toasts */

/* Backdrop Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition, all 0.3s ease);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.modal-open {
    overflow: hidden !important;
}

/* Modals */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 92%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-surface, #11131a);
    border: 1px solid var(--border-hover, rgba(245, 184, 46, 0.3));
    border-radius: var(--radius-lg, 18px);
    padding: 26px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition, all 0.3s ease);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    box-sizing: border-box;
}

.modal-overlay.active + .modal-content,
.modal-content.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-dark, rgba(255,255,255,0.08));
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-yellow, #f5b82e);
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition, all 0.2s ease);
}

.close-btn:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
}

/* Slide-out Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -105%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--bg-surface, #0f0f14);
    border-left: 1px solid var(--border-dark, rgba(255,255,255,0.08));
    z-index: 2002;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -15px 0 40px rgba(0,0,0,0.85);
    box-sizing: border-box;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-dark, rgba(255,255,255,0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card, #14161f);
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-dark, rgba(255,255,255,0.06));
    position: relative;
    transition: background 0.2s;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #1c1c24;
    border: 1px solid rgba(255,255,255,0.08);
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 0.88rem;
    color: var(--primary-yellow, #f5b82e);
    font-weight: 800;
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1c1e28;
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary-yellow, #f5b82e);
    color: #000000;
    border-color: var(--primary-yellow, #f5b82e);
}

.qty-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    min-width: 22px;
    text-align: center;
}

/* Remove Item Button */
.cart-item-remove-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
    margin-left: 4px;
    flex-shrink: 0;
}

.cart-item-remove-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
    color: #ff5e5e;
    transform: scale(1.1);
}

.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-dark, rgba(255,255,255,0.08));
    background: var(--bg-card, #14161f);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.cart-total-row span:last-child {
    color: var(--primary-yellow, #f5b82e);
    font-weight: 800;
    font-size: 1.35rem;
}

/* Forms - Mobile Friendly (min 16px to prevent iOS auto-zoom) */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #141620;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    outline: none;
    transition: var(--transition, all 0.2s ease);
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary-yellow, #f5b82e);
    box-shadow: 0 0 0 3px rgba(245, 184, 46, 0.15);
}

/* Toast Alerts - Modern Sleek Notification Pill */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
    width: 90%;
    max-width: 480px;
}

.toast {
    background: rgba(15, 15, 20, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 184, 46, 0.35);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 184, 46, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(-25px) scale(0.96);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-icon-badge {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: rgba(245, 184, 46, 0.12);
    border: 1px solid rgba(245, 184, 46, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.toast-error .toast-icon-badge {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.toast-content-box {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    text-align: left;
}

.toast-sub-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-yellow, #ffc107);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.toast-msg-text {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-action-btn {
    background: var(--primary-yellow, #ffc107);
    color: #000000;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 184, 46, 0.3);
}

.toast-action-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    color: #ffffff;
}

.toast-action-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

/* Floating Direct Call Widget */
.floating-call-widget {
    position: fixed;
    bottom: 24px;
    right: 22px;
    z-index: 1500;
}

.floating-call-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f5b82e 0%, #d49010 100%);
    color: #000000;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    padding: 13px 22px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(245, 184, 46, 0.45), 0 4px 15px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-call-btn:hover {
    transform: translateY(-4px) scale(1.05);
    background: #ffffff;
    color: #000000;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4);
    border-color: #ffffff;
}

.floating-call-btn:active {
    transform: scale(0.96);
}

.call-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: #f5b82e;
    opacity: 0.6;
    animation: callPulse 2s infinite ease-out;
    z-index: -1;
    pointer-events: none;
}

.call-pulse-ring.pulse-delay {
    animation-delay: 0.85s;
}

@keyframes callPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.4, 1.6); opacity: 0; }
}

.call-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.call-svg-icon {
    animation: phoneRing 2.5s infinite ease-in-out;
}

@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
}

/* Order Success Modal & Call Action */
.order-success-modal {
    background: #0d0d12 !important;
    border: 1px solid rgba(245, 184, 46, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 184, 46, 0.15) !important;
    border-radius: 20px !important;
}

.order-success-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 213, 115, 0.22) 0%, rgba(46, 213, 115, 0.08) 100%);
    border: 2.5px solid #2ed573;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: iconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 30px rgba(46, 213, 115, 0.35);
}

@keyframes iconPop {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}

.order-call-prompt-box {
    background: #14141a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px 18px;
    margin: 18px 0;
}

.order-direct-call-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 10px;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(245, 184, 46, 0.35);
    transition: all 0.25s ease;
}

.order-direct-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 184, 46, 0.5);
}

.btn-green-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    padding: 13px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
}

.btn-green-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #28e16d 0%, #149c8c 100%);
}

@media (max-width: 576px) {
    .floating-mobile-actions {
        bottom: 14px;
        right: 14px;
        gap: 8px;
    }
    .floating-action-btn {
        width: 44px;
        height: 44px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
    }
    .floating-action-btn svg {
        width: 20px;
        height: 20px;
    }
    .modal-content {
        padding: 20px 16px;
        width: 94vw;
        max-height: 90vh;
        border-radius: 14px;
    }
    .form-input, .form-select, .form-textarea {
        font-size: 16px !important; /* Prevents auto-zoom on iOS */
    }
    .cart-drawer {
        width: 100vw;
        max-width: 100vw;
    }
}

/* ========================================================
   Dish Customization & Add to Cart Modal (Image 1 Style)
   ======================================================== */
.dish-custom-modal {
    max-width: 820px !important;
    width: 94% !important;
    padding: 0 !important;
    background: #0f1017 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95) !important;
    z-index: 2001 !important;
}

.dish-modal-close-btn {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    transition: all 0.2s ease !important;
}

.dish-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.6) !important;
    transform: scale(1.08) !important;
}

.dish-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    min-height: 420px;
}

.dish-modal-img-wrap {
    background: radial-gradient(circle at center, #1a1c27 0%, #08080c 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dish-modal-img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    max-height: 480px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.dish-modal-desc-box {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(245, 184, 46, 0.05);
    border: 1px solid rgba(245, 184, 46, 0.22);
    border-left: 3px solid var(--primary-yellow, #f5b82e);
    border-radius: 10px;
}

.dish-modal-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    margin: 0;
}

.dish-modal-details {
    padding: 28px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-modal-header {
    margin-bottom: 20px;
    padding-right: 32px;
}

.dish-modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.dish-modal-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-yellow, #f5b82e);
}

.dish-modal-options-card {
    background: #141620;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.dish-modal-options-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.options-label-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.options-req-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 2px 8px;
    border-radius: 50px;
}

.dish-modal-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dish-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dish-option-row:hover,
.dish-option-row.active {
    background: rgba(245, 184, 46, 0.08);
    border-color: var(--primary-yellow, #f5b82e);
}

.option-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.option-row-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-price-diff {
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
}

.dish-option-row.active .option-price-diff {
    color: var(--primary-yellow, #f5b82e);
}

.custom-radio-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-radio-input:checked {
    border-color: var(--primary-yellow, #f5b82e);
    background: var(--primary-yellow, #f5b82e);
    box-shadow: inset 0 0 0 3px #141620;
}

.dish-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dish-modal-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-yellow, #f5b82e);
    border: none;
    color: #000000;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.modal-qty-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(245, 184, 46, 0.4);
}

.modal-qty-val {
    width: 34px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.dish-modal-add-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 22px;
    border-radius: 50px;
    font-size: 0.98rem;
    font-weight: 800;
    background: var(--primary-yellow, #f5b82e);
    color: #000000;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(245, 184, 46, 0.35);
}

.dish-modal-add-btn:hover {
    background: #ffc93c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 184, 46, 0.5);
}

@media (max-width: 680px) {
    .dish-custom-modal {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    .dish-modal-grid {
        grid-template-columns: 1fr !important;
        min-height: auto;
    }
    .dish-modal-img {
        height: 220px !important;
        min-height: 220px !important;
    }
    .dish-modal-details {
        padding: 20px 16px !important;
    }
    .dish-modal-title {
        font-size: 1.35rem !important;
    }
}

/* ========================================================
   Food Card Quantity Controls (Image 2 Style)
   ======================================================== */
.food-card-action-wrap {
    width: 100%;
    margin-top: 14px;
}

.food-card-qty-ctrl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.card-qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-yellow, #f5b82e);
    border: none;
    color: #000000;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.card-qty-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(245, 184, 46, 0.5);
}

.card-qty-count {
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
}

/* Booking Guest & Select Dropdown Styling */
.form-select option {
    background-color: #141620 !important;
    color: #ffffff !important;
    padding: 10px 14px;
    font-size: 15px;
}
