/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f5f0;
}

/* Color Palette - Food-friendly warm colors */
:root {
    --primary-color: #d4651a;
    --secondary-color: #8b4513;
    --accent-color: #ff6b35;
    --background-light: #f8f5f0;
    --background-white: #ffffff;
    --text-dark: #2c1810;
    --text-light: #666;
    --border-color: #e0d5c7;
    --shadow: rgba(0, 0, 0, 0.1);
    --success-color: #28a745;
    --error-color: #dc3545;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-home-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.header-home-link:hover {
    opacity: 0.8;
}

.logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Social Media Icons */
.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.social-link svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.social-link.tiktok:hover {
    background: rgba(255, 0, 80, 0.2);
    border-color: rgba(255, 0, 80, 0.4);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, rgba(131, 58, 180, 0.2), rgba(253, 29, 29, 0.2), rgba(252, 176, 64, 0.2));
    border-color: rgba(131, 58, 180, 0.4);
}

.social-link.youtube:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
}

/* Header Separator */
.header-separator {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    margin: 0 0.75rem;
    align-self: center;
}

/* Suggest Restaurant Button */
.suggest-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: none;
    font-family: inherit;
}

.suggest-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.suggest-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.suggest-btn svg {
    width: 20px;
    height: 20px;
}

/* Container */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    gap: 1rem;
    padding: 0 1rem;
}

/* Left Panel: Restaurants + Filters */
.left-panel {
    width: 50%;
    background: var(--background-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Filter Section with Food-Inspired Border */
.filter-section {
    background: transparent;
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 1rem;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(212, 101, 26, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Gradient border removed for cleaner transparent look */

.filter-toggle {
    display: none;
    margin-bottom: 1rem;
}

.filter-toggle button {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-toggle button:hover {
    background: var(--secondary-color);
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.filter-group {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.checkbox-group {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.checkbox-item:hover {
    background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    flex: 1;
}

.tag-input-container {
    position: relative;
    width: 100%;
}

.tag-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

.tag-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.tag-suggestions.hidden {
    display: none;
}

.tag-suggestion-item {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.tag-suggestion-item:hover {
    background: var(--background-light);
}

.tag-suggestion-item:last-child {
    border-bottom: none;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    gap: 0.25rem;
}

.selected-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-tag .remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.slider-container {
    width: 100%;
}

.rating-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.rating-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.slider-labels #rating-value {
    font-weight: bold;
    color: var(--primary-color);
}

.modern-clear-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-clear-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-clear-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Clickable Reviewer */
.clickable-reviewer {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.clickable-reviewer:hover {
    color: var(--accent-color);
}

.clickable-city {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.clickable-city:hover {
    color: var(--accent-color);
}

.clickable-location {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.clickable-location:hover {
    color: var(--accent-color);
}

/* Restaurant List Header */
.restaurant-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.restaurant-list-header h2 {
    margin: 0;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-container label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Sort Dropdown */
.sort-dropdown {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 101, 26, 0.1);
}

/* Lazy loading removed - images load normally now */

/* Right Panel: Map */
.right-panel {
    width: 50%;
    background: var(--background-light);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

/* Map Container with Food-Inspired Design */
.map-container {
    height: 100%;
    min-height: 400px;
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(212, 101, 26, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: var(--background-white);
    position: relative;
}

/* Add a subtle food-themed pattern border */
.map-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        var(--primary-color) 0%, 
        var(--accent-color) 25%, 
        var(--primary-color) 50%, 
        var(--accent-color) 75%, 
        var(--primary-color) 100%);
    border-radius: 23px;
    z-index: -1;
    opacity: 0.8;
}

/* Map header removed */

/* Mobile Responsiveness for Map */
@media (max-width: 768px) {
    /* Header responsive */
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .left-panel, .right-panel {
        width: 100%;
    }
    
    .right-panel {
        height: 60vh;
        position: static;
        padding: 1rem;
    }
    
    .map-container {
        border-radius: 15px;
        border-width: 2px;
    }
    
    .map-header h3 {
        font-size: 1.1rem;
    }
    
    /* Stack restaurant header on mobile */
    .restaurant-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .restaurant-list-header h2 {
        margin-bottom: 0;
    }
    
    .sort-container {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Restaurant List Container */
.restaurant-list-container {
    flex: 1;
    padding: 1rem;
    background: var(--background-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.restaurant-list-container h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.restaurant-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex: 1;
}

/* Restaurant Card */
.restaurant-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px var(--shadow);
}

.restaurant-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px var(--shadow);
    border-color: var(--primary-color);
}

.restaurant-card.hidden {
    display: none;
}

.restaurant-thumbnail {
    width: 100%;
    aspect-ratio: 1177 / 1570;
    object-fit: cover;
    background-color: #f0f0f0;
}

.restaurant-info {
    padding: 1rem;
}

.restaurant-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.restaurant-address {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.restaurant-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rating-value {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.rating-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.restaurant-tags {
    margin-bottom: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(212, 101, 26, 0.3);
    transition: transform 0.2s ease;
}

.tag:hover {
    transform: scale(1.05);
}

.clickable-tag {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-tag:hover {
    background: var(--secondary-color);
    transform: scale(1.08);
}

.restaurant-reviewer {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* Map Popup Styles */
.leaflet-popup-content {
    margin: 0.5rem !important;
    line-height: 1.4 !important;
}

.popup-content {
    width: 200px;
    max-width: 200px;
}

.popup-thumbnail {
    width: 100%;
    aspect-ratio: 1177 / 1570;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.popup-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.popup-address {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.popup-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.popup-rating .rating-value {
    margin-right: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.popup-rating .rating-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.popup-links {
    margin-top: 0.75rem;
}

.popup-links a {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    transition: background-color 0.3s;
}

.popup-links a:hover {
    background: var(--secondary-color);
}

.popup-reviewer {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Loading Indicator */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
        border-right: none;
        order: 2;
    }
    
    .right-panel {
        width: 100%;
        position: static;
        height: auto;
        order: 1;
    }
    
    .filter-section {
        position: static;
        margin: 0.5rem;
        border: 3px solid var(--primary-color);
        border-radius: 15px;
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(212, 101, 26, 0.1);
    }
    
    .filter-toggle {
        display: block;
    }
    
    .filter-content {
        display: none;
    }
    
    .filter-content.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .map-container {
        height: 50vh;
        min-height: 300px;
    }
    
    .restaurant-list {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        height: 60px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Compact social icons for small screens */
    .social-link span {
        display: none; /* Hide text labels on very small screens */
    }
    
    .social-link {
        padding: 0.5rem;
        min-width: auto;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .restaurant-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .restaurant-card {
        margin-bottom: 0;
    }
    
    header {
        padding: 1rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .filter-panel {
        padding: 0.75rem;
    }
    
    .restaurant-list-container {
        padding: 1rem;
    }
}

/* Scrollbar Styling */
.checkbox-group::-webkit-scrollbar,
.restaurant-list::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track,
.restaurant-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb,
.restaurant-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover,
.restaurant-list::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Pagination Styles */
.pagination-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-white);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.pagination-btn:disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0.5rem 0.25rem;
}

.pagination-info {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .pagination {
        justify-content: space-between;
        max-width: 100%;
    }
    
    .pagination-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        min-width: 30px;
    }
    
    /* Hide page numbers on very small screens, keep prev/next */
    .pagination-btn:not([onclick*="Previous"]):not([onclick*="Next"]):not(.active) {
        display: none;
    }
    
    .pagination-btn.active {
        display: inline-block;
    }
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: var(--background-white);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    position: relative;
}

.tab-btn:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
}

.hidden-tab {
    display: none !important;
}

/* Tab Content */
.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* Form Container */
.form-container {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 1rem;
}

.form-header {
    margin-bottom: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.back-btn:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-2px);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.form-container h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.form-container p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--background-white);
}

/* Search Container Styles */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container input {
    padding-right: 45px; /* Make room for clear button */
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    color: var(--text-dark);
    background-color: var(--background-light);
}

.clear-search-btn.hidden {
    display: none;
}

.form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-group input[readonly] {
    background: var(--background-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.help-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-style: italic;
    line-height: 1.4;
}

.help-text strong {
    color: var(--text-dark);
    font-style: normal;
}

/* Social Media Account Row */
.social-account-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.social-account-row select {
    flex: 0 0 140px; /* Fixed width for platform selector */
    min-width: 140px;
}

.social-account-row .username-input-container {
    flex: 1; /* Take remaining space */
    position: relative;
    display: flex;
    align-items: center;
}

.username-prefix {
    position: absolute;
    left: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.username-input-container input {
    width: 100%;
    padding-left: 2rem !important;
}

.username-input-container input:disabled {
    background: var(--background-light);
    color: var(--text-light);
    cursor: not-allowed;
}

/* Hide prefix when platform is not selected */
.username-prefix.hidden {
    opacity: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .social-account-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .social-account-row select {
        flex: none;
        width: 100%;
    }
}

/* Search Container */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow);
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--background-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.search-result-address {
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-result-type {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: capitalize;
    margin-top: 0.25rem;
}

.search-loading {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 101, 26, 0.1);
}

.form-group input.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-group input.invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Form Submit Button */
#submitBtn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(212, 101, 26, 0.3);
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 101, 26, 0.4);
}

#submitBtn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result Messages */
.result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.result.success {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.result.error {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid var(--error-color);
    color: var(--error-color);
}

/* reCAPTCHA Container */
#recaptcha-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Responsive Form */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
    }
    
    .form-container h2 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Global Food Tour Map Styles - Match local map styling */
.global-map-container {
    height: 100%;
    min-height: 400px;
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(212, 101, 26, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: var(--background-white);
    position: relative;
    display: flex;
    flex-direction: column;
}

.global-map-container.hidden {
    display: none;
}

/* General hidden class */
.hidden {
    display: none !important;
}

/* Specific hiding for map containers */
.map-container.hidden {
    display: none !important;
}

.global-map-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    flex-shrink: 0;
}

.global-map-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.global-map-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.world-map {
    padding: 0;
    background: #f8f9fa;
    min-height: 300px;
    flex: 1;
    position: relative;
}

.world-map svg {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.world-map .country {
    fill: #e0e0e0;
    stroke: #ffffff;
    stroke-width: 0.5;
    transition: fill 0.3s ease;
}

.world-map .country.visited {
    fill: var(--primary-color);
    opacity: 0.8;
}

.world-map .country.visited:hover {
    fill: var(--primary-dark);
    opacity: 1;
}

.world-map .country:hover {
    fill: #ccc;
}

/* Make attribution smaller on global map */
.world-map .leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    line-height: 1.2;
}

/* Country restaurant popup styling */
.country-restaurant-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-color);
}

.country-restaurant-popup .leaflet-popup-content {
    margin: 0;
    font-family: inherit;
}

.country-restaurant-popup .leaflet-popup-tip {
    border-top-color: var(--primary-color);
}

/* Restaurant cards within popups */
.country-restaurant-popup .restaurant-card.popup-card {
    background: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 12px;
}

.country-restaurant-popup .restaurant-card.popup-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.country-restaurant-popup .restaurant-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.country-restaurants-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Ensure global map container stays styled during interactions */
.global-map-container {
    position: relative;
    z-index: 1;
}

.global-map-container .world-map {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .global-map-header h3 {
        font-size: 1.1rem;
    }
    
    .global-map-header p {
        font-size: 0.8rem;
    }
    
    .world-map {
        padding: 0.5rem;
        min-height: 250px;
    }
    
    .world-map .leaflet-control-attribution {
        font-size: 8px;
        padding: 1px 3px;
    }
}

/* Global Map amCharts Popup Styles - simple override */
#global-map-popup {
    position: absolute;
    z-index: 1000;
    display: none;
    pointer-events: auto;
}