/**
 * Ledech Kiosk - Menu Screen Styles V2
 * Redesigned with sidebar layout matching restaurants screen
 */

/* ========== Screen Layout ========== */
#menu-screen {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    color: var(--text-dark);
    overflow: hidden;
}

/* ========== Menu Banner ========== */
.menu-banner {
    border-radius: 0 0 2rem 2rem;
    /* Only bottom corners rounded */
}

/* ========== Sidebar Bubble Animation ========== */
#menu-screen #active-bubble {
    position: absolute;
    left: 0;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #0055ff 0%, #00ccff 100%);
    border-radius: 50%;
    z-index: 0;
    transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        height 0.3s ease,
        opacity 0.3s ease,
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 85, 255, 0.3), 0 4px 6px -2px rgba(0, 85, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    transform-origin: center;
}

#menu-screen #active-bubble.visible {
    opacity: 1;
}

#menu-screen #active-bubble.bubble-moving {
    transform: scaleX(0.85) scaleY(1.15);
}

#menu-screen .filter-tab {
    position: relative;
    z-index: 1;
    background: transparent !important;
    transition: transform 0.2s ease;
}

#menu-screen .filter-tab:active {
    transform: scale(0.95);
}

/* ========== Product Cards (New Style) ========== */
.menu-product-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-product-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.menu-product-card.featured {
    border: 2px solid rgba(0, 85, 255, 0.15);
}

.menu-product-image {
    width: 100%;
    aspect-ratio: 16/12;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.menu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-product-placeholder .material-symbols-outlined {
    font-size: 3rem;
    color: #cbd5e1;
}

.menu-product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.product-badge-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.menu-product-info {
    padding: 0.5rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0055ff;
}

.menu-add-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0055ff 0%, #00ccff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 85, 255, 0.3);
}

.menu-add-btn:active {
    transform: scale(0.9);
}

.menu-add-btn .material-symbols-outlined {
    font-size: 1.25rem;
    color: white;
}

/* ========== Cart Bar (Floating Style) ========== */
.cart-bar-floating {
    position: fixed;
    bottom: 6rem;
    /* Above footer */
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    animation: cart-bar-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-bar-floating.hidden {
    display: none;
}

@keyframes cart-bar-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cart-bar-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #0055ff 0%, #00a8ff 100%);
    padding: 0.75rem 1rem 0.75rem 1.25rem;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(0, 85, 255, 0.35),
        0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 320px;
}

.cart-bar-icon {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar-icon .material-symbols-outlined {
    font-size: 1.5rem;
    color: white;
}

.cart-bar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.25rem;
    height: 1.25rem;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid #0055ff;
}

.cart-bar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cart-bar-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cart-bar-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

.cart-bar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #0055ff;
    padding: 0.75rem 1.25rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-bar-btn:active {
    transform: scale(0.95);
    background: #f0f7ff;
}

.cart-bar-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* ========== Added to Cart Toast ========== */
.added-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 200;
}

.added-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.added-toast .material-symbols-outlined {
    font-size: 1.75rem;
    color: #22c55e;
}

/* ========== Empty Products ========== */
.products-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.products-empty .material-symbols-outlined {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.products-empty p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ========== Grid Animations ========== */
.grid-anim-item {
    opacity: 0;
    transform: translateY(20px);
    animation: grid-fade-in 0.5s ease forwards;
}

@keyframes grid-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Responsive ========== */
@media screen and (max-width: 1280px) {
    .cart-bar-content {
        min-width: 280px;
    }
}

@media screen and (min-width: 1920px) {
    .menu-product-image {
        aspect-ratio: 3/2;
    }
}

/* ========== Addon Modal ========== */
.addon-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.addon-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.addon-modal {
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    background: white;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.addon-modal-overlay.visible .addon-modal {
    transform: translateY(0) scale(1);
}

/* Header */
.addon-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.addon-modal-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.addon-modal-product-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.addon-modal-product-placeholder {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.addon-modal-product-placeholder .material-symbols-outlined {
    font-size: 2rem;
    color: #94a3b8;
}

.addon-modal-product-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.addon-modal-base-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0055ff;
}

.addon-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.addon-modal-close:active {
    transform: scale(0.9);
    background: #f1f5f9;
}

.addon-modal-close .material-symbols-outlined {
    font-size: 1.25rem;
    color: #64748b;
}

/* Body */
.addon-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Addon Group */
.addon-group {
    padding: 0.5rem 1rem;
}

.addon-group:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.addon-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.addon-group-icon {
    font-size: 1.25rem;
}

.addon-group-icon.text-orange-500 {
    color: #f97316;
}

.addon-group-icon.text-green-500 {
    color: #22c55e;
}

.addon-group-title {
    flex: 1;
}

.addon-group-title h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.addon-group-type {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.addon-group-required {
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    background: #ef4444;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

/* Addon Items */
.addon-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.addon-item.added {
    background: #f0fdf4;
    border-color: #22c55e;
}

.addon-item.removed {
    background: #fef2f2;
    border-color: #ef4444;
    opacity: 0.7;
}

.addon-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.addon-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.addon-item-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0055ff;
}

.addon-item-included {
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 600;
}

/* Toggle Button */
.addon-item-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s ease;
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.addon-item-toggle .material-symbols-outlined {
    font-size: 1rem;
}

.addon-item-toggle.added {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.addon-item-toggle.included {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.addon-item-toggle.removed {
    background: white;
    color: #22c55e;
    border-color: #22c55e;
}

.addon-item-toggle:active {
    transform: scale(0.95);
}

/* Footer */
.addon-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 1rem;
}

.addon-modal-total {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.addon-modal-total span:first-child {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.addon-modal-total span:last-child {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.addon-modal-add-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0055ff 0%, #00ccff 100%);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.15s ease;
    box-shadow: 0 4px 15px rgba(0, 85, 255, 0.35);
}

.addon-modal-add-btn:active {
    transform: scale(0.95);
}

.addon-modal-add-btn .material-symbols-outlined {
    font-size: 1.25rem;
}