/* ==========================================================================
   GoTo Venue Search - Map View Styles
   ========================================================================== */

/* Floating View Toggle (fixed pill, bottom center)
   ========================================================================== */

.gvs-view-toggle {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    gap: 0;
    background: var(--gvs-dark);
    border-radius: var(--gvs-radius-bar);
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gvs-view-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--gvs-radius-bar);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--gvs-transition-fast);
    line-height: 1;
    white-space: nowrap;
}

.gvs-view-toggle__btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.gvs-view-toggle__btn--active {
    background: var(--gvs-bg-white);
    color: var(--gvs-text-dark);
}

.gvs-view-toggle__btn--active:hover {
    background: var(--gvs-bg-white);
    color: var(--gvs-text-dark);
}

.gvs-view-toggle__btn svg {
    flex-shrink: 0;
}

.gvs-view-toggle--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Map Container
   ========================================================================== */

.gvs-map-container {
    width: 100%;
    margin-top: 8px;
}

.gvs-map {
    width: 100%;
    height: 500px;
    border-radius: var(--gvs-radius);
    overflow: hidden;
    box-shadow: var(--gvs-shadow-sm);
    border: 1px solid var(--gvs-border);
}

/* Leaflet overrides — prevent WordPress theme conflicts
   ========================================================================== */

.gvs-map img {
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.gvs-map .leaflet-control a {
    box-shadow: none;
}

.gvs-map .leaflet-control-zoom a {
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 16px;
    color: var(--gvs-text-dark);
    border-color: var(--gvs-border);
}

.gvs-map .leaflet-control-zoom a:hover {
    background: var(--gvs-bg-light);
}

/* Venue Card Overlay (shown on marker click)
   ========================================================================== */

.gvs-map-card {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gvs-bg-white);
    border: 1px solid var(--gvs-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.gvs-map-card--visible {
    opacity: 1;
    transform: translateY(0);
}

.gvs-map-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.gvs-map-card__link:hover .gvs-map-card__image img {
    transform: scale(1.05);
}

.gvs-map-card__image {
    height: 160px;
    overflow: hidden;
    background: var(--gvs-dark);
}

.gvs-map-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gvs-map-card__body {
    padding: 14px 16px;
}

.gvs-map-card__title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--gvs-text-dark) !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.gvs-map-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gvs-map-card__detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gvs-text-muted);
    line-height: 1;
}

.gvs-map-card__detail svg {
    flex-shrink: 0;
    color: var(--gvs-text-muted);
}

.gvs-map-card__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--gvs-transition-fast);
    z-index: 1;
}

.gvs-map-card__close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Single Venue Map Section
   ========================================================================== */

.gvs-venue-map-section {
    margin-top: 48px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gvs-venue-map-section__title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #151a1f !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    text-align: center !important;
    letter-spacing: -0.01em !important;
}

.gvs-venue-map-section__address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
}

.gvs-venue-map-section__address svg {
    flex-shrink: 0;
    color: #6b7280;
}

.gvs-venue-map {
    width: 100%;
    height: 360px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.gvs-venue-map img {
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.gvs-venue-map .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.gvs-venue-map .leaflet-popup-content {
    margin: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
}

.gvs-venue-map .leaflet-popup-tip {
    box-shadow: none;
}

.gvs-venue-map .leaflet-control-zoom a {
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 16px;
    color: #151a1f;
    border-color: #e2e5e9;
}

@media (max-width: 767px) {
    .gvs-venue-map-section {
        margin-top: 32px;
    }

    .gvs-venue-map-section__title {
        font-size: 18px !important;
    }

    .gvs-venue-map {
        height: 280px;
        border-radius: 12px;
    }
}

/* MarkerCluster overrides — brand color
   ========================================================================== */

.gvs-map .marker-cluster-small,
.gvs-map .marker-cluster-medium,
.gvs-map .marker-cluster-large {
    background-color: rgba(255, 68, 85, 0.2);
}

.gvs-map .marker-cluster-small div,
.gvs-map .marker-cluster-medium div,
.gvs-map .marker-cluster-large div {
    background-color: var(--gvs-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
