/*
Theme Name: Nyam
Description: Beautiful liquid glass design for restaurant discovery with enhanced opening hours
Version: 1.1
Author: Bubu & Dudu
*/

/* Disable floating bubbles for performance */
.background-elements {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #1d1d1f;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    transform: none !important;
}

.welcome-page,
.listing-section,
.container,
.restaurants-grid,
.restaurants-list,
.restaurant-card,
.restaurant-list-item {
    transform: none !important;
    will-change: auto !important;
}

/* Animated background bubbles (disabled) */
.floating-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.bubble-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 15%;
    animation-delay: -5s;
}

.bubble-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-40px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* Welcome Page */
.welcome-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.welcome-header {
    padding: 20px 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.welcome-header .header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 12px 24px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.logo:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.welcome-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
}

.welcome-inner {
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.welcome-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 80px;
    font-weight: 400;
}

.destination-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.destination-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    padding: 48px 40px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.destination-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.destination-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.destination-card:hover::before {
    opacity: 1;
}

.destination-card:active {
    transform: translateY(-4px) scale(1.01);
}

.destination-flag {
    font-size: 52px;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.destination-card h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.destination-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 17px;
    line-height: 1.5;
    font-weight: 400;
}

/* Restaurant Listing Styles */
.listing-section {
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

/* Filters Panel */
.filters-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
}

.dropdown-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.dropdown-selected.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    opacity: 0.7;
}

.dropdown-selected.active .dropdown-arrow {
    transform: rotate(180deg);
}

.filters-panel .custom-dropdown .dropdown-options,
.custom-dropdown .dropdown-options {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    
    z-index: 2147483647 !important;
    
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    margin-top: 4px !important;
    
    transform: translate3d(0, 0, 0) !important;
    isolation: isolate !important;
    
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    
    max-height: 240px !important;
    overflow-y: auto !important;
    
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) translate3d(0, 0, 0) !important;
    transition: all 0.3s ease !important;
}

.filters-panel .custom-dropdown .dropdown-options.show,
.custom-dropdown .dropdown-options.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) translate3d(0, 0, 0) !important;
}

.custom-option {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.custom-option.selected {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
}

.dropdown-options .custom-option:first-child {
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.dropdown-options .custom-option:last-child {
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    border-bottom: none !important;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 20px;
}

.results-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.view-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 4px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

/* Restaurant Cards */
.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.restaurant-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.restaurant-card:hover {
    transform: translateY(-6px) !important;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* Distance Pill (top-right) */
.distance-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.distance-text {
    display: block;
    white-space: nowrap;
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative !important;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-image.no-image .price-badge {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
}

.card-image.cuisine-asian {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.card-image.cuisine-western {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.card-image.cuisine-malaysian {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.price-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    
    /* High contrast background */
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    
    /* Make it larger and more visible */
    padding: 8px 16px !important;
    border-radius: 16px !important;
    
    /* Bold, larger text */
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1d1d1f !important;
    
    /* Ensure it's above everything */
    z-index: 10 !important;
    
    /* Strong border and shadow */
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    
    /* Ensure visibility */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.card-content {
    padding: 24px;
    position: relative;
    z-index: 1;
}

.restaurant-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.cuisine-type {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 12px;
}

/* ENHANCED: Opening Status Styling */
.opening-status {
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

/* Open status - Green */
.opening-status.open {
    background: rgba(34, 197, 94, 0.2);
    color: rgba(34, 197, 94, 1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Closed status - Red */
.opening-status.closed {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* NEW: Closing Soon status - Yellow with pulse animation */
.opening-status.closing-soon {
    background: rgba(245, 158, 11, 0.2);
    color: rgba(245, 158, 11, 1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: closingSoonPulse 2s ease-in-out infinite;
}

/* Subtle pulse animation for closing soon */
@keyframes closingSoonPulse {
    0%, 100% { 
        background: rgba(245, 158, 11, 0.2);
        transform: scale(1);
    }
    50% { 
        background: rgba(245, 158, 11, 0.3);
        transform: scale(1.02);
    }
}

/* Default status (checking/loading) */
.opening-status {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-text {
    display: block;
    font-size: 12px;
}

.quick-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

/* Page transitions */
.page-section {
    transition: all 0.5s ease;
}

.page-section.hidden {
    display: none !important;
}

/* Back button */
.back-btn {
    /* Use position: fixed with !important to override everything */
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    
    /* Style properties */
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    
    /* Maximum z-index to ensure it's on top */
    z-index: 2147483647 !important;
    
    /* Essential properties for fixed positioning */
    display: block !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    
    /* NO TRANSFORMS - this breaks position:fixed */
    transform: none !important;
    
    /* Transition without transform */
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
    
    /* Ensure clickability */
    pointer-events: auto !important;
    cursor: pointer !important;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2) !important;
    /* NO TRANSFORM on hover - use only background/shadow changes */
    transform: none !important;
}

.back-btn:active {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: none !important;
}

/* List View Styles */
.restaurants-list {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.restaurants-list.active {
    display: flex;
}

.restaurants-grid.hidden {
    display: none;
}

.restaurant-list-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.restaurant-list-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Distance info for list view */
.list-distance-info {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

.list-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.list-item-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    text-align: center;
}

.list-item-image.cuisine-asian {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.list-item-image.cuisine-western {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.list-item-image.cuisine-malaysian {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.list-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-info {
    flex: 1;
}

.list-item-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.95);
}

.list-item-cuisine {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.list-item-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 8px;
}

/* ENHANCED: Opening status for list view */
.list-opening-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-align: left;
    display: inline-block;
    transition: all 0.3s ease;
}

.list-opening-status.open {
    background: rgba(34, 197, 94, 0.2);
    color: rgba(34, 197, 94, 1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.list-opening-status.closed {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* NEW: List view closing soon status */
.list-opening-status.closing-soon {
    background: rgba(245, 158, 11, 0.2);
    color: rgba(245, 158, 11, 1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: closingSoonPulse 2s ease-in-out infinite;
}

/* Default list status */
.list-opening-status {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.list-status-text {
    display: block;
    font-size: 10px;
}

.list-item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 20px;
}

.list-item-price {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    color: #1d1d1f;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

.list-action-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.list-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

/* Loading states */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin: 20px 0;
}

.loading-spinner:before {
    content: "ðŸ”„ ";
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* LOADING STATES FOR SORTING */
.restaurants-grid.loading,
.restaurants-list.loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-error {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 16px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.9);
}

.filter-error button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.filter-error button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.filters-reset {
    animation: filterReset 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes filterReset {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.02) rotate(1deg); }
    75% { transform: scale(1.02) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* No results message styling */
.no-results-message {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 40px 0;
    color: rgba(255, 255, 255, 0.8);
}

.no-results-message p {
    font-size: 18px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ENHANCED: Hover effects for closing soon animation */
.restaurant-card:hover .opening-status.closing-soon {
    animation-duration: 1s; /* Faster pulse on hover */
}

.restaurant-list-item:hover .list-opening-status.closing-soon {
    animation-duration: 1s; /* Faster pulse on hover */
}

/* Optional CSS enhancements for the Search Module */
/* Add this to your style.css for better search experience */

/* Search input active state */
.search-input.search-active {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

/* No search results message */
.search-no-results {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 40px 0;
    color: rgba(255, 255, 255, 0.8);
}

.search-no-results p {
    font-size: 18px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Search input placeholder styling */
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Smooth transitions for show/hide search results */
.restaurant-card,
.restaurant-list-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.restaurant-card[style*="display: none"],
.restaurant-list-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Updated toolbar layout with search */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 20px;
}

/* Ensure proper spacing for toolbar controls */
.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Search input container in toolbar */
.toolbar .search-input-container {
    position: relative;
    width: 240px; /* Fixed width for desktop */
}

/* Search input styling */
.toolbar .search-input {
    width: 100%;
    padding: 10px 14px 10px 38px; /* Left padding for icon */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    height: 40px;
    box-sizing: border-box;
}

/* Search input focus state */
.toolbar .search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Search input hover state */
.toolbar .search-input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Search input placeholder */
.toolbar .search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.toolbar .search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Search icon in toolbar */
.toolbar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 2;
}

/* Active search state */
.toolbar .search-input.search-active {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.18);
}

.toolbar .search-input.search-active + .search-icon {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* View controls remain the same but ensure proper spacing */
.view-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 4px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

/* Results info styling */
.results-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    flex-shrink: 0; /* Prevent text from shrinking */
}

.results-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Sort dropdown styling */
.sort-dropdown {
    position: relative;
}

.sort-selected {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: space-between;
}

.sort-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.sort-selected.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.sort-arrow {
    transition: transform 0.3s ease;
    font-size: 10px;
    opacity: 0.7;
}

.sort-selected.active .sort-arrow {
    transform: rotate(180deg);
}

.sort-options {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    
    /* Dynamic width sizing */
    min-width: max(180px, 100%) !important;  /* At least 180px or width of trigger */
    width: max-content !important;            /* Expand to fit content */
    max-width: min(280px, 80vw) !important;   /* Don't exceed screen or reasonable limit */
    
    z-index: 2147483647 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    margin-top: 4px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
}

/* Ensure dropdown shows properly */
.sort-options.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Smart right-edge detection and repositioning */
.toolbar .results-section:last-child .sort-dropdown .sort-options {
    left: auto !important;
    right: 0 !important;
}

.sort-option {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    justify-content: space-between;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.sort-option.selected {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
}

.sort-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.5) !important;
}

.sort-option.disabled:hover {
    background: transparent !important;
}

/* Better status indicator styling */
.sort-status {
    font-size: 10px;
    opacity: 0.7;
    font-style: italic;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.2;
}

/* MOBILE SORT SECTION (hidden on desktop, visible in mobile filter panel) */
.mobile-sort-section {
    display: none; /* Hidden by default on desktop */
    margin-bottom: 20px;
}

.mobile-sort-section .filter-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

/* NO HOURS SECTION STYLING */
.no-hours-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.section-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.no-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* Subtle styling for no-hours cards */
.no-hours-section .restaurant-card {
    opacity: 0.8;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.no-hours-section .restaurant-card:hover {
    opacity: 1;
}

/* SORT DROPDOWN INTERACTION IMPROVEMENTS */
.sort-options .sort-option:first-child {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

.sort-options .sort-option:last-child {
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    border-bottom: none !important;
}

/* Scrollbar styling for sort options (if needed) */
.sort-options::-webkit-scrollbar {
    width: 6px;
}

.sort-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sort-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sort-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ACCESSIBILITY IMPROVEMENTS */
.sort-selected:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.sort-option:focus {
    background: rgba(255, 255, 255, 0.25) !important;
    outline: none;
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) {
    .sort-selected {
        border-color: rgba(255, 255, 255, 0.8);
    }
    
    .sort-options {
        border-color: rgba(255, 255, 255, 0.8) !important;
    }
    
    .sort-option {
        color: rgba(255, 255, 255, 1) !important;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    .sort-selected,
    .sort-options,
    .sort-option {
        transition: none;
    }
    
    .sort-arrow {
        transition: none;
    }
    
    .loading-spinner:before {
        animation: none;
        content: "⏳ ";
    }
}

/* Tablet responsive (medium screens) */
@media (max-width: 1024px) and (min-width: 769px) {
    .toolbar .search-input-container {
        width: 200px; /* Slightly smaller on tablets */
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 44px;
    }

    .welcome-subtitle {
        font-size: 18px;
        margin-bottom: 60px;
    }

    .destination-selection {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .destination-card {
        padding: 36px 28px;
    }

    .destination-card h2 {
        font-size: 28px;
    }

    .destination-card p {
        font-size: 16px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .restaurants-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-content {
        padding: 20px;
    }

    .section-title {
        font-size: 28px;
    }

    /* Mobile opening status adjustments */
    .opening-status {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .status-text {
        font-size: 11px;
    }
    
    .list-opening-status {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .list-status-text {
        font-size: 9px;
    }

    /* Mobile dropdown adjustments */
    .dropdown-options {
        max-height: 200px;
    }

	.back-btn {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
        z-index: 2147483647 !important;
        transform: none !important;
    }
    
    .back-btn:hover {
        transform: none !important;
        background: rgba(255, 255, 255, 0.25) !important;
    }

	.price-badge {
        top: 10px !important;
        left: 10px !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

	/* Filter toggle button (mobile only) */
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 16px;
        padding: 16px 20px;
        margin-bottom: 20px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    .filter-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.18);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    .filter-toggle-btn:active {
        transform: translateY(0);
    }
    
    .filter-toggle-text {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .filter-toggle-icon {
        font-size: 18px;
        transition: transform 0.3s ease;
    }
    
    .filter-toggle-arrow {
        font-size: 14px;
        transition: transform 0.3s ease;
        opacity: 0.7;
    }
    
    /* Rotate arrow when expanded */
    .filters-panel.expanded .filter-toggle-arrow {
        transform: rotate(180deg);
    }
    
    /* Mobile filter panel styles */
    .filters-panel {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-bottom: 20px;
    }
    
    /* Collapsible content container */
    .filters-content {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        padding: 0;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-10px);
    }
    
    /* Expanded state */
    .filters-panel.expanded .filters-content {
        max-height: 800px; /* Adjust based on content */
        opacity: 1;
        padding: 24px;
        transform: translateY(0);
    }
    
    /* Filter grid adjustments for mobile */
    .filters-panel.expanded .filters-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    /* Toolbar adjustments */
    .filters-panel.expanded .toolbar {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* View controls in mobile expanded state */
    .filters-panel.expanded .view-controls {
        align-self: center;
    }
    
    /* Animation for smooth expand/contract */
    .filters-content {
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                   opacity 0.3s ease 0.1s,
                   transform 0.3s ease 0.1s,
                   padding 0.4s ease;
    }
    
    /* Ensure dropdowns work in collapsed state */
    .filters-panel:not(.expanded) .dropdown-options {
        z-index: 999999 !important;
    }
    
    /* Filter indicator (show active filters count when collapsed) */
    .filter-indicator {
        background: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.9);
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        min-width: 20px;
        text-align: center;
    }
    
    .filter-indicator.hidden {
        display: none;
    }

	.toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .toolbar-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Full width search on mobile */
    .toolbar .search-input-container {
        width: 100%;
        order: 1; /* Search appears first on mobile */
    }
    
    /* View controls full width on mobile */
    .view-controls {
        order: 2; /* View controls appear second on mobile */
        justify-content: center;
    }
    
    /* Results info centered on mobile */
    .results-info {
        text-align: center;
        order: 3; /* Results appear last on mobile */
    }

	/* Hide desktop sort dropdown on mobile */
    .sort-dropdown.desktop-sort {
        display: none !important;
    }

    /* Show mobile sort section in filter panel */
    .mobile-sort-section {
        display: block;
    }

    /* Adjust results section for mobile */
    .results-section {
        justify-content: center;
        order: 3; /* Results appear last on mobile */
    }
    
    /* Toolbar adjustments for mobile */
    .toolbar-controls {
        flex-direction: column;
        gap: 12px;
        order: 1;
    }
    
    /* Full width search on mobile */
    .search-input-container {
        width: 100%;
    }
    
    /* View controls full width on mobile */
    .view-controls {
        justify-content: center;
    }
    
    /* Results info centered on mobile */
    .results-info {
        text-align: center;
    }
    
    /* Mobile filter panel enhancements for sorting */
    .filters-panel.expanded .mobile-sort-section {
        display: block;
        margin-bottom: 20px;
    }
	
}

@media (min-width: 769px) {
    .filter-toggle-btn {
        display: none !important;
    }
    
    .filters-content {
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
        padding: 0 !important;
        transform: none !important;
        background: none !important;
        border: none !important;
    }
    
    .filter-indicator {
        display: none !important;
    }

	/* Ensure mobile sort is hidden on desktop */
    .mobile-sort-section {
        display: none !important;
    }
    
    /* Ensure desktop sort is visible */
    .sort-dropdown.desktop-sort {
        display: block !important;
    }	

}

/* Smooth animations for all states */
@keyframes filterSlideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        max-height: 800px;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes filterSlideUp {
    from {
        max-height: 800px;
        opacity: 1;
        transform: translateY(0);
    }
    to {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .filter-toggle-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .filters-panel.expanded .filters-content {
        padding: 20px;
    }
    
    .filters-panel.expanded .filters-grid {
        gap: 14px;
    }
}

@supports (-webkit-touch-callout: none) {
    .back-btn {
        position: fixed !important;
        top: max(20px, env(safe-area-inset-top, 20px)) !important;
        left: max(20px, env(safe-area-inset-left, 20px)) !important;
    }
}

/* Ensure it doesn't interfere with other fixed elements */
.back-btn {
    isolation: isolate; /* Create new stacking context */
}