/* Menu Selection and Drawer Styles */

/* Selection Highlighting */
.menu-item-price-cell {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item-price-cell:hover {
    background-color: #f0f0f0;
}

.menu-item-price-cell.selected {
    background-color: #d4edda;
    font-weight: 600;
    box-shadow: inset 0 0 0 2px #28a745;
}

.menu-item-price-cell.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Tooltip for selection explanation */
.selection-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 300px;
}

.selection-tooltip.show {
    opacity: 1;
}

.selection-tooltip.hide-notification {
    opacity: 0;
    pointer-events: none;
}

/* Right Sidebar Drawer */
.selection-drawer-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background-color: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.selection-drawer-overlay.open {
    transform: translateX(0);
}

/* Menu Navigation Button (Sticky Left) */
.menu-nav-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 0.65rem;
    z-index: 998;
    transition: all 0.3s ease;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
}

.menu-nav-btn:hover {
    width: 60px;
    background-color: #4f46e5;
    text-decoration: none;
    color: white;
}

.menu-nav-btn i {
    font-size: 1.2rem;
}

.menu-nav-btn span {
    font-weight: 600;
    line-height: 1;
}

/* Drawer Toggle Button */
.drawer-toggle-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 0.75rem;
    z-index: 998;
    transition: all 0.3s ease;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.drawer-toggle-btn:hover {
    width: 60px;
    background-color: #0056b3;
}

.drawer-toggle-btn .count {
    font-size: 1.2rem;
    font-weight: bold;
}

.drawer-toggle-btn .total {
    font-size: 0.7rem;
}

/* Drawer Header */
.drawer-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
}

.drawer-header h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.drawer-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.drawer-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-summary-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.drawer-summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

/* Filter Tabs */
.drawer-filters {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background-color: white;
}

.filter-tab {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background-color: #f3f4f6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background-color: #e5e7eb;
}

.filter-tab.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Drawer Content */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.drawer-content-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
    font-size: 0.95rem;
}

.drawer-content-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Selected Items List */
.selected-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.selected-item:hover {
    background-color: #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.selected-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.selected-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    flex: 1;
}

.selected-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.selected-item-remove:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.selected-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.85rem;
}

.selected-item-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.selected-item-detail-label {
    color: #6b7280;
    font-weight: 500;
}

.selected-item-detail-value {
    color: #111827;
    font-weight: 600;
}

.selected-item-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.selected-item-type-badge.veg {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.selected-item-type-badge.non-veg {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* Drawer Footer */
.drawer-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background-color: #f8fafc;
    display: flex;
    gap: 8px;
}

.drawer-footer-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-footer-btn.clear-btn {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.drawer-footer-btn.clear-btn:hover {
    background-color: #fecaca;
    border-color: #dc2626;
}

.drawer-footer-btn.proceed-btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.drawer-footer-btn.proceed-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.drawer-footer-btn.close-btn {
    background-color: #e5e7eb;
    color: #1f2937;
    border-color: #d1d5db;
}

.drawer-footer-btn.close-btn:hover {
    background-color: #d1d5db;
    border-color: #9ca3af;
}

/* Responsive Design */
@@media (max-width: 1024px) {
    .selection-drawer-overlay {
        width: 350px;
    }
}

@@media (max-width: 768px) {
    .selection-drawer-overlay {
        width: 100%;
        transform: translateX(100%);
    }

    .selection-drawer-overlay.open {
        transform: translateX(0);
    }

    .menu-nav-btn {
        position: fixed;
        left: auto;
        right: 70px;
        top: auto;
        bottom: 80px;
        transform: none;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 12px;
        gap: 6px;
        font-size: 0.7rem;
    }

    .menu-nav-btn:hover {
        width: 56px;
    }

    .drawer-toggle-btn {
        width: 56px;
        height: 56px;
        right: 20px;
        top: auto;
        bottom: 20px;
        transform: none;
        border-radius: 50%;
        padding: 12px;
    }

    .drawer-toggle-btn:hover {
        width: 56px;
    }

    .drawer-toggle-btn .total {
        display: none;
    }

    .drawer-toggle-btn .count {
        font-size: 1.3rem;
    }

    .drawer-header {
        padding: 14px;
    }

    .drawer-header h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .drawer-summary {
        font-size: 0.9rem;
    }

    .drawer-filters {
        padding: 10px 12px;
    }

    .filter-tab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .drawer-content {
        padding: 12px;
    }

    .drawer-footer {
        padding: 12px;
        gap: 6px;
    }

    .drawer-footer-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .selected-item {
        padding: 10px;
    }

    .selected-item-name {
        font-size: 0.9rem;
    }

    .selection-tooltip {
        top: auto;
        bottom: 100px;
        right: 80px;
        left: auto;
        max-width: 250px;
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

@@media (max-width: 480px) {
    .menu-nav-btn {
        right: 60px;
        bottom: 75px;
        width: 50px;
        height: 50px;
        padding: 10px;
        font-size: 0.65rem;
    }

    .drawer-toggle-btn {
        width: 50px;
        height: 50px;
        right: 15px;
        bottom: 15px;
        padding: 10px;
    }

    .drawer-toggle-btn .count {
        font-size: 1.1rem;
    }

    .drawer-header {
        padding: 12px;
    }

    .drawer-header h3 {
        font-size: 1rem;
    }

    .drawer-summary {
        font-size: 0.85rem;
    }

    .drawer-filters {
        padding: 8px 10px;
    }

    .filter-tab {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .drawer-content {
        padding: 10px;
    }

    .drawer-footer {
        padding: 10px;
    }

    .drawer-footer-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .selected-item {
        padding: 8px;
    }

    .selected-item-name {
        font-size: 0.85rem;
    }

    .selection-tooltip {
        bottom: 90px;
        right: 70px;
        max-width: 200px;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .menu-item-price-cell.selected::after {
        font-size: 1rem;
        right: 6px;
    }
}

/* Scrollbar styling for drawer content */
.drawer-content::-webkit-scrollbar {
    width: 6px;
}

.drawer-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.drawer-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
