.map-overlay-container {
    background: #111827;
    color: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    overflow: hidden;
}
/**
 * Hotel Map Component Styles - Safari Compatible
 * Modern Google Maps integration with custom markers and popups
 */

/* Inline map variables to avoid import issues */
.map-component {
    /* Map Container */
    --map-container-bg: #ffffff;
    --map-container-border: #e5e7eb;
    --map-container-radius: 12px;
    --map-container-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --map-height: 500px;
    --map-z-index: 1000;
    
    /* Map Controls */
    --map-control-bg: #ffffff;
    --map-control-border: #d1d5db;
    --map-control-color: #374151;
    --map-control-hover-bg: #f9fafb;
    --map-control-active-bg: var(--event-cta-color, #8B5CF6);
    --map-control-active-color: #ffffff;
    --map-control-size: 40px;
    --map-control-radius: 8px;
    --map-control-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Map Markers */
    --marker-bg: var(--event-cta-color, #8B5CF6);
    --marker-color: #ffffff;
    --marker-size: 32px;
    --marker-border: var(--event-cta-hover, #7c3aed);
    --marker-shadow: 0 4px 8px color-mix(in srgb, var(--event-cta-color, #8B5CF6) 40%, transparent);
}

/* ========================================
   HOTEL MAP COMPONENT
   ======================================== */

/* Main Container */
.hotel-map-component {
    position: relative;
    width: 100%;
    font-family: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}

/* Map Container */
.hotel-map__container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hotel-map__map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* Ensure map fills container in embedded map view */
.embedded-map .hotel-map-component {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.embedded-map .hotel-map__container {
    flex: 1;
    min-height: 0;
}

/* Custom Markers (AdvancedMarkerElement) */
.hotel-map__marker {
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    
    /* Safari GPU acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.hotel-map__marker-content {
    background: var(--event-cta-color, #8B5CF6);
    color: var(--event-on-cta-color, #ffffff);
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--event-cta-color, #8B5CF6) 40%, transparent);
    position: relative;
    white-space: nowrap;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.hotel-map__marker:hover .hotel-map__marker-content {
    -webkit-transform: scale(1.1) translateZ(0);
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--event-cta-color, #8B5CF6) 50%, transparent);
}

.hotel-map__marker-price {
    font-weight: 700;
    line-height: 1;
}

.hotel-map__marker-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--event-cta-color, #8B5CF6);
}

/* Marker States */
.hotel-map__marker--featured .hotel-map__marker-content {
    background: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.hotel-map__marker--featured .hotel-map__marker-arrow {
    border-top-color: #f59e0b;
}

.hotel-map__marker--sold-out .hotel-map__marker-content {
    background: #9ca3af;
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.4);
}

.hotel-map__marker--sold-out .hotel-map__marker-arrow {
    border-top-color: #9ca3af;
}

/* Map Controls */
.map-controls-component {
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.map-controls--top-right {
    top: 0;
    right: 0;
}

.map-controls--top-left {
    top: 0;
    left: 0;
}

.map-controls--bottom-right {
    bottom: 0;
    right: 0;
}

.map-controls--bottom-left {
    bottom: 0;
    left: 0;
}

.map-control {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    outline: none;
}

.map-control:hover {
    background: #f9fafb;
    border-color: var(--event-cta-color, #8B5CF6);
    color: var(--event-cta-color, #8B5CF6);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--event-cta-color, #8B5CF6) 20%, transparent);
}

.map-control:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-cta-color, #8B5CF6) 30%, transparent);
}

.map-control:active {
    -webkit-transform: scale(0.95) translateZ(0);
    transform: scale(0.95) translateZ(0);
}

.map-control svg {
    width: 20px;
    height: 20px;
}

/* Fullscreen Mode */
.hotel-map-component.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    border-radius: 0;
    background: #000000;
}

.hotel-map-component.fullscreen .hotel-map__container {
    height: 100vh;
    border-radius: 0;
}

.hotel-map-component.fullscreen .hotel-map__map {
    border-radius: 0;
}

/* Loading State */
.hotel-map__loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.map-loading__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.map-loading__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid color-mix(in srgb, var(--event-cta-color, #8B5CF6) 20%, transparent);
    border-top: 3px solid var(--event-cta-color, #8B5CF6);
    border-radius: 50%;
    animation: map-loading-spin 1s linear infinite;
}

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

.map-loading__text {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

/* Error State */
.hotel-map__error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

.map-error__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    text-align: center;
}

.map-error__icon {
    width: 48px;
    height: 48px;
    color: #dc2626;
}

.map-error__title {
    font-size: 18px;
    font-weight: 600;
    color: #dc2626;
    margin: 0;
}

.map-error__message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.map-error__retry {
    background: var(--event-cta-color, #8B5CF6);
    color: var(--event-on-cta-color, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.map-error__retry:hover {
    background: var(--event-cta-hover, #7c3aed);
}

/* Map Popup Styles (for InfoWindow content) */
.map-popup-component {
    max-width: 320px;
    font-family: inherit;
    background: #111827; /* dark gray */
    color: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.map-popup__content {
    padding: 0;
    margin: 0;
}

.map-popup__image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.map-popup__details {
    padding: 16px;
    background: #111827;
}

.map-popup__title {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.map-popup__title-link {
    color: inherit;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.map-popup__title-link:hover {
    color: var(--event-cta-color, #A78BFA);
}

.map-popup__details-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.map-popup__detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.map-popup__detail svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.map-popup__detail--rating {
    color: #f59e0b;
}

.map-popup__detail--rating svg {
    fill: currentColor;
}

.map-popup__price {
    font-size: 18px;
    font-weight: 700;
    color: var(--event-accent-color, #34d399);
    margin: 0 0 12px 0;
}

.map-popup__action {
    display: flex;
    justify-content: center;
}

.map-popup__button {
    background: var(--event-primary-color, #7c3aed);
    color: var(--event-on-primary-color, #ffffff);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    -webkit-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.map-popup__button:hover {
    background: var(--event-cta-hover, #6d28d9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-controls-component {
        padding: 12px;
        gap: 6px;
    }
    
    .map-control {
        width: 44px;
        height: 44px;
    }
    
    .hotel-map__marker-content {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .map-popup-component {
        max-width: 280px;
    }
    
    .map-popup__details {
        padding: 12px;
    }
    
    .map-popup__title {
        font-size: 15px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hotel-map__marker-content,
    .map-control,
    .map-popup__button {
        -webkit-transition: none !important;
        transition: none !important;
        animation: none !important;
    }
    
    .hotel-map__marker:hover .hotel-map__marker-content {
        -webkit-transform: none;
        transform: none;
    }
    
    .map-loading__spinner {
        animation: none;
        border-top-color: var(--event-cta-color, #8B5CF6);
    }
}

/* Safari-Specific Optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .hotel-map-component {
        -webkit-font-smoothing: antialiased;
    }
    
    .hotel-map__marker,
    .map-control,
    .map-popup__button {
        -webkit-tap-highlight-color: transparent;
        -webkit-font-smoothing: antialiased;
    }
    
    .hotel-map__loading {
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hotel-map__marker-content {
        border: 2px solid #000000;
    }
    
    .map-control {
        border: 2px solid #000000;
    }
    
    .map-popup__button {
        border: 2px solid #000000;
    }
}

.gm-style .gm-style-iw-c {
    background-color: #1a1a1a !important;
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    max-width: 320px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 320px !important;
}

.gm-style .gm-style-iw-tc::after {
    background: #1a1a1a !important;
}

.gm-style .gm-style-iw-chr {
    position: absolute !important;
    right: 0 !important;
}

.gm-style button.gm-ui-hover-effect {
    top: 4px !important;
    right: 4px !important;
    width: 24px !important;
    height: 24px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gm-style button.gm-ui-hover-effect span {
    margin: 0 !important;
}

.gm-style button.gm-ui-hover-effect img {
    filter: invert(1) brightness(0.8);
}

/* Hide close button for tooltips (InfoWindows without .map-popup-component) */
.gm-style .gm-style-iw-c:not(:has(.map-popup-component)) button.gm-ui-hover-effect {
    display: none !important;
}

/* Remove any default InfoWindow spacing */
.gm-style .gm-style-iw {
    padding: 0 !important;
    margin: 0 !important;
}

.gm-style .gm-style-iw > div {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure popup content has no extra spacing */
.map-popup-component {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 1 !important;
}

.map-popup-component img {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}
