/**
 * Bulgaria Office Map Component Styles
 * Full screen width, visible pins, no focus outlines
 */

/* Full screen width wrapper */
.bulgaria-map-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    margin-left:  auto;
    margin-right: auto;
}

.bulgaria-map-container {
    width: 100%;
    height: 600px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

#bulgaria-map {
    width: 100%;
    height: 100%;
}

/* Map Filter Controls — "Филтри" toggle from the Figma design */
.map-filters {
    width: 100%;
    max-width: var(--basz-content-width, 1200px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.map-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: var(--basz-font-body);
    font-size: 16px;
    font-weight: 700;
    line-height: var(--basz-body-lh);
    color: #1A1A1A;
    transition: color 0.2s ease;
}

.map-filters-toggle:hover,
.map-filters-toggle[aria-expanded="true"] {
    color: var(--basz-color-orange);
}

.map-filters-toggle:focus-visible {
    outline: 2px solid var(--basz-color-orange);
    outline-offset: 4px;
    border-radius: var(--basz-radius);
}

.map-filters-icon {
    flex-shrink: 0;
}

.map-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-filter-options[hidden] {
    display: none;
}

/* Filter chips use the site's secondary-light / secondary button styles */
.map-filter-btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 24px;
    background: var(--basz-color-white);
    color: var(--basz-color-medium-dark-blue);
    border: 2px solid var(--basz-color-medium-dark-blue);
    border-radius: var(--basz-radius);
    cursor: pointer;
    font-family: var(--basz-font-body);
    font-size: 16px;
    font-weight: 700;
    line-height: var(--basz-body-lh);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-filter-btn:hover {
    color: var(--basz-color-orange);
    border-color: var(--basz-color-orange);
}

.map-filter-btn.active {
    background: var(--basz-color-medium-dark-blue);
    color: var(--basz-color-white);
    border-color: var(--basz-color-medium-dark-blue);
}

.map-filter-btn:focus-visible {
    outline: 2px solid var(--basz-color-orange);
    outline-offset: 2px;
}

/* Cluster bubble */
.map-cluster {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--basz-color-medium-dark-blue);
    border: 3px solid var(--basz-color-white);
    box-shadow: 0 2px 6px rgba(19, 27, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--basz-color-white);
    font-family: var(--basz-font-heading);
    font-size: 16px;
    font-weight: 700;
}

/* Info Window */
.map-info-window-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
    font-family: var(--basz-font-body);
    font-size: 16px;
    line-height: var(--basz-body-lh);
    color: #1A1A1A;
}

.map-office-thumbnail {
    width: 100%;
    max-height: 140px;
    border-radius: 8px;
    object-fit: cover;
}

.map-office-title {
    margin: 0;
    font-family: var(--basz-font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: var(--basz-heading-lh);
    color: var(--basz-color-medium-dark-blue);
}

.map-office-description,
.map-office-meta {
    margin: 0;
}

.map-office-meta {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.map-office-meta .map-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--basz-color-orange);
}

.map-office-meta a {
    color: var(--basz-color-medium-dark-blue);
    text-decoration: underline;
}

.map-office-meta a:hover {
    color: var(--basz-color-orange);
}

.map-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--basz-color-light-grey);
}

.map-btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: var(--basz-radius);
    cursor: pointer;
    font-family: var(--basz-font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: var(--basz-body-lh);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-btn--primary {
    flex-basis: 100%;
    background: var(--basz-color-orange);
    border-color: var(--basz-color-orange);
    color: var(--basz-color-white);
}

.map-btn--primary:hover {
    background: var(--basz-color-darker-orange);
    border-color: var(--basz-color-darker-orange);
    color: var(--basz-color-white);
}

.map-btn--secondary {
    background: var(--basz-color-white);
    border-color: var(--basz-color-medium-dark-blue);
    color: var(--basz-color-medium-dark-blue);
}

.map-btn--secondary:hover {
    border-color: var(--basz-color-orange);
    color: var(--basz-color-orange);
}

.map-btn:focus-visible {
    outline: 2px solid var(--basz-color-orange);
    outline-offset: 2px;
}

/* Street View Container */
#street-view-container {
    width: 100%;
    height: 400px;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

/* Google Maps Info Window Overrides */
.gm-style .gm-style-iw-c {
    padding: 16px 16px 20px !important;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(19, 27, 42, 0.18);
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
    padding: 0 !important;
}

.gm-style .gm-style-iw-ch {
    padding-top: 4px;
}

.gm-style .gm-style-iw-chr {
    align-items: flex-start;
    margin-bottom: 12px;
}

.gm-style .gm-ui-hover-effect {
    opacity: 0.6;
}

.gm-style .gm-ui-hover-effect:hover {
    opacity: 1;
}

/* Marker Visibility Improvements */
.gm-style img {
    max-width: none;
}

/* Enhanced Pin Styling */
.gm-style [data-pin-element],
.gm-style [data-pin-element] * {
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.gm-style [data-pin-element]:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
    z-index: 1000 !important;
}

/* Pin Element Custom Styling with Shadow */
.gm-style [data-pin-element] svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Remove focus outlines from all map elements */
.gm-style *:focus {
    outline: none;
}

.gm-style button:focus {
    outline: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bulgaria-map-container {
        height: 480px;
    }

    #bulgaria-map {
        min-height: 480px;
    }

    .map-filter-btn {
        padding: 6px 16px;
        font-size: 14px;
    }

    .map-info-window-content {
        max-width: 280px;
    }

    .map-office-title {
        font-size: 18px;
    }

    #street-view-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .bulgaria-map-container {
        height: 480px;
    }

    #bulgaria-map {
        min-height: 480px;
    }

    .map-info-window-content {
        max-width: 250px;
        gap: 8px;
        font-size: 14px;
    }

    .map-office-title {
        font-size: 16px;
    }

    .map-info-actions {
        padding-top: 8px;
    }

    .map-btn {
        min-height: 36px;
        padding: 6px 12px;
    }
}
