/**
 * FBO Map Widget Styles
 */

.fbo-map-widget {
    width: 100%;
    margin: 0 0 20px 0;
}

/* Hidden filter controls state */
.fbo-map-widget .fbo-filter-controls-hidden {
    display: none;
}

.fbo-map-widget .fbo-map-container.no-filters {
    margin-top: 0;
}

/* Filter Controls */
.fbo-filter-controls {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-radio-label {
    margin: 0;
    cursor: pointer;
}

.filter-radio-label input[type="radio"] {
    display: none;
}

.filter-button {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.filter-button:hover {
    border-color: #1B449D;
    color: #1B449D;
    background: #f8f9fa;
}

.filter-button.active {
    background: #1B449D;
    border-color: #1B449D;
    color: #ffffff;
}

/* VFR Button in Google Maps UI (next to Map/Satellite) */
.fbo-map-container .vfr-button {
    background: none padding-box rgb(255, 255, 255);
    display: table-cell;
    border: 0px;
    margin: 0px;
    padding: 0px 17px;
    text-transform: none;
    appearance: none;
    position: relative;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    text-align: center;
    height: 40px;
    vertical-align: middle;
    color: rgb(86, 86, 86);
    font-family: Roboto, Arial, sans-serif;
    font-size: 18px;
    border-bottom-right-radius: 2px;
    border-top-right-radius: 2px;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
    font-weight: 500;
}

.fbo-map-container .vfr-button:hover {
    background-color: #ebebeb;
    color: #222;
}

.fbo-map-container .vfr-button--active {
    font-weight: bold !important;
    color: #1B449D;
}

/* Map Container */
.fbo-map-container {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

/* Info Window Styles */
.fbo-info-window {
    max-width: 300px;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Featured info windows have their own padding structure */
.fbo-info-window.fbo-info-featured {
    padding: 0;
}

.fbo-info-window .fbo-name {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.fbo-image-container {
    margin: 10px 0;
    text-align: center;
}

.fbo-image {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fbo-details {
    margin-top: 10px;
}

.fbo-details p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

.fbo-details p strong {
    color: #333;
    font-weight: 600;
}

/* Error State */
.fbo-error {
    padding: 20px;
    text-align: center;
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .fbo-filter-controls {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .fbo-info-window {
        max-width: 250px;
    }
    
    .fbo-info-window .fbo-name {
        font-size: 15px;
    }
    
    .fbo-details p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-button {
        text-align: center;
        padding: 8px 12px;
    }
    
    .fbo-info-window {
        max-width: 220px;
    }
}

/* Custom Google Maps Controls */
.gm-style .gm-style-iw-c {
    padding: 12px !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
}

.gm-style .gm-style-iw-tc::after {
    background: linear-gradient(45deg, transparent 50%, #fff 50%) !important;
}

/* Loading State */
.fbo-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #6c757d;
    font-size: 14px;
}

.fbo-map-loading::before {
    content: "";
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #e9ecef;
    border-top-color: #1B449D;
    border-radius: 50%;
    animation: fbo-spinner 1s linear infinite;
}

@keyframes fbo-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.filter-radio-label:focus-within .filter-button {
    outline: 2px solid #1B449D;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .filter-button {
        border-width: 3px;
    }

    .filter-button.active {
        background: #000000;
        border-color: #000000;
        color: #ffffff;
    }
}

/* ==========================================================================
   Featured FBO Info Window Styles
   ========================================================================== */

/* Fix Google Maps info window scrollbars */
.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style .gm-style-iw-c {
    padding: 0 !important;
}

.fbo-info-featured {
    max-width: 300px;
    min-width: 280px;
    overflow: hidden;
}

/* Hero section with image and overlay */
.fbo-featured-hero {
    position: relative;
    margin: 0;
    height: 160px;
    background: linear-gradient(135deg, #1B449D 0%, #153778 100%);
    overflow: hidden;
}

.fbo-featured-hero .fbo-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fbo-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 12px 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.fbo-info-featured .fbo-name {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.fbo-info-featured .fbo-name a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: color 0.2s ease;
}

.fbo-info-featured .fbo-name a:hover {
    color: #71B63B;
}

.fbo-info-featured .fbo-agency {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Content area below hero */
.fbo-info-featured .fbo-stats,
.fbo-info-featured .fbo-services,
.fbo-info-featured .fbo-cta {
    padding-left: 12px;
    padding-right: 12px;
}

/* Property Stats */
.fbo-stats {
    display: flex;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    justify-content: center;
}

.fbo-stat {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

a.fbo-stat:hover {
    color: #1B449D;
}

.fbo-stat strong {
    color: #1B449D;
    font-weight: 700;
}

a.fbo-stat:hover strong {
    color: #71B63B;
}

/* Service Icons */
.fbo-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    justify-content: center;
}

.fbo-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f5f7fa;
    border-radius: 4px;
    color: #1B449D;
    font-size: 14px;
    cursor: help;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.fbo-service:hover {
    background: #e8edf5;
    transform: scale(1.1);
}

.fbo-service-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* CTA Buttons */
.fbo-cta {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding-bottom: 12px;
}

.fbo-btn {
    display: inline-block;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    flex: 1;
}

.fbo-btn-primary {
    background: #71B63B;
    color: #fff;
}

.fbo-btn-primary:hover {
    background: #5a9930;
    color: #fff;
}

.fbo-btn-secondary {
    background: #1B449D;
    color: #fff;
}

.fbo-btn-secondary:hover {
    background: #153778;
    color: #fff;
}

/* Legacy support */
.fbo-view-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #71B63B;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.fbo-view-btn:hover {
    background: #5a9930;
    color: #fff;
}

/* Responsive adjustments for featured info window */
@media (max-width: 480px) {
    .fbo-info-featured {
        max-width: 260px;
        min-width: 240px;
    }

    .fbo-featured-hero {
        height: 120px;
    }

    .fbo-hero-overlay {
        padding: 20px 10px 8px 10px;
    }

    .fbo-info-featured .fbo-name {
        font-size: 14px;
    }

    .fbo-info-featured .fbo-agency {
        font-size: 11px;
    }

    .fbo-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .fbo-services {
        gap: 6px;
    }

    .fbo-service {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .fbo-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}