/* 
 * DineMate Main Stylesheet
 * This file contains custom styles for the DineMate application
 */

/* Base Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #292f36;
    --light-color: #f7f7f7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --border-radius: 10px;
    --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.navbar-brand span {
    color: var(--secondary-color);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    margin-left: 5px;
    padding: 8px 12px !important;
    border-radius: 5px;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 107, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 107, 107, 0.15);
    font-weight: 600;
}

/* Main Content */
main {
    flex: 1 0 auto;
    padding: 0;
}

.container {
    max-width: 1080px; /* Reduced from 1080px to create sidebar space for ads */
}

/* Hero Section */
.hero-section {
    background-color: var(--dark-color);
    background-image: linear-gradient(rgba(41, 47, 54, 0.8), rgba(41, 47, 54, 0.9)), url('https://source.unsplash.com/1600x900/?restaurant,food');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0 140px;
    text-align: center;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 0.8s ease;
}

.hero-section p.lead {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 1rem auto 0;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Search Container */
.search-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 35px;
    margin-top: -70px;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease 0.5s both;
}

.input-section {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.input-section .form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-section .input-group {
    margin-bottom: 1rem;
}

.input-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.8);
}

#map {
    height: 100%;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: none;
    min-height: 350px;
}

/* Form styling */
.form-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Input Groups */
.input-group .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #6c757d;
}

.input-group .form-select:focus,
.input-group .form-control:focus {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 107, 0.25);
}

.location-input-group {
    position: relative;
}

#current-location-btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 6px;
}

.btn-primary:hover {
    background-color: #ff5252;
    border-color: #ff5252;
}

.search-button {
    height: calc(100% - 1.5rem);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}


.search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

/* Button Outlines */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Loading Indicator */
#loading-indicator {
    text-align: center;
    padding: 40px 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Results Section */
#results-section {
    padding: 20px 0;
}

.restaurant-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    overflow: hidden;
}

.restaurant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.restaurant-image {
    height: 200px;
    object-fit: cover;
}

.restaurant-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

.restaurant-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.restaurant-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.restaurant-address {
    font-size: 0.9rem;
    color: #666;
}

.restaurant-cuisine {
    font-size: 0.9rem;
}

.restaurant-status {
    font-weight: 500;
    font-size: 0.9rem;
}

.restaurant-status.open {
    color: #4CAF50;
}

.restaurant-status.closed {
    color: #F44336;
}

.restaurant-hours {
    max-height: 200px;
    overflow-y: auto;
}

.restaurant-hours-list {
    font-size: 0.85rem;
}

.restaurant-hours-day {
    font-weight: 500;
}

.restaurant-hours-time {
    color: #666;
}

.restaurant-price {
    font-weight: 500;
}

.restaurant-distance {
    font-size: 0.9rem;
    color: #666;
}

.restaurant-recommendation {
    font-style: italic;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.restaurant-footer {
    padding: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

/* Map Error Styling */
#map-error {
    border-radius: 8px;
    background-color: rgba(255, 235, 238, 0.9);
    border: 1px solid #FFCDD2;
    color: #C62828;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Sort Options */
.sort-option {
    cursor: pointer;
}

.sort-option:hover {
    background-color: #f8f9fa;
}

/* Media Queries */
@media (max-width: 767.98px) {
    .row.mb-4 {
        margin-bottom: 0 !important;
    }
    
    .col-md-6 {
        margin-bottom: 1rem;
    }
    
    #map {
        min-height: 250px;
    }
    
    .restaurant-footer {
        justify-content: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p.lead {
        font-size: 1.1rem;
    }
    
    .input-section {
        height: auto !important;
    }
    
    .input-group {
        margin-bottom: 0.75rem;
    }
    
    .search-button {
        height: auto;
        margin-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .restaurant-meta {
        flex-direction: column;
    }
    
    .hero-section {
        padding: 60px 0 100px !important;
    }
    
    .search-container {
        padding: 20px !important;
        margin-top: -50px;
    }
}

/* Language Selection */
.language-selector {
    margin-left: 1rem;
}

/* Custom select for cuisine and dining style */
#custom_cuisine,
#custom_dining_style {
    margin-top: 0.5rem;
}

/* Accessibility */
:focus {
    outline: 3px solid rgba(78, 205, 196, 0.5);
}

/* Print Styles */
@media print {
    .navbar, .footer, .search-container {
        display: none;
    }
    
    #results-section {
        display: block !important;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Developer Section */
.developer-links {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 10px;
}

.developer-links a {
    padding: 5px 10px;
    border-radius: 20px;
    transition: var(--transition);
}

.developer-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Language Indicator */
.language-indicator {
    display: inline-block;
    padding: 5px 0;
}

.language-indicator .badge {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.language-dropdown {
    max-height: 300px;
    overflow-y: auto;
}

/* Restaurant Hours */
.restaurant-hours {
    font-size: 0.85rem;
}

.restaurant-hours h6 {
    font-weight: 600;
    color: var(--primary-color);
}

.hours-item {
    padding: 4px 0;
    border-bottom: 1px dotted #eee;
}

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

/* Restaurant Details */
.restaurant-cuisine,
.restaurant-distance {
    color: #666;
    font-size: 0.9rem;
}

.restaurant-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.restaurant-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.restaurant-recommendation {
    font-size: 0.9rem;
    font-style: italic;
    background-color: rgba(78, 205, 196, 0.1);
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}

/* Search results controls */
#results-controls {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-border-color);
    margin-bottom: 20px;
    align-items: center;
}

#results-controls h3 {
    margin-bottom: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sort-option {
    cursor: pointer;
}

.sort-option:hover {
    background-color: var(--light-bg-color);
}

.sort-option.active {
    background-color: var(--primary-color);
    color: white;
}

/* Additional styles for the more visual, interactive design */

/* More emphasis on icons */
.input-group-text i {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

/* Make buttons more interactive */
.search-button {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.search-button:active {
    transform: translateY(1px);
}

/* Make cards more interactive */
.restaurant-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.restaurant-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Nicer input sections */
.input-section {
    transition: all 0.3s ease;
    background-color: white;
}

.input-section:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

/* Add subtle animation to map container */
#map {
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

#map:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* More compact form controls */
.form-select-sm {
    padding-right: 2rem;
}

/* Better dropdown indicators for selects */
.form-select {
    background-position: right 0.5rem center;
}

/* Make sort icons more visible */
.dropdown-item i.fas {
    opacity: 0.7;
}

.dropdown-item:hover i.fas {
    opacity: 1;
}

/* Subtle animations for interactive elements */
.input-group, .form-select, .form-control, .btn {
    transition: all 0.2s ease;
}

.input-group:hover, .form-select:hover, .form-control:hover {
    transform: translateY(-1px);
}

/* Improved focus states */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.25);
    border-color: var(--primary-color);
}

/* Cookie Consent Banner (commented out - Google AdSense provides its own) */
/*
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 1rem 0;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent-banner p {
    margin: 0;
    font-size: 0.95rem;
}

.cookie-consent-banner .btn-link {
    color: #fff;
    text-decoration: underline;
    padding: 0.375rem 0.75rem;
}

.cookie-consent-banner .btn-primary {
    margin-left: 0.5rem;
}
*/

/* Footer Styles */
.footer {
    background-color: rgba(248, 249, 250, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
}

.footer h5 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.footer .footer-links a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

.footer .footer-links a:hover {
    color: var(--primary-color);
}

.footer hr {
    margin: 1rem 0;
    opacity: 0.1;
}

.footer .copyright {
    color: #6c757d;
    font-size: 0.875rem;
}

.footer .contact-email {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer .contact-email:hover {
    opacity: 0.8;
} 

.dinemate-bmc-btn:hover, .dinemate-bmc-btn:focus {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.18);
} 

.alert {
    margin-top: 2rem !important;
    z-index: 1050;
    position: relative;
    transition: opacity 0.15s linear;
}

.alert.fade {
    opacity: 0;
}

.alert.fade.show {
    opacity: 1;
} 
  