* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.home { overflow: hidden; }
body:not(.home) { overflow: auto; background: #FAFAF8; color: #161311; }

/* ===== MAPA ===== */
.agpwa-map {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #EDE3D0;
}

.agpwa-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    font-size: 14px;
    color: #6B6155;
    background: #F3EBDD;
    z-index: 1;
}
.agpwa-status.is-hidden { display: none; }

/* ===== BOTÓN "USAR MI UBICACIÓN EXACTA" ===== */
.agpwa-btn-ubicacion {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0));
    left: 16px;
    z-index: 890;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #2E7268;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.agpwa-btn-ubicacion:active { background: #F3EBDD; }
.agpwa-btn-ubicacion.is-cargando { color: #C9BFA9; pointer-events: none; }

/* El botón circular de menú y el panel offcanvas ahora viven en el plugin
   "AC Menú Flotante" (assets/css/ac-menu-flotante.css), no en el tema. */

/* ===== PANEL FLOTANTE: ORIGEN / DESTINO / RESULTADOS ===== */
.agpwa-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0));
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    padding: 14px;
    z-index: 900;
}

.agpwa-panel-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid #E4D9C4;
}
.agpwa-panel-field:last-of-type { border-bottom: none; }

.agpwa-panel-field input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 15px;
    font-family: inherit;
    color: #161311;
}
.agpwa-panel-field input::placeholder { color: #9A8F7E; }

.agpwa-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: #2E7268; }
.agpwa-dot-destino { background: #B54A2C; border-radius: 3px; }

/* ===== RESULTADOS ===== */
.agpwa-results { margin-top: 10px; padding-top: 10px; border-top: 1px solid #E4D9C4; }
.agpwa-results-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 14px;
    color: #6B6155;
}
.agpwa-results-row strong { color: #161311; font-size: 15px; }
.agpwa-results-price strong { color: #B54A2C; font-size: 20px; }

.agpwa-btn-reservar {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #B54A2C;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.agpwa-btn-reservar:hover { background: #9A3D22; }

/* Autocomplete de Google — asegurar que quede por encima de todo */
.pac-container { z-index: 2100 !important; border-radius: 10px; margin-top: 4px; }

@media (min-width: 720px) {
    .agpwa-panel {
        left: 24px;
        right: auto;
        bottom: auto;
        top: calc(24px + env(safe-area-inset-top, 0));
    }
    .agpwa-btn-ubicacion {
        top: auto;
        left: auto;
        bottom: calc(16px + env(safe-area-inset-bottom, 0));
        right: 16px;
    }
}
