/**
 * UniDeals GPS Navigator Styles
 * Modern GPS Navigation UI with UniDeals Branding
 * Fully Responsive for Mobile, Tablet, and Desktop
 */

/* ============================================
   BASE MOBILE-FIRST STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

/* ============================================
   HIDE DODO CONTACT WIDGET WHEN GPS IS OPEN
   ============================================ */
.unideals-gps-modal.show ~ * #dodo,
.unideals-gps-modal.show ~ * .dodo-widget,
.unideals-gps-modal.show #dodo,
.unideals-gps-modal.show .dodo-widget,
body:has(.unideals-gps-modal.show) #dodo,
body:has(.unideals-gps-modal.show) .dodo-widget,
body:has(.unideals-gps-modal.show) #dodo-contact-modal-root,
body:has(.unideals-gps-modal.show) .dodo-modal-overlay,
body:has(.unideals-gps-modal.show) .dodo-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Hide dodo elements when GPS modal has show class */
.unideals-gps-modal.show ~ * [id*="dodo"],
.unideals-gps-modal.show ~ * [class*="dodo-widget"],
.unideals-gps-modal.show ~ * [class*="dodo-pulsate"],
body:has(.unideals-gps-modal.show) [id*="dodo"],
body:has(.unideals-gps-modal.show) [class*="dodo-widget"],
body:has(.unideals-gps-modal.show) [class*="dodo-pulsate"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ============================================
   MODAL STYLING
   ============================================ */
.unideals-gps-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.unideals-gps-modal.show {
    display: flex;
}

.unideals-gps-content {
    width: 100%;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* ============================================
   HEADER
   ============================================ */
.unideals-gps-header {
    background: linear-gradient(135deg, #197F8C 0%, #3296A4 50%, #2a8593 100%);
    color: white;
    padding: 16px 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(25, 127, 140, 0.3);
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
}

.unideals-gps-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.unideals-gps-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-transform: uppercase !important; /* Make header text uppercase */
    overflow: hidden !important; /* Prevent overlap */
    gap: 10px;
    color: white;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.unideals-gps-header h2 span {
    text-transform: uppercase !important; /* Make "Navigator" text uppercase */
}

.unideals-gps-header h2 img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    /* Hide alt text to prevent overlap */
    text-indent: -9999px !important;
    overflow: hidden !important;
    font-size: 0 !important;
    /* Hide any square/border that appears after removing alt */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.unideals-gps-close {
    background: #3296A4 !important; /* Match Be Our Partner modal close button */
    border: 2px solid rgba(255, 255, 255, 0.3) !important; /* White border, no red */
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 16px !important; /* Match Be Our Partner modal */
    transition: all 0.3s ease !important; /* Match Be Our Partner modal */
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    outline: none !important; /* Remove any red outline */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.unideals-gps-close span,
.unideals-gps-close i {
    font-size: 16px !important; /* Match Be Our Partner modal */
    color: white !important;
    line-height: 1 !important;
    display: block !important;
}

.unideals-gps-close:hover,
.unideals-gps-close:focus {
    background: rgba(50, 150, 164, 0.8) !important; /* Match Be Our Partner modal hover */
    border-color: rgba(255, 255, 255, 0.3) !important; /* Keep white border, no red */
    transform: rotate(90deg) scale(1.1) !important; /* Match Be Our Partner modal hover effect */
    outline: none !important; /* Remove any red outline */
}

.unideals-gps-close:active {
    transform: rotate(90deg) scale(0.95) !important; /* Match Be Our Partner modal */
}

/* Remove red borders from close button in all states */
.unideals-gps-close:invalid,
.unideals-gps-close:required,
.unideals-gps-close:focus-visible {
    border-color: rgba(255, 255, 255, 0.3) !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.unideals-gps-search {
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.unideals-search-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.unideals-search-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.unideals-search-group label {
    font-size: 12px;
    font-weight: 600;
    color: #197F8C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.unideals-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.unideals-search-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.unideals-search-group input:focus {
    outline: none;
    border-color: #197F8C;
    box-shadow: 0 0 0 3px rgba(25, 127, 140, 0.1);
}

.unideals-use-current {
    padding: 12px;
    background: #197F8C;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.unideals-use-current:hover {
    background: #2a8593;
    transform: scale(1.05);
}

/* ============================================
   SUGGESTIONS DROPDOWN
   ============================================ */
.unideals-input-wrapper,
.unideals-search-group {
    position: relative;
}

.unideals-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -2px;
    display: none;
}

.unideals-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

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

.unideals-suggestion-item:hover {
    background: #f5f5f5;
    border-left: 3px solid #197F8C;
}

.unideals-suggestion-item i {
    color: #197F8C;
    font-size: 16px;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.suggestion-cached,
.suggestion-recent {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    vertical-align: middle;
}

.suggestion-cached {
    color: #197F8C;
}

.suggestion-recent {
    color: #666;
    font-size: 11px;
}

.suggestion-place {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments for suggestions */
@media (max-width: 768px) {
    .unideals-suggestions {
        max-height: 250px;
    }
    
    .unideals-suggestion-item {
        padding: 10px 12px;
    }
    
    .suggestion-name {
        font-size: 13px;
    }
    
    .suggestion-place {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .unideals-suggestions {
        max-height: 200px;
    }
}

/* ============================================
   MAP CONTAINER
   ============================================ */
.unideals-gps-map-container {
    flex: 1 1 auto;
    position: relative !important;
    width: 100% !important;
    min-height: 300px !important;
    height: auto !important;
    background: #e5e3df !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    z-index: 1 !important;
    box-sizing: border-box;
}

/* Hide Mapbox branding completely */
.mapboxgl-ctrl-attrib,
.mapboxgl-ctrl-attrib-inner,
.mapboxgl-ctrl-logo,
a[href*="mapbox.com"],
a[href*="openstreetmap.org"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Hide alt text and squares/borders from ALL images inside map container - COMPREHENSIVE */
.unideals-gps-map-container img,
#unidealsGpsMapContainer img,
.unideals-map-branding img,
.unideals-gps-map-container img[alt],
#unidealsGpsMapContainer img[alt],
.unideals-gps-map-container img[alt]:not([alt=""]),
#unidealsGpsMapContainer img[alt]:not([alt=""]) {
    /* Hide alt text completely */
    text-indent: -9999px !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    /* Hide any square/border that appears after removing alt */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    /* Remove any placeholder/broken image styling */
    background-image: none !important;
    background-color: transparent !important;
    /* Prevent any visual artifacts */
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Hide Mapbox attribution containers */
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-bottom-left {
    display: none !important;
}

/* UniDeals Map Branding - Subtle, minimal */
.unideals-map-branding {
    position: absolute;
    bottom: 90px;
    right: 12px;
    z-index: 4;
    pointer-events: none;
}

.unideals-map-branding div {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #197F8C;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.unideals-map-branding img {
    height: 14px;
    width: 14px;
    border-radius: 2px;
    object-fit: contain;
    /* Hide alt text and square/border */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    font-size: 0 !important;
}

/* Mapbox GL map styling */
.unideals-gps-map-container.mapboxgl-map {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure Mapbox canvas is visible */
.unideals-gps-map-container .mapboxgl-canvas-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: block !important;
    visibility: visible !important;
}

.unideals-gps-map-container .mapboxgl-canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure Mapbox GL elements are visible */
.unideals-gps-map-container .mapboxgl-canvas-container,
.unideals-gps-map-container .mapboxgl-canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.unideals-gps-map-container.mapboxgl-map {
    width: 100% !important;
    height: 100% !important;
}

/* Ensure route info card appears above map */
#unidealsRouteInfoCard {
    position: absolute !important;
    z-index: 10 !important;
    top: 10px !important;
    left: 10px !important;
}

/* Map wrapper - uses flexbox for proper sizing */
.unideals-gps-map-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* Map loading indicator */
.unideals-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    z-index: 10;
    pointer-events: none;
}

/* Ensure map container doesn't have green background */
.unideals-gps-map-container {
    background: #ffffff !important;
}

.unideals-gps-map-container.mapboxgl-map {
    background: #ffffff !important;
}

/* Hide any Mapbox error states (green screen) */
.unideals-gps-map-container .mapboxgl-error {
    display: none !important;
}

.unideals-map-loading p {
    color: #197F8C;
    font-weight: 600;
    margin-top: 16px;
}

/* Ensure map container has proper height when modal is open - use flexbox instead of calc */
.unideals-gps-modal.show .unideals-gps-map-wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

.unideals-gps-modal.show .unideals-gps-map-container {
    height: 100% !important;
    min-height: 300px !important;
    flex: 1 1 auto !important;
}

/* ============================================
   ROUTE INFO CARD
   ============================================ */
.unideals-route-info-card {
    position: absolute;
    top: 160px; /* Below header (~60px) + search section (~100px) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    max-width: 400px;
    width: calc(100% - 180px);
    max-height: 25vh; /* Reduced to prevent covering map center */
    animation: slideDown 0.3s ease-out;
    pointer-events: auto;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

/* Hide route info card when navigation is active - multiple ways to ensure it's hidden */
.unideals-route-info-card.navigation-active,
.unideals-route-info-card[data-navigating="true"],
.unideals-gps-modal.show .unideals-navigation-hud:not([style*="display: none"]) ~ .unideals-route-info-card,
.unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-route-info-card,
.unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) #unidealsRouteInfoCard,
.unideals-gps-modal.show:has(.unideals-navigation-hud[data-navigating="true"]) #unidealsRouteInfoCard,
.unideals-gps-modal.show #unidealsRouteInfoCard[data-navigating="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.unideals-route-info-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(25, 127, 140, 0.25);
    padding: 20px;
    border: 2px solid rgba(25, 127, 140, 0.1);
    backdrop-filter: blur(10px);
}

.unideals-route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.unideals-route-header h3 {
    margin: 0;
    color: #197F8C;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.unideals-route-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.unideals-route-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.unideals-route-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.unideals-route-stat {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px;
    border-radius: 10px;
    border-left: 4px solid #197F8C;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.unideals-route-stat i {
    color: #197F8C;
    font-size: 18px;
}

.unideals-route-stat span {
    color: #197F8C;
    font-size: 18px;
    font-weight: 700;
}

/* Start Navigation Button - Consolidated styling */
.unideals-start-nav-btn {
    flex: 1;
    background: linear-gradient(135deg, #197F8C 0%, #3296A4 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(25, 127, 140, 0.3);
    min-height: 48px;
}

.unideals-start-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3296A4 0%, #197F8C 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 127, 140, 0.4);
}

.unideals-start-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.unideals-start-nav-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(25, 127, 140, 0.2);
}

.unideals-start-nav-btn i {
    font-size: 18px;
}

/* ============================================
   FOOTER CONTROLS
   ============================================ */
.unideals-gps-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.unideals-gps-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.unideals-control-btn {
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #197F8C;
}

.unideals-control-btn:hover {
    background: #197F8C;
    color: white;
    border-color: #197F8C;
    transform: scale(1.05);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #197F8C;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

/* ============================================
   RESPONSIVE DESIGN - TABLET (768px and below)
   ============================================ */
@media (max-width: 768px) {
    .unideals-gps-header {
        padding: 12px 16px;
    }
    
    .unideals-gps-header h2 {
        font-size: 1.1rem;
    }
    
    .unideals-gps-header h2 img {
        height: 20px !important;
        width: 20px !important;
    }
    
    .unideals-gps-search {
        padding: 12px 16px;
    }
    
    .unideals-route-info-card {
        max-width: calc(100% - 120px); /* Leave space for controls */
        width: calc(100% - 120px);
        top: 70px; /* Below header/search on tablet */
    }
    
    .unideals-route-info-content {
        padding: 16px;
    }
    
    .unideals-route-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .unideals-route-stat {
        padding: 12px;
    }
    
    .unideals-gps-controls {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .unideals-control-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Travel mode controls - stack vertically */
    .unideals-travel-mode-control {
        flex-direction: column !important;
        top: 10px !important;
        right: 10px !important;
        padding: 6px !important;
    }
    
    .travel-mode-btn {
        padding: 6px 10px;
        font-size: 9px;
    }
    
    /* Map type controls */
    .unideals-map-type-control {
        top: 120px !important;
        right: 10px !important;
        padding: 6px !important;
    }
    
    /* Route options controls */
    .unideals-route-options-control {
        top: 200px !important;
        right: 10px !important;
        padding: 6px !important;
    }
    
    .route-option-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Compass */
    .unideals-compass {
        top: 10px !important;
        left: 10px !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    /* Navigation HUD */
    .unideals-navigation-hud {
        top: 60px !important;
        left: 10px !important;
        padding: 16px;
        min-width: 160px;
    }
    
    .hud-value {
        font-size: 28px;
    }
    
    /* Nearby controls */
    .unideals-nearby-control {
        bottom: 60px !important;
        right: 10px !important;
    }
    
    /* Panels */
    .unideals-nearby-menu,
    .unideals-recent-panel,
    .unideals-saved-panel {
        bottom: 80px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px);
        width: auto;
    }
    
    .unideals-route-options-panel {
        top: 120px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px);
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (480px and below)
   ============================================ */
@media (max-width: 480px) {
    .unideals-gps-modal {
        padding: 0;
    }
    
    .unideals-gps-content {
        border-radius: 0;
        height: 100vh !important;
        max-height: 100vh !important;
    }
    
    .unideals-gps-header {
        padding: 10px 12px;
        min-height: 50px;
        flex-shrink: 0;
    }
    
    .unideals-gps-header h2 {
        font-size: 1rem;
        gap: 8px;
    }
    
    .unideals-gps-header h2 i {
        font-size: 18px;
    }
    
    .unideals-gps-header h2 img {
        height: 18px !important;
        width: 18px !important;
        margin-right: 4px !important;
    }
    
    .unideals-gps-close {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 16px !important; /* Match Be Our Partner modal */
        background: #3296A4 !important; /* Match Be Our Partner modal */
        border: 2px solid rgba(255, 255, 255, 0.3) !important; /* White border, no red */
    }
    
    .unideals-gps-close span,
    .unideals-gps-close i {
        font-size: 16px !important; /* Match Be Our Partner modal */
    }
    
    .unideals-gps-search {
        padding: 10px 12px;
        flex-shrink: 0;
    }
    
    .unideals-search-inputs {
        gap: 10px;
    }
    
    .unideals-search-group label {
        font-size: 11px;
    }
    
    .unideals-search-group input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .unideals-use-current {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .unideals-gps-map-wrapper {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden;
    }
    
    .unideals-gps-map-container {
        min-height: 200px !important;
        height: 100% !important;
        flex: 1 1 auto !important;
        max-height: none !important;
    }
    
    .unideals-gps-modal.show .unideals-gps-map-container {
        height: 100% !important;
        min-height: 200px !important;
    }
    
    .unideals-route-info-card {
        max-width: calc(100% - 16px);
        width: calc(100% - 16px);
        top: 8px;
        left: 8px;
        transform: none;
    }
    
    /* Hide UniDeals branding on very small screens */
    .unideals-map-branding {
        bottom: 8px;
        right: 8px;
    }
    
    .unideals-map-branding div {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .unideals-map-branding img {
        height: 12px;
        width: 12px;
    }
    
    .unideals-route-info-content {
        padding: 12px;
        border-radius: 12px;
    }
    
    .unideals-route-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .unideals-route-header h3 {
        font-size: 16px;
    }
    
    .unideals-route-details {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .unideals-route-location {
        font-size: 13px;
    }
    
    .unideals-route-stats {
        margin-bottom: 12px;
    }
    
    .unideals-route-stat {
        padding: 10px;
    }
    
    .unideals-route-stat i {
        font-size: 16px;
    }
    
    .unideals-route-stat span {
        font-size: 16px;
    }
    
    .unideals-start-nav-btn {
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .unideals-save-btn,
    .unideals-share-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .unideals-gps-footer {
        padding: 10px 12px;
    }
    
    .unideals-gps-controls {
        gap: 6px;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    
    .unideals-gps-controls::-webkit-scrollbar {
        display: none;
    }
    
    .unideals-control-btn {
        padding: 10px 14px;
        min-width: 48px;
        min-height: 48px;
        flex-shrink: 0;
        font-size: 18px;
    }
    
    .unideals-control-btn i {
        font-size: 18px;
    }
    
    /* Hide text in control buttons on very small screens */
    .unideals-control-btn span {
        display: none;
    }
    
    /* Travel mode controls - make smaller */
    .unideals-travel-mode-control {
        top: 8px !important;
        right: 8px !important;
        padding: 4px !important;
        border-radius: 10px !important;
    }
    
    .travel-mode-btn {
        padding: 5px 8px;
        font-size: 8px;
        gap: 2px;
    }
    
    .travel-mode-btn i {
        font-size: 14px;
    }
    
    .travel-mode-btn span {
        display: none;
    }
    
    /* Map type controls */
    .unideals-map-type-control {
        top: 100px !important;
        right: 8px !important;
        padding: 4px !important;
        border-radius: 10px !important;
    }
    
    .map-type-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Route options controls */
    .unideals-route-options-control {
        top: 160px !important;
        right: 8px !important;
        padding: 4px !important;
        border-radius: 10px !important;
    }
    
    .route-option-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Compass */
    .unideals-compass {
        top: 8px !important;
        left: 8px !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .compass-needle {
        font-size: 20px;
    }
    
    /* Navigation HUD */
    .unideals-navigation-hud {
        top: 50px !important;
        left: 8px !important;
        padding: 12px;
        min-width: 140px;
        border-radius: 12px;
    }
    
    .hud-value {
        font-size: 24px;
    }
    
    .hud-unit {
        font-size: 12px;
    }
    
    .hud-speed-limit {
        padding: 6px;
        font-size: 11px;
    }
    
    #speedLimitValue {
        font-size: 18px;
    }
    
    .hud-distance span:first-child {
        font-size: 16px;
    }
    
    .hud-instruction {
        font-size: 11px;
    }
    
    /* Nearby controls */
    .unideals-nearby-control {
        bottom: 70px !important;
        right: 8px !important;
        padding: 10px !important;
    }
    
    .nearby-btn {
        padding: 10px !important;
    }
    
    .nearby-btn span {
        display: none;
    }
    
    /* Panels - full width on mobile */
    .unideals-nearby-menu,
    .unideals-recent-panel,
    .unideals-saved-panel {
        bottom: 70px !important;
        right: 8px !important;
        left: 8px !important;
        max-width: calc(100% - 16px);
        max-height: calc(100vh - 200px);
        border-radius: 12px;
    }
    
    .unideals-route-options-panel {
        top: 110px !important;
        right: 8px !important;
        left: 8px !important;
        max-width: calc(100% - 16px);
        border-radius: 12px;
        padding: 16px;
    }
    
    .nearby-menu-header,
    .panel-header {
        padding: 12px 16px;
    }
    
    .nearby-menu-header h3,
    .panel-header h3 {
        font-size: 15px;
    }
    
    .nearby-menu-options button,
    .recent-item,
    .saved-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .recent-item strong,
    .saved-item strong {
        font-size: 13px;
    }
    
    .recent-item small,
    .saved-item small {
        font-size: 11px;
    }
    
    /* Alternative routes */
    .route-alternative-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .route-alt-stats {
        font-size: 11px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (360px and below)
   ============================================ */
@media (max-width: 360px) {
    .unideals-gps-header h2 {
        font-size: 0.9rem;
    }
    
    .unideals-gps-header h2 span {
        font-size: 0.9rem;
        text-transform: uppercase !important; /* Make header text uppercase */
    }
    
    .unideals-gps-controls {
        gap: 4px;
    }
    
    .unideals-control-btn {
        padding: 8px 10px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .unideals-route-info-content {
        padding: 10px;
    }
    
    .unideals-route-header h3 {
        font-size: 14px;
    }
    
    .unideals-start-nav-btn {
        padding: 12px 16px !important;
        font-size: 14px !important;
        min-height: 48px;
        gap: 6px;
    }
    
    .unideals-start-nav-btn span {
        font-size: 14px;
    }
    
    .unideals-start-nav-btn i {
        font-size: 14px;
    }
    
    .unideals-navigation-hud {
        min-width: 120px;
        padding: 10px;
    }
    
    .hud-value {
        font-size: 20px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - LANDSCAPE MOBILE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .unideals-gps-map-container {
        min-height: 200px;
        height: calc(100vh - 200px);
    }
    
    .unideals-gps-header {
        padding: 8px 12px;
        min-height: 45px;
    }
    
    .unideals-gps-search {
        padding: 8px 12px;
    }
    
    .unideals-route-info-card {
        max-width: 350px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .unideals-control-btn,
    .travel-mode-btn,
    .map-type-btn,
    .route-option-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .unideals-control-btn:hover,
    .travel-mode-btn:hover,
    .map-type-btn:hover {
        transform: none;
    }
    
    /* Better tap feedback */
    .unideals-control-btn:active,
    .travel-mode-btn:active,
    .map-type-btn:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* ============================================
   HIDE GOOGLE BRANDING - COMPLETE REMOVAL
   ============================================ */
#unidealsGpsMapContainer .gm-style-cc,
#unidealsGpsMapContainer a[href*="google.com"],
#unidealsGpsMapContainer a[href*="googleapis.com"],
#unidealsGpsMapContainer .gm-bundled-control,
#unidealsGpsMapContainer .gmnoprint,
#unidealsGpsMapContainer .gm-style-cc iframe,
#unidealsGpsMapContainer .gm-svpc,
#unidealsGpsMapContainer div[title*="Google"],
#unidealsGpsMapContainer [aria-label*="Google"],
#unidealsGpsMapContainer [title*="Google"],
#unidealsGpsMapContainer .gm-fullscreen-control,
#unidealsGpsMapContainer .gm-style-cc a,
#unidealsGpsMapContainer .gm-style > div:last-child,
#unidealsGpsMapContainer .gm-style-cc,
#unidealsGpsMapContainer a[href*="maps.google.com"],
#unidealsGpsMapContainer .gm-style > div > div:last-child,
#unidealsGpsMapContainer .gm-style > div > div > div:last-child,
#unidealsGpsMapContainer [class*="gm-"] a[href*="google"],
#unidealsGpsMapContainer [id*="google"],
#unidealsGpsMapContainer [class*="Google"],
#unidealsGpsMapContainer img[src*="google"],
#unidealsGpsMapContainer img[alt*="Google"],
#unidealsGpsMapContainer img[alt]:not([alt=""]),
#unidealsGpsMapContainer .gm-style-cc > div,
#unidealsGpsMapContainer .gm-style-cc > a,
#unidealsGpsMapContainer .gm-style-cc > span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
}

/* Hide Google branding in autocomplete dropdown - EXTREMELY AGGRESSIVE */
.pac-container .pac-logo,
.pac-container .pac-logo:after,
.pac-container a[href*="google"],
.pac-container [class*="google"],
.pac-container [href*="google"],
.pac-container [id*="google"],
.pac-container [src*="google"],
.pac-container [title*="Google"],
body .pac-container .pac-logo,
body .pac-container .pac-logo:after,
body .pac-container .pac-item:after,
body .pac-container a[href*="google"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
}

/* Ensure pac-container doesn't show Google branding */
.pac-container {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.pac-container::after {
    display: none !important;
    content: none !important;
}

/* EXTRA AGGRESSIVE - Hide ALL Google branding everywhere */
*[href*="google.com"]:not([href*="fonts.googleapis.com"]):not([href*="www.google.com"]),
*[href*="maps.google.com"],
*[href*="googleapis.com"]:not([href*="fonts.googleapis.com"]),
*[src*="google.com"]:not([src*="fonts.googleapis.com"]),
*[class*="pac-logo"],
*[id*="google"]:not([id*="unideals"]),
*[title*="Google"]:not([title*="UniDeals"]),
*[alt*="Google"]:not([alt*="UniDeals"]),
.gm-style-cc,
.gmnoprint,
.gm-style-cc a,
.gm-style-cc iframe {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
}

/* Additional aggressive hiding */
#unidealsGpsMapContainer *[href*="google"],
#unidealsGpsMapContainer *[src*="google"],
#unidealsGpsMapContainer *[alt*="Google"],
#unidealsGpsMapContainer *[title*="Google"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ============================================
   TRAVEL MODE CONTROLS
   ============================================ */
.unideals-travel-mode-control {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.travel-mode-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    color: #666;
    transition: all 0.3s;
    font-weight: 600;
    min-width: 50px;
    min-height: 44px;
    touch-action: manipulation;
}

.travel-mode-btn.active {
    background: #197F8C;
    color: white;
}

.travel-mode-btn:hover {
    background: rgba(25, 127, 140, 0.1);
}

.travel-mode-btn.active:hover {
    background: #2a8593;
}

.travel-mode-btn i {
    font-size: 16px;
}

/* ============================================
   MAP TYPE CONTROLS
   ============================================ */
.unideals-map-type-control {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

.map-type-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.map-type-btn.active {
    background: #197F8C;
    color: white;
}

.map-type-btn:hover {
    background: rgba(25, 127, 140, 0.1);
}

/* ============================================
   ROUTE OPTIONS
   ============================================ */
.unideals-route-options-control {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

.route-option-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.route-option-btn.active {
    background: #197F8C;
    color: white;
}

.route-option-btn:hover {
    background: rgba(25, 127, 140, 0.1);
}

.unideals-route-options-panel {
    position: absolute;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 200px;
}

.route-options-content h3 {
    margin: 0 0 16px 0;
    color: #197F8C;
    font-size: 16px;
}

.route-option-item {
    margin-bottom: 12px;
}

.route-option-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.route-option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #197F8C;
}

/* ============================================
   ALTERNATIVE ROUTES
   ============================================ */
.unideals-alternative-routes {
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.route-alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-alternative-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    font-size: 14px;
}

.route-alternative-btn:hover {
    border-color: #197F8C;
    background: rgba(25, 127, 140, 0.05);
}

.route-alternative-btn.active {
    border-color: #197F8C;
    background: rgba(25, 127, 140, 0.1);
    font-weight: 600;
    color: #197F8C;
}

.route-alt-stats {
    font-size: 12px;
    color: #999;
}

.route-alternative-btn.active .route-alt-stats {
    color: #197F8C;
}

/* ============================================
   ROUTE ACTIONS
   ============================================ */
.unideals-route-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.unideals-start-nav-btn {
    flex: 1;
}

.unideals-save-btn,
.unideals-share-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    color: #197F8C;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.unideals-save-btn:hover,
.unideals-share-btn:hover {
    border-color: #197F8C;
    background: #197F8C;
    color: white;
}

/* ============================================
   NEARBY PLACES MENU
   ============================================ */
.unideals-nearby-menu {
    position: absolute;
    bottom: 100px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
}

.nearby-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.nearby-menu-header h3 {
    margin: 0;
    color: #197F8C;
    font-size: 16px;
}

.nearby-menu-options {
    padding: 8px;
}

.nearby-menu-options button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
    margin-bottom: 4px;
}

.nearby-menu-options button:hover {
    background: rgba(25, 127, 140, 0.1);
    color: #197F8C;
}

.nearby-menu-options button i {
    width: 20px;
    color: #197F8C;
}

/* ============================================
   RECENT & SAVED PLACES PANELS
   ============================================ */
.unideals-recent-panel,
.unideals-saved-panel {
    position: absolute;
    bottom: 100px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 300px;
    max-width: 400px;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    color: #197F8C;
    font-size: 16px;
    font-weight: 700;
}

.panel-header button {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.panel-header button:hover {
    background: rgba(234, 40, 57, 0.1);
    color: #EA2839;
}

.recent-list,
.saved-list {
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}

.recent-item,
.saved-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-item {
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.recent-item:hover,
.saved-item:hover {
    background: rgba(25, 127, 140, 0.1);
    border-color: #197F8C;
}

.recent-item > div,
.saved-item > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.recent-item i,
.saved-item i {
    color: #197F8C;
    font-size: 18px;
}

.recent-item strong,
.saved-item strong {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.recent-item small,
.saved-item small {
    display: block;
    color: #999;
    font-size: 12px;
}

.delete-btn {
    background: none;
    border: none;
    color: #EA2839;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.delete-btn:hover {
    background: rgba(234, 40, 57, 0.1);
}

/* ============================================
   NAVIGATION HUD
   ============================================ */
.unideals-navigation-hud {
    position: absolute;
    top: 80px;
    left: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    min-width: 200px;
}

.hud-speed {
    text-align: center;
    margin-bottom: 12px;
}

.hud-value {
    font-size: 36px;
    font-weight: 700;
    color: #197F8C;
    line-height: 1;
}

.hud-unit {
    font-size: 14px;
    color: #999;
    margin-left: 4px;
}

.hud-speed-limit {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
}

#speedLimitValue {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #197F8C;
    margin-top: 4px;
}

.hud-distance {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.hud-distance span:first-child {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #197F8C;
    margin-bottom: 4px;
}

.hud-instruction {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* ============================================
   COMPASS
   ============================================ */
.unideals-compass {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.compass-needle {
    color: #197F8C;
    font-size: 24px;
    transition: transform 0.3s;
}

/* ============================================
   CONTROL BUTTONS ACTIVE STATES
   ============================================ */
.unideals-control-btn.active {
    background: #197F8C !important;
    color: white !important;
    border-color: #197F8C !important;
}

/* ============================================
   GOOGLE PLACES AUTOCOMPLETE STYLING
   ============================================ */
.pac-container {
    background: white;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #e0e0e0 !important;
    margin-top: 4px !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    z-index: 10001 !important;
}

.pac-item {
    padding: 12px 16px !important;
    border-top: 1px solid #f0f0f0 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    font-size: 14px !important;
}

.pac-item:hover {
    background: rgba(25, 127, 140, 0.1) !important;
}

.pac-item-selected,
.pac-item-selected:hover {
    background: rgba(25, 127, 140, 0.15) !important;
}

.pac-icon {
    margin-right: 10px !important;
}

.pac-item-query {
    color: #197F8C !important;
    font-weight: 600 !important;
}

.pac-matched {
    color: #197F8C !important;
    font-weight: 700 !important;
}

.pac-item-query {
    font-size: 14px !important;
}

/* Mobile autocomplete styling */
@media (max-width: 480px) {
    .pac-container {
        border-radius: 10px !important;
        margin-top: 2px !important;
    }
    
    .pac-item {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   ADVANCED FEATURES STYLING
   ============================================ */

/* Map Controls Panel - Clean, minimal design */
.unideals-map-controls-panel {
    position: absolute;
    top: 160px; /* Below header (~60px) + search section (~100px) */
    right: 12px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    max-height: 25vh; /* Limit to prevent covering map center */
    overflow-y: auto;
    overflow-x: hidden;
}

/* When navigation HUD is visible, move controls panel down */
.unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-map-controls-panel {
    top: 360px; /* Below navigation HUD (160px + ~200px for HUD) */
    max-height: 25vh;
}

/* Controls Toggle Button */
.unideals-controls-toggle {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #197F8C;
    font-size: 16px;
    margin-bottom: 6px;
    transition: all 0.2s;
    position: relative;
    z-index: 8;
}

/* Ensure toggle button doesn't overlap with controls when expanded */
.unideals-map-controls-panel:not(.controls-hidden) .unideals-controls-toggle {
    margin-bottom: 6px;
}

.unideals-controls-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* Hide all controls by default - show only when toggle is clicked */
.unideals-map-controls-panel.controls-hidden .unideals-control-desktop,
.unideals-map-controls-panel.controls-hidden .unideals-control-mobile {
    display: none !important;
}

.unideals-map-controls-panel:not(.controls-hidden) .unideals-control-desktop,
.unideals-map-controls-panel:not(.controls-hidden) .unideals-control-mobile {
    display: block;
}

/* Default state: controls hidden (except toggle button) */
.unideals-map-controls-panel .unideals-control-desktop,
.unideals-map-controls-panel .unideals-control-mobile {
    display: none;
}

/* Always show toggle button */
.unideals-map-controls-panel .unideals-controls-toggle {
    display: flex !important;
}

/* Mobile menu toggle - hidden by default on desktop */
.unideals-mobile-menu-toggle {
    display: none;
    position: relative;
    z-index: 8;
}

.unideals-map-controls-panel > * {
    pointer-events: auto; /* But buttons themselves are clickable */
    flex-shrink: 0;
}

/* Prevent controls from overlapping when expanded */
.unideals-map-controls-panel:not(.controls-hidden) {
    gap: 6px;
}

.unideals-map-controls-panel:not(.controls-hidden) .unideals-control-group {
    margin-bottom: 0;
}

.unideals-control-group {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 7;
}

.unideals-control-btn-small {
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #197F8C;
    font-size: 16px;
}

.unideals-control-btn-small:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.unideals-control-btn-small.active {
    background: #197F8C;
    color: white;
}

/* Panels - Base styling */
.unideals-panel {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1001;
    overflow: hidden;
}

/* Panel positioning variants */
.unideals-panel-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 280px;
    max-width: 420px;
    width: 90%;
}

.unideals-panel-bottom {
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 420px;
    width: calc(100% - 40px);
    max-height: 350px;
    overflow-y: auto;
}

/* Panel header styling */
.unideals-panel-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unideals-panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #197F8C;
    font-weight: 700;
}

.unideals-panel-content {
    padding: 16px;
}

.unideals-panel-list {
    padding: 8px;
}

.unideals-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.unideals-panel-close:hover {
    background: #f5f5f5;
    color: #EA2839;
}

/* Map Style Buttons */
.unideals-map-style-btn {
    width: 100%;
    padding: 12px;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    font-size: 14px;
}

.unideals-map-style-btn:hover {
    background: #f5f5f5;
}

.unideals-map-style-btn.active {
    background: rgba(25, 127, 140, 0.1);
    color: #197F8C;
    font-weight: 600;
}

/* Travel Mode Buttons */
.unideals-travel-mode-btn {
    width: 100%;
    padding: 12px;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    font-size: 14px;
}

.unideals-travel-mode-btn:hover {
    background: #f5f5f5;
}

.unideals-travel-mode-btn.active {
    background: rgba(25, 127, 140, 0.1);
    color: #197F8C;
    font-weight: 600;
}

/* Navigation HUD - Clean, minimal design */
.unideals-navigation-hud {
    position: absolute;
    top: 160px; /* Below header (~60px) + search section (~100px) */
    left: 12px;
    z-index: 7;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 14px;
    min-width: 160px;
    max-width: 220px;
    max-height: 25vh; /* Limit to prevent covering map center */
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    pointer-events: auto;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

/* When HUD is visible, ensure route card is hidden */
.unideals-navigation-hud[style*="display: block"] ~ * .unideals-route-info-card,
.unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-route-info-card {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.unideals-navigation-hud .hud-speed {
    text-align: center;
    margin-bottom: 12px;
}

.unideals-navigation-hud .hud-speed > div:first-child {
    font-size: 32px;
    font-weight: 700;
    color: #197F8C;
}

.unideals-navigation-hud .hud-speed > div:last-child {
    font-size: 12px;
    color: #666;
}

.unideals-navigation-hud .hud-next-turn,
.unideals-navigation-hud .hud-eta {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 12px;
}

.unideals-navigation-hud .hud-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unideals-navigation-hud #hudDistanceToNext {
    font-size: 20px;
    font-weight: 600;
    color: #197F8C;
}

.unideals-navigation-hud #hudNextInstruction {
    font-size: 13px;
    color: #333;
    margin-top: 8px;
}

.unideals-navigation-hud #hudETA {
    font-size: 16px;
    font-weight: 600;
    color: #197F8C;
}

/* Compass - Clean, minimal design */
.unideals-compass {
    position: absolute;
    bottom: 95px;
    right: 12px;
    z-index: 5;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
}

/* Show compass when navigation is active */
.unideals-compass[data-navigating="true"] {
    display: flex;
}

/* Compass visibility - show only when navigating */
.unideals-compass[data-navigating="true"] {
    display: flex;
}

.unideals-compass:not([data-navigating="true"]) {
    display: none !important;
}

.unideals-compass i {
    font-size: 22px;
    color: #197F8C;
}

.unideals-compass:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .unideals-compass {
        bottom: 70px;
    }
}

@media (max-width: 480px) {
    .unideals-compass {
        bottom: 70px;
        right: 6px;
        width: 44px;
        height: 44px;
    }
}

.unideals-compass:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Footer Buttons */
.unideals-footer-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #197F8C;
    font-size: 18px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.unideals-footer-btn:hover {
    border-color: #197F8C;
    background: rgba(25, 127, 140, 0.1);
    transform: translateY(-2px);
}

/* Stop Navigation Button */
.unideals-stop-nav-btn {
    background: linear-gradient(135deg, #EA2839 0%, #ff4757 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(234, 40, 57, 0.3);
    min-height: 48px;
}

.unideals-stop-nav-btn:hover {
    background: linear-gradient(135deg, #ff4757 0%, #EA2839 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234, 40, 57, 0.4);
}

.unideals-stop-nav-btn i {
    font-size: 16px;
}

/* Alternative Routes List */
#unidealsAlternativeRoutesList div {
    transition: background 0.2s;
}

/* Nearby Places List */
#unidealsNearbyPlacesList div {
    transition: background 0.2s;
}

/* Route Options Checkboxes */
#unidealsRouteOptionsPanel label {
    transition: background 0.2s;
}

#unidealsRouteOptionsPanel label:hover {
    background: #f5f5f5;
}

/* Route Option Labels */
.unideals-route-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.unideals-route-option-label:hover {
    background: #f5f5f5;
}

.unideals-route-option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #197F8C;
}

.unideals-route-option-label span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.unideals-route-option-label i {
    color: #197F8C;
    font-size: 16px;
}

/* Responsive Styles for Advanced Features */
@media (max-width: 768px) {
    /* Tablet layout calculations:
       Header: ~60px, Search: ~100px, Footer: ~70px
       Available map height: calc(100vh - 230px)
       Top offset for overlays: 80px (below header+search)
    */
    
    /* Route info card - top center, below header/search */
    .unideals-route-info-card {
        top: 170px !important; /* Header (~60px) + Search (~110px) */
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100% - 24px) !important;
        width: calc(100% - 24px) !important;
        max-height: 20vh !important;
        overflow-y: auto;
    }
    
    /* Navigation HUD - top left, below header/search */
    .unideals-navigation-hud {
        top: 170px !important; /* Header (~60px) + Search (~110px) */
        left: 12px !important;
        min-width: 140px;
        max-width: calc(50vw - 20px);
        max-height: 20vh !important;
        padding: 10px;
        font-size: 12px;
    }
    
    /* Controls panel - top right, below header/search */
    .unideals-map-controls-panel {
        top: 170px !important; /* Header (~60px) + Search (~110px) */
        right: 12px !important;
        gap: 6px;
        max-height: 20vh;
        overflow-y: auto;
    }
    
    /* Hide all desktop controls on tablet */
    .unideals-map-controls-panel .unideals-control-desktop {
        display: none !important;
    }
    
    .unideals-control-btn-small {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    /* When navigation HUD is visible, adjust controls position */
    .unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-map-controls-panel {
        top: 330px !important; /* Below HUD (170px + ~160px for HUD) */
        max-height: 20vh;
    }
    
    /* Ensure route card is hidden when navigating */
    .unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-route-info-card {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Compass - bottom right, above footer */
    .unideals-compass {
        bottom: 85px !important;
        right: 12px !important;
        width: 46px;
        height: 46px;
    }
    
    /* Panels - centered */
    .unideals-panel {
        max-width: calc(100vw - 24px);
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    /* Mobile layout calculations:
       Header: ~50px, Search: ~140px (with expanded inputs), Footer: ~80px
       Available map height: calc(100vh - 270px)
       Top offset for overlays: 90px (below header+search)
    */
    
    /* Hide all controls except mobile menu toggle */
    .unideals-map-controls-panel .unideals-control-desktop,
    .unideals-map-controls-panel .unideals-control-mobile {
        display: none !important;
    }
    
    .unideals-map-controls-panel {
        top: 90px !important;
        right: 10px !important;
        gap: 0;
        flex-direction: column;
        max-height: auto;
        overflow: visible;
        width: auto;
    }
    
    /* Hide desktop controls toggle, show mobile menu toggle */
    .unideals-controls-toggle {
        display: none !important;
    }
    
    .unideals-mobile-menu-toggle {
        display: flex !important;
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #197F8C;
        font-size: 16px;
        flex-shrink: 0;
        margin-bottom: 0;
        position: relative;
        z-index: 9;
    }
    
    /* Navigation HUD - top left, below header/search */
    .unideals-navigation-hud {
        top: 200px !important; /* Header (~50px) + Search (~150px on mobile with expanded inputs) */
        left: 10px !important;
        min-width: 120px;
        max-width: calc(55vw - 15px);
        max-height: 18vh !important;
        padding: 8px;
        font-size: 11px;
    }
    
    /* When navigation HUD is visible, move mobile menu toggle */
    .unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-mobile-menu-toggle {
        top: 280px !important; /* Below HUD (200px + ~80px for HUD) */
    }
    
    /* Ensure route card is hidden when navigating */
    .unideals-gps-modal.show:has(.unideals-navigation-hud[style*="display: block"]) .unideals-route-info-card {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Route info card - top center, below header/search */
    .unideals-route-info-card {
        top: 200px !important; /* Header (~50px) + Search (~150px) */
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100% - 20px) !important;
        width: calc(100% - 20px) !important;
        max-height: 18vh !important;
        overflow-y: auto;
    }
    
    /* Controls panel - top right, below header/search */
    .unideals-map-controls-panel {
        top: 200px !important; /* Header (~50px) + Search (~150px) */
    }
    
    /* Compass - bottom right, above footer */
    .unideals-compass {
        bottom: 85px !important; /* Above footer (~80px) */
        right: 10px !important;
        width: 42px;
        height: 42px;
    }
    
    .unideals-footer-btn {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
    
    .unideals-control-btn-small {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    /* Panels - centered, full width on mobile */
    .unideals-panel {
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: calc(100vw - 16px) !important;
        width: calc(100vw - 16px) !important;
        max-height: 70vh;
    }
    
    /* Ensure map wrapper takes remaining space */
    .unideals-gps-map-wrapper {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        position: relative !important;
    }
    
    .unideals-gps-map-container {
        height: 100% !important;
        min-height: 200px !important;
        position: relative !important;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    /* Even smaller screens - tighter spacing */
    .unideals-route-info-card {
        top: 195px !important; /* Header (~50px) + Search (~145px) */
        max-width: calc(100% - 16px) !important;
        width: calc(100% - 16px) !important;
        max-height: 16vh !important;
    }
    
    .unideals-navigation-hud {
        top: 195px !important; /* Header (~50px) + Search (~145px) */
        left: 8px !important;
        min-width: 110px;
        max-width: calc(50vw - 12px);
        max-height: 16vh !important;
        padding: 6px;
        font-size: 10px;
    }
    
    .unideals-map-controls-panel {
        top: 195px !important; /* Header (~50px) + Search (~145px) */
        right: 8px !important;
    }
    
    .unideals-mobile-menu-toggle {
        width: 38px !important;
        height: 38px !important;
        font-size: 14px !important;
    }
    
    .unideals-compass {
        bottom: 75px !important;
        right: 8px !important;
        width: 40px;
        height: 40px;
    }
    
    .unideals-panel {
        max-width: calc(100vw - 12px) !important;
        width: calc(100vw - 12px) !important;
        max-height: 75vh;
    }
    
    .unideals-control-btn-small {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* Mobile Controls Menu */
.unideals-mobile-menu-toggle {
    display: none; /* Hidden on desktop */
}

.unideals-mobile-controls-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 2000;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.unideals-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.unideals-mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #197F8C;
    font-weight: 700;
}

.unideals-mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.unideals-mobile-menu-close:hover {
    background: #f5f5f5;
    color: #EA2839;
}

.unideals-mobile-menu-content {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.unideals-mobile-menu-item {
    width: 100%;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 16px;
    color: #333;
}

.unideals-mobile-menu-item i {
    font-size: 20px;
    color: #197F8C;
    width: 24px;
}

.unideals-mobile-menu-item:hover {
    background: #f5f5f5;
    border-color: #197F8C;
}

.unideals-mobile-menu-item:active {
    background: rgba(25, 127, 140, 0.1);
}

