/* Google Maps Controls - Lucid Glass Style */

/* Controlli Zoom */
.gm-style .gm-control-active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.gm-style .gm-control-active:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Pulsanti Zoom */
.gm-style .gm-control-active button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
}

.gm-style .gm-control-active button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli Map Type */
.gm-style .gm-style-mtc {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
}

.gm-style .gm-style-mtc button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
}

.gm-style .gm-style-mtc button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.gm-style .gm-style-mtc button:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}

/* Controllo Fullscreen */
.gm-style .gm-fullscreen-control {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
    z-index: 1000 !important;
    position: relative !important;
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
    top: auto !important;
}

.gm-style .gm-fullscreen-control button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gm-fullscreen-control button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli Street View (se abilitati) */
.gm-style .gm-style-sv {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
}

.gm-style .gm-style-sv button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gm-style-sv button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli gmnoprint (elementi non stampabili) */
.gm-style .gmnoprint {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
    transition: all 0.3s ease !important;
}

.gm-style .gmnoprint:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gmnoprint button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gmnoprint button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli gm-bundled-control (controlli raggruppati) */
.gm-style .gm-bundled-control {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
    transition: all 0.3s ease !important;
}

.gm-style .gm-bundled-control:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-bundled-control button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gm-bundled-control button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli generici Google Maps */
.gm-style .gm-control {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
    transition: all 0.3s ease !important;
}

.gm-style .gm-control:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-control button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gm-control button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli di navigazione */
.gm-style .gm-navigation-control {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 8px !important;
    transition: all 0.3s ease !important;
}

.gm-style .gm-navigation-control:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-navigation-control button {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.gm-style .gm-navigation-control button:hover {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Controlli aggiuntivi Google Maps */
.gm-style .gm-style-cc,
.gm-style .gm-style-cc button,
.gm-style .gm-style-cc div {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.gm-style .gm-style-cc:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Controlli di scala */
.gm-style .gm-style-mtc div,
.gm-style .gm-style-mtc span {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Controlli di attribuzione */
.gm-style .gm-style-cc a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.gm-style .gm-style-cc a:hover {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Rimuovi bordi e ombre predefiniti */
.gm-style .gm-control-active,
.gm-style .gm-style-mtc,
.gm-style .gm-fullscreen-control,
.gm-style .gm-style-sv,
.gm-style .gmnoprint,
.gm-style .gm-bundled-control,
.gm-style .gm-control,
.gm-style .gm-navigation-control,
.gm-style .gm-style-cc {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Animazioni per i controlli */
@keyframes lucidGlow {
    0% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 255, 255, 0.1); }
    100% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
}

.gm-style .gm-control-active:hover,
.gm-style .gm-style-mtc:hover,
.gm-style .gm-fullscreen-control:hover,
.gm-style .gm-style-sv:hover,
.gm-style .gmnoprint:hover,
.gm-style .gm-bundled-control:hover,
.gm-style .gm-control:hover,
.gm-style .gm-navigation-control:hover,
.gm-style .gm-style-cc:hover {
    animation: lucidGlow 2s ease-in-out infinite !important;
}

/* Info Window Styling - Lucid Glass */
.gm-style .gm-style-iw {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-width: none !important;
}

/* Info Window Content */
.info-window-content {
    background: transparent;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
    margin: 0;
}

.info-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-window-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.info-window-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.info-window-type {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-window-body {
    padding: 12px 16px;
}

.info-window-address,
.info-window-phone,
.info-window-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.info-window-address svg,
.info-window-phone svg,
.info-window-hours svg {
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.info-window-actions {
    padding: 12px 16px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.google-maps-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.google-maps-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.google-maps-btn:active {
    transform: translateY(0);
}

.google-maps-btn svg {
    color: rgba(255, 255, 255, 0.8);
}

/* Assicura che i tab dell'app non interferiscano con i controlli della mappa */
.app-tabs {
    z-index: 100 !important;
}

/* Assicura che i controlli della mappa siano sempre sopra i tab */
.gm-style .gm-control-active,
.gm-style .gm-style-mtc,
.gm-style .gm-fullscreen-control,
.gm-style .gm-style-sv,
.gm-style .gmnoprint,
.gm-style .gm-bundled-control,
.gm-style .gm-control,
.gm-style .gm-navigation-control,
.gm-style .gm-style-cc {
    z-index: 1000 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gm-style .gm-control-active,
    .gm-style .gm-style-mtc,
    .gm-style .gm-fullscreen-control,
    .gm-style .gm-style-sv,
    .gm-style .gmnoprint,
    .gm-style .gm-bundled-control,
    .gm-style .gm-control,
    .gm-style .gm-navigation-control,
    .gm-style .gm-style-cc {
        margin: 4px !important;
    }
    
    .gm-style .gm-control-active button,
    .gm-style .gm-style-mtc button,
    .gm-style .gm-fullscreen-control button,
    .gm-style .gm-style-sv button,
    .gm-style .gmnoprint button,
    .gm-style .gm-bundled-control button,
    .gm-style .gm-control button,
    .gm-style .gm-navigation-control button,
    .gm-style .gm-style-cc button {
        font-size: 14px !important;
        padding: 6px !important;
    }
    
    /* Assicura che il pulsante fullscreen sia sempre sopra i tab su mobile */
    .gm-style .gm-fullscreen-control {
        z-index: 9999 !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        margin: 0 !important;
    }
    
    /* Quando la mappa è in fullscreen, posiziona il pulsante in alto a destra */
    .gm-style .gm-fullscreen-control.gm-fullscreen-control-fullscreen {
        top: 20px !important;
        bottom: auto !important;
        right: 20px !important;
        z-index: 9999 !important;
    }
    
    /* Assicura che il pulsante fullscreen sia sempre visibile anche quando la mappa è ingrandita */
    .gm-style .gm-fullscreen-control button {
        z-index: 9999 !important;
        position: relative !important;
    }
    
    .info-window-content {
        max-width: 280px;
    }
    
    .info-window-header {
        padding: 12px 12px 8px 12px;
    }
    
    .info-window-body {
        padding: 8px 12px;
    }
    
    .info-window-actions {
        padding: 8px 12px 12px 12px;
    }
}

/* Regole aggiuntive per schermi molto piccoli */
@media (max-width: 480px) {
    .gm-style .gm-fullscreen-control {
        bottom: 15px !important;
        right: 15px !important;
        z-index: 9999 !important;
    }
    
    .gm-style .gm-fullscreen-control.gm-fullscreen-control-fullscreen {
        top: 15px !important;
        right: 15px !important;
    }
}

/* Assicura che il pulsante fullscreen sia sempre sopra qualsiasi elemento dell'app */
.gm-style .gm-fullscreen-control {
    z-index: 9999 !important;
}

/* Nasconde il pulsante scorciatoie da tastiera */
.gm-style button[aria-label*="Scorciatoie da tastiera"],
.gm-style button[title*="Scorciatoie da tastiera"],
.gm-style .gm-style-cc button[aria-label*="Scorciatoie da tastiera"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Quando la mappa è in fullscreen, assicura che il pulsante di uscita sia sempre visibile */
body.fullscreen .gm-style .gm-fullscreen-control {
    z-index: 9999 !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
}
