/**
 * 7Seven Days Family Restaurant - Cart & Floating Buttons Stylesheet
 * STRICT REQUIREMENT: Floating WhatsApp is at BOTTOM-LEFT. Floating Cart is at BOTTOM-RIGHT.
 */

/* ==========================================================================
   1. FLOATING WHATSAPP BUTTON (STRICTLY BOTTOM-LEFT)
   ========================================================================== */
.whatsapp-floating-wrapper {
    position: fixed;
    left: 24px;
    bottom: 24px;
    right: auto;
    z-index: 1000;
}

.whatsapp-floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    background-color: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.whatsapp-svg-icon {
    width: 34px;
    height: 34px;
    fill: #FFFFFF;
    position: relative;
    z-index: 2;
}

/* Pulsing Ripple Animation */
.whatsapp-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    z-index: 1;
    animation: whatsappPulseAnim 2s infinite ease-out;
}

@keyframes whatsappPulseAnim {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Tooltip on Hover */
.whatsapp-tooltip {
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    background: #151515;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.whatsapp-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #151515 transparent transparent;
}

.whatsapp-floating-btn:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   2. FLOATING CART BUTTON (STRICTLY BOTTOM-RIGHT)
   ========================================================================== */
.cart-floating-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: auto;
    z-index: 990;
    background: #C91F28;
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9375rem;
    box-shadow: 0 8px 24px rgba(201, 31, 40, 0.45);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.cart-floating-btn:hover {
    background: #A6131B;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 28px rgba(201, 31, 40, 0.6);
}

.cart-floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-floating-badge {
    background: #F8B400;
    color: #151515;
    font-size: 0.8125rem;
    font-weight: 900;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    padding: 0 6px;
}

/* ==========================================================================
   3. SLIDE-OUT CART DRAWER & OVERLAY
   ========================================================================== */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 430px;
    max-width: 100vw;
    height: 100%;
    background: #FFFFFF;
    z-index: 1250;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.35);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
    right: 0;
}

/* Header */
.cart-drawer-header {
    background: #151515;
    color: #FFFFFF;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #C91F28;
}

.cart-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-title-wrap svg {
    color: #F8B400;
}

.cart-drawer-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0;
}

.cart-drawer-count {
    background: #C91F28;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cart-close-btn:hover {
    background: #C91F28;
    transform: rotate(90deg);
}

/* Body */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #F9FAFB;
}

/* Empty State */
.cart-empty-state {
    text-align: center;
    padding: 40px 10px;
}

.cart-empty-icon {
    margin-bottom: 16px;
}

.cart-empty-state h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
    margin-bottom: 8px;
}

.cart-empty-state p {
    color: #6B7280;
    font-size: 0.9375rem;
    margin-bottom: 24px;
}

/* Items List */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.cart-item-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: border-color 0.2s ease;
}

.cart-item-card:hover {
    border-color: #C91F28;
}

.cart-item-thumb {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #151515;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    padding-right: 20px;
}

.cart-item-variant {
    font-size: 0.775rem;
    color: #C91F28;
    font-weight: 700;
    margin: 2px 0 6px;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-item-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9375rem;
    color: #111827;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    overflow: hidden;
    background: #F3F4F6;
}

.cart-qty-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    color: #374151;
}

.cart-qty-btn:hover {
    background: #E5E7EB;
}

.cart-qty-val {
    width: 24px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #DC2626;
}

/* Checkout Details Form in Drawer */
.cart-checkout-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 18px;
    margin-top: 10px;
}

.cart-section-divider {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111827;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #F3F4F6;
}

.cart-form .form-group {
    margin-bottom: 12px;
}

.cart-form .form-label {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
}

.cart-form .form-control {
    font-size: 0.875rem;
    padding: 8px 12px;
}

.cart-disclaimer-box {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 14px;
}

.cart-disclaimer-box svg {
    color: #D97706;
    flex-shrink: 0;
    margin-top: 2px;
}

.cart-disclaimer-box p {
    font-size: 0.775rem;
    color: #92400E;
    line-height: 1.45;
    margin: 0;
}

/* Drawer Footer */
.cart-drawer-footer {
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 18px 24px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cart-summary-label {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
}

.cart-summary-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    color: #C91F28;
}

.cart-delivery-note {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 14px;
    text-align: right;
}

.btn-whatsapp-order {
    background: #25D366;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 20px;
    border-radius: 9999px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-whatsapp-order:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
}

.btn-clear-cart {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 10px;
    text-align: center;
    padding: 4px;
}

.btn-clear-cart:hover {
    color: #DC2626;
}

/* ==========================================================================
   4. MOBILE RESPONSIVENESS (NO OVERLAP)
   ========================================================================== */
@media (max-width: 768px) {
    /* WhatsApp remains strictly on the bottom left */
    .whatsapp-floating-wrapper {
        left: 16px;
        bottom: 16px;
        right: auto;
    }

    .whatsapp-floating-btn {
        width: 54px;
        height: 54px;
    }

    .whatsapp-svg-icon {
        width: 30px;
        height: 30px;
    }

    /* Floating Cart remains strictly on the bottom right */
    .cart-floating-btn {
        right: 16px;
        bottom: 16px;
        left: auto;
        padding: 10px 16px;
    }

    .cart-floating-text {
        display: none; /* Just icon + badge on smaller screens */
    }

    .cart-drawer {
        width: 100%;
    }
}

