/* Mobile Responsive Styles for DinesX */

/* Global Banner Styles - All Screen Sizes */
.hero-image-container {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

.hero-image {
    border-radius: 1.5rem !important;
}

#topHeroBanner {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

#topHeroBanner .carousel-inner {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

#topHeroBanner .carousel-item {
    border-radius: 1.5rem !important;
}

#bottomCarousel {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

#bottomCarousel .carousel-inner {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

#bottomCarousel .carousel-item {
    border-radius: 1.5rem !important;
}

.bottom-banner-container {
    border-radius: 1.5rem !important;
    overflow: hidden !important;
}

.bottom-banner-image {
    border-radius: 1.5rem !important;
}

/* OpenTable-style Mobile Header (Mobile Only - max-width: 768px) */
.opentable-mobile-header {
    background: #ffffff;
    padding: 1rem;
}

.opentable-mobile-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

/* Top Row: Logo + Open App + Menu */
.opentable-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.opentable-logo-link {
    display: flex;
    align-items: center;
}

.opentable-logo {
    max-width: 100px;
    height: auto;
    max-height: 40px;
    object-fit: contain;
}

.opentable-top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Sign In Button */
.opentable-signin-btn {
    background-color: #28a745;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #28a745;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.opentable-signin-btn:hover {
    background-color: #218838;
    border-color: #218838;
    color: #ffffff;
}

/* Mobile Sign Up Button */
.opentable-signup-btn {
    background-color: #da3743;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #da3743;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.opentable-signup-btn:hover {
    background-color: #c32735;
    border-color: #c32735;
    color: #ffffff;
}

/* Keep old class for backward compatibility */
.opentable-open-app-btn {
    background-color: #da3743;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s ease;
}

.opentable-open-app-btn:hover {
    background-color: #c32735;
    color: #ffffff;
}

.opentable-hamburger-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #2d333f;
    padding: 0.25rem;
    cursor: pointer;
}

.opentable-hamburger-btn:hover {
    color: #da3743;
}

/* Search Row */
.opentable-search-row {
    display: flex;
    flex-direction: column;
}

.opentable-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Date, Time, Person Selectors */
.opentable-selectors {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.opentable-selector-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    background: #f1f2f4;
    padding: 0.5rem 0.625rem;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.opentable-selector-item i {
    color: #2d333f;
    font-size: 0.875rem;
}

.opentable-selector-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #2d333f;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
}

.opentable-selector-input::placeholder {
    color: #6f737b;
}

/* Search Input */
.opentable-search-wrapper {
    display: flex;
    align-items: center;
    background: #f1f2f4;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}

.opentable-search-icon {
    color: #6f737b;
    font-size: 1rem;
}

.opentable-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #2d333f;
}

.opentable-search-input::placeholder {
    color: #6f737b;
}

.opentable-submit-btn {
    background-color: #da3743;
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.opentable-submit-btn:hover {
    background-color: #c32735;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .opentable-mobile-header {
        display: none !important;
    }
}

/* Desktop Logo Styles */
.desktop-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.desktop-logo {
    max-width: 100px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

.desktop-logo-col {
    display: none !important;
}

/* Header Container Fixes */
.container-fluid.padding {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Search Form Styling */
.search-input-wrapper {
    transition: box-shadow 0.3s ease;
    min-height: 50px;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    border-color: #dc3545 !important;
}

.search-input-wrapper .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

/* Hero Banner Section */
.hero-banner-section {
    width: 100%;
    margin: 20px 0;
}

/* Hero Image Responsive */
.hero-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1.5rem;
    box-sizing: border-box;
    background: #f8f9fa;
}

.hero-image {
    height: 50vh;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 1.5rem;
    display: block;
    max-width: 100%;
}

/* Ensure carousel doesn't cause overflow */
.carousel, .carousel-inner, .carousel-item {
    width: 100%;
    box-sizing: border-box;
}

.carousel {
    margin: 0;
    padding: 0;
}

#topHeroBanner {
    border-radius: 1.5rem;
    overflow: hidden;
}

#topHeroBanner .carousel-inner {
    border-radius: 1.5rem;
    overflow: hidden;
}

#topHeroBanner .carousel-item {
    border-radius: 1.5rem;
}

#bottomCarousel {
    border-radius: 1.5rem;
    overflow: hidden;
}

#bottomCarousel .carousel-inner {
    border-radius: 1.5rem;
    overflow: hidden;
}

#bottomCarousel .carousel-item {
    border-radius: 1.5rem;
}

/* Explore DinesX city selector */
.city-selector {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(220, 53, 69, 0.12);
}

.city-selector__header p {
    font-size: 0.95rem;
}

.city-selector__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.city-selector__form {
    margin: 0;
}

.city-pill-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 999px;
    transition: all 0.2s ease-in-out;
}

.city-pill-btn:hover,
.city-pill-btn:focus,
.city-pill-btn:active {
    background: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18);
    outline: none;
}

.city-pill-btn__icon {
    font-size: 0.9rem;
    transition: transform 0.2s ease-in-out;
}

.city-pill-btn:hover .city-pill-btn__icon,
.city-pill-btn:focus .city-pill-btn__icon {
    transform: translateX(4px);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        position: relative;
    }

    /* Ensure all containers fit */
    *, *::before, *::after {
        box-sizing: border-box;
    }

    /* OpenTable Mobile Header Adjustments */
    .opentable-mobile-header {
        padding: 0.75rem;
    }

    .opentable-mobile-container {
        padding: 0.875rem;
    }

    .opentable-selectors {
        gap: 0.375rem;
    }

    .opentable-selector-item {
        padding: 0.4rem 0.5rem;
    }

    .opentable-selector-input {
        font-size: 0.8rem;
    }

    .opentable-open-app-btn {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }

    .opentable-submit-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    /* Restaurant Cards - Text Color Fix */
    .de-item h4,
    .de-item h3,
    .de-item h2,
    .de-item .text,
    .de-item p,
    .feature-box h4,
    .spot-item h4,
    .spot-item h3,
    .card-title,
    .card-text,
    .restaurant-name,
    .restaurant-title {
        color: #000000 !important;
    }

    /* Mobile Header Sizing - Increase height */
    header#topbar,
    header .topbar,
    #topbar {
        min-height: 60px !important;
        padding: 15px 0 !important;
    }

    /* Mobile topbar styling */
    .mobile-topbar-left {
        padding: 12px 0 !important;
        background: rgba(248, 249, 250, 0.9);
        border-radius: 8px;
        margin-bottom: 10px !important;
    }

    .mobile-topbar-left .all-links {
        font-size: 1rem;
        padding: 8px 12px;
        text-decoration: none;
        transition: color 0.3s ease;
        font-weight: 500;
    }

    .mobile-topbar-left .form-select-sm {
        font-size: 1rem;
        padding: 8px 12px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        min-width: 140px;
    }

    /* Hide desktop header */
    .lg-header {
        display: none !important;
    }

    /* Show mobile header with increased padding */
    .mobile-opt {
        display: flex !important;
        padding: 20px 0 !important;
        width: 100%;
        max-width: 100%;
        min-height: 80px;
    }
    
    /* Fix mobile header container */
    .container-fluid.padding {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin: 0;
        max-width: 100%;
    }
    
    /* Logo adjustments for mobile - larger due to increased header size */
    .mobile-logo {
        max-width: 100px;
        max-height: 60px;
    }

    /* Mobile menu buttons spacing - improved for larger header */
    .mobile-opt .d-flex {
        gap: 25px !important;
    }

    .mobile-opt i {
        font-size: 1.5rem !important;
    }

    /* Better mobile header container padding */
    .container-fluid.padding {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Search form mobile adjustments */
    .search-input-wrapper {
        margin-bottom: 15px;
    }
    
    /* Hero banner section mobile */
    .hero-banner-section {
        margin: 15px 0;
        padding: 0;
    }

    .hero-banner-section .container-fluid {
        padding: 0 5px !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100%;
    }

    .hero-banner-section .row {
        margin: 0 !important;
        width: 100%;
    }

    .hero-banner-section .col-12 {
        padding: 0 5px !important;
        width: 100%;
    }

    /* Hero image mobile height and responsiveness */
    #topHeroBanner {
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 280px;
    }

    #topHeroBanner .carousel-inner {
        width: 100% !important;
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    #topHeroBanner .carousel-item {
        width: 100% !important;
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    #topHeroBanner .hero-image-container {
        width: 100% !important;
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 1.5rem !important;
        overflow: hidden !important;
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #topHeroBanner .hero-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 1.5rem !important;
    }
    
    /* Explore section mobile spacing */
    .city-selector {
        padding: 1.75rem 1.25rem;
        border-radius: 1.25rem;
    }

    .city-selector__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .city-pill-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Container padding adjustments */
    .container.relative.pt-5.z-index-1000 {
        padding-top: 15px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .col-sm-12.text-center.mt-5.pt-5 {
        margin-top: 15px !important;
        padding-top: 15px !important;
    }
    
    /* Main container adjustments */
    .container.mt-5 {
        margin-top: 20px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Bottom banner mobile responsiveness */
    .bottom-banner-image {
        height: 200px !important;
        min-height: 180px;
        max-height: 220px;
        width: 100% !important;
        border-radius: 1.5rem !important;
    }

    .bottom-banner-container {
        margin: 0 15px;
        width: calc(100% - 30px);
        border-radius: 1.5rem !important;
        overflow: hidden;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 991px) {
    /* Show desktop header, hide mobile */
    header .mobile-opt {
        display: none !important;
    }

    header .lg-header {
        display: flex !important;
    }

    /* Show desktop logo on tablets */
    header .desktop-logo-col {
        display: flex !important;
    }

    /* Tablet logo sizing */
    header .desktop-logo {
        max-width: 110px !important;
        max-height: 50px !important;
    }

    /* Location dropdown alignment for tablets */
    header .lg-header form {
        margin-left: 0 !important;
    }

    header .lg-header #location_opt {
        margin-left: 0 !important;
        text-align: left !important;
    }

    /* Adjust hero image height for tablets */
    .hero-image {
        height: 40vh;
    }
}

/* Desktop Styles */
@media (min-width: 992px) {
    /* Show desktop header, hide mobile */
    header .mobile-opt {
        display: none !important;
    }

    header .lg-header {
        display: flex !important;
    }

    /* Show desktop logo, hide mobile logo */
    header .desktop-logo-col {
        display: flex !important;
    }

    /* Desktop logo sizing */
    header .desktop-logo {
        max-width: 120px !important;
        max-height: 55px !important;
    }

    /* Location dropdown alignment */
    header .lg-header form {
        margin-left: 0 !important;
    }

    header .lg-header #location_opt {
        margin-left: 0 !important;
        text-align: left !important;
    }

    /* Hero Banner - Centered with White Space on Desktop */
    .hero-banner-section {
        background: #f8f9fa;
        padding: 25px 0;
    }

    .hero-banner-section .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }

    .hero-banner-section .col-12 {
        padding: 0 120px;
    }

    #topHeroBanner .carousel-inner {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    .hero-image-container {
        border-radius: 20px;
        overflow: hidden;
    }

    .hero-image {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 20px;
    }

    /* Explore cities grid on desktop */
    .city-selector {
        padding: 3rem 2.5rem;
    }

    .city-pill-btn {
        padding: 1rem 1.4rem;
    }
}

/* Header fixed positioning improvements */
header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background-color: white !important;
}

/* Ensure no black background on header elements */
header, #topbar, .topbar, .container-fluid {
    background-color: white !important;
}

/* Prevent any black space issues */
body {
    background-color: #ffffff !important;
}

#content, .no-bottom, .no-top {
    background-color: transparent !important;
}

/* Adjust body padding when header is fixed */
body {
    padding-top: 120px;
}

/* Only increase padding on mobile devices */
@media (max-width: 768px) {
    body {
        padding-top: 150px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 145px !important;
    }
}

/* Ensure desktop keeps normal padding */
@media (min-width: 769px) {
    body {
        padding-top: 100px !important;
    }
}

/* Search input focus states */
.search-input-wrapper input:focus,
.search-input-wrapper select:focus {
    outline: none;
    box-shadow: none;
}

/* Button hover effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Carousel improvements */
.carousel-item img {
    border-radius: 1.5rem;
}

/* Bottom Banner Responsive */
.bottom-banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1.5rem;
    box-sizing: border-box;
}

.bottom-banner-image {
    height: 50vh;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 1.5rem;
    display: block;
}

/* Responsive text sizing */
@media (max-width: 576px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }

    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    /* Extra small screens - OpenTable header adjustments */
    .opentable-mobile-header {
        padding: 0.5rem;
    }

    .opentable-mobile-container {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .opentable-logo {
        max-width: 80px;
        max-height: 32px;
    }

    .opentable-top-actions {
        gap: 0.5rem;
    }

    .opentable-open-app-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .opentable-hamburger-btn {
        font-size: 1.125rem;
    }

    .opentable-selectors {
        gap: 0.25rem;
    }

    .opentable-selector-item {
        padding: 0.375rem 0.4rem;
        gap: 0.25rem;
    }

    .opentable-selector-item i {
        font-size: 0.75rem;
    }

    .opentable-selector-input {
        font-size: 0.75rem;
    }

    .opentable-search-wrapper {
        padding: 0.4rem 0.6rem;
    }

    .opentable-search-input {
        font-size: 0.75rem;
    }

    .opentable-submit-btn {
        padding: 0.375rem 0.875rem;
        font-size: 0.75rem;
    }

    /* Extra small screens adjustments */
    #topHeroBanner {
        height: 240px;
    }

    .hero-banner-section .col-12 {
        padding: 0 8px !important;
    }

    .city-selector__grid {
        grid-template-columns: 1fr;
    }

    .city-pill-btn {
        font-size: 0.95rem;
    }
    
    .mobile-logo {
        max-width: 90px;
        max-height: 55px;
    }

    /* Improved mobile topbar for small screens */
    .mobile-topbar-left .d-flex {
        gap: 20px !important;
        flex-wrap: nowrap;
    }

    .mobile-topbar-left .form-select-sm {
        min-width: 130px;
        font-size: 0.95rem;
    }

    .mobile-topbar-left .all-links {
        font-size: 0.95rem;
        padding: 6px 10px;
    }
    
    .container.mt-5 {
        margin-top: 15px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Bottom banner small screens */
    .bottom-banner-image {
        height: 180px !important;
        min-height: 160px;
        max-height: 180px;
        width: 100% !important;
    }
    
    .bottom-banner-container {
        margin: 0 10px;
        width: calc(100% - 20px);
    }
    
    /* Fix search form on very small screens */
    .search-input-wrapper {
        min-height: 45px;
    }
}

/* Extra fixes for very small screens */
@media (max-width: 400px) {
    #topHeroBanner {
        height: 200px;
    }

    .hero-banner-section .col-12 {
        padding: 0 5px !important;
    }

    .city-selector {
        padding: 1.5rem 1rem;
    }

    .city-pill-btn {
        padding: 0.7rem 0.9rem;
    }
    
    .mobile-logo {
        max-width: 55px;
        max-height: 30px;
    }
    
    .container.mt-5 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* Bottom banner extra small screens */
    .bottom-banner-image {
        height: 160px !important;
        min-height: 140px;
        max-height: 160px;
        width: 100% !important;
    }
    
    .bottom-banner-container {
        margin: 0 5px;
        width: calc(100% - 10px);
    }
}
