/* ==============================================
   SISTEC TELECOM - COMPROBADOR DE COBERTURA
   Mobile-first
   ============================================== */

.hero-cobertura-corta {
    min-height: 38vh;
    padding-bottom: 60px;
}

/* ---------- Botón principal ---------- */
.coverage-checker {
    text-align: center;
    margin-bottom: 8px;
}

.coverage-btn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 360px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #8E37D7 0%, #00B4D8 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 20px 45px rgba(110, 69, 226, 0.35);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.coverage-btn:hover,
.coverage-btn:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 25px 55px rgba(110, 69, 226, 0.45);
    outline: none;
}

.coverage-btn:active {
    transform: translateY(0) scale(0.98);
}

.coverage-btn-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 1.7rem;
    animation: coverage-pulso 2.4s ease-in-out infinite;
}

@keyframes coverage-pulso {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
    50%      { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
}

.coverage-btn.cargando .coverage-btn-icono {
    animation: none;
}

.coverage-btn.cargando .coverage-btn-icono i {
    animation: coverage-rotar 1s linear infinite;
}

@keyframes coverage-rotar {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.coverage-aviso {
    margin-top: 18px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
    color: #64748B;
}

.coverage-aviso i {
    color: #8E37D7;
    margin-right: 4px;
}

/* ---------- Resultado ---------- */
.coverage-resultado {
    max-width: 720px;
    margin: 32px auto 0;
    border-radius: 20px;
    padding: 28px 22px;
    text-align: center;
    border: 2px solid var(--gris-claro);
    background: var(--blanco);
    box-shadow: var(--sombra-media);
    animation: coverage-aparecer 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes coverage-aparecer {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.coverage-resultado-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
}

.coverage-resultado-titulo {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--negro-texto);
    margin-bottom: 8px;
}

.coverage-resultado-zona {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 30px;
    background: var(--gris-bg);
    color: var(--gris-texto);
}

.coverage-resultado-texto {
    font-size: 0.98rem;
    color: var(--gris-texto);
    max-width: 480px;
    margin: 0 auto;
}

.coverage-resultado-precision {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--gris-medio);
}

.coverage-resultado-acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.coverage-resultado-acciones .boton {
    width: 100%;
}

/* Estados */
.coverage-resultado--cobertura {
    border-color: #4caf50;
    background: linear-gradient(180deg, #ffffff 0%, #f3faf3 100%);
}

.coverage-resultado--cobertura .coverage-resultado-icono {
    background: linear-gradient(135deg, #43a047, #66bb6a);
}

.coverage-resultado--construccion {
    border-color: #fb8c00;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
}

.coverage-resultado--construccion .coverage-resultado-icono {
    background: linear-gradient(135deg, #fb8c00, #ffb74d);
}

.coverage-resultado--sin-cobertura {
    border-color: #94a3b8;
}

.coverage-resultado--sin-cobertura .coverage-resultado-icono {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.coverage-resultado--error {
    border-color: #ef4444;
}

.coverage-resultado--error .coverage-resultado-icono {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* ---------- Mapa ---------- */
.coverage-leyenda {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 30px 0 16px;
    flex-wrap: wrap;
}

.leyenda-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--gris-claro);
}

.leyenda-gris  { background: #9e9e9e; }
.leyenda-rojo  { background: #e53935; }

.leyenda-tu {
    background: #fff;
    position: relative;
}

.leyenda-tu::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #2cd8d5;
    border: 3px solid #fff;
}

.coverage-mapa-container {
    width: 100%;
    height: 52vh;
    min-height: 360px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sombra-elevada);
    border: 3px solid var(--gris-claro);
    z-index: 0;
    background: var(--gris-bg);
}

.coverage-mapa-container .leaflet-container {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    border-radius: 24px;
}

.coverage-mapa-container .leaflet-control-attribution {
    font-size: 9px;
}

.coverage-tip {
    text-align: center;
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--gris-texto);
}

.coverage-tip i {
    color: #8E37D7;
    margin-right: 4px;
}

.coverage-meta {
    text-align: center;
    margin-top: 18px;
    font-size: 0.78rem;
    color: var(--gris-medio);
}

.coverage-fallback {
    margin-top: 24px;
}

/* Marcadores del mapa */
.coverage-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2cd8d5;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px rgba(44, 216, 213, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.coverage-marker--tocado {
    background: #8E37D7;
    box-shadow: 0 0 0 3px rgba(142, 55, 215, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---------- Responsive (desktop) ---------- */
@media (min-width: 600px) {
    .coverage-btn {
        flex-direction: row;
        justify-content: center;
        gap: 18px;
        max-width: 520px;
        padding: 22px 32px;
        font-size: 1.2rem;
    }

    .coverage-btn-icono {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .coverage-resultado {
        padding: 36px 40px;
    }

    .coverage-resultado-acciones {
        flex-direction: row;
        justify-content: center;
    }

    .coverage-resultado-acciones .boton {
        width: auto;
        min-width: 200px;
    }

    .coverage-mapa-container {
        height: 60vh;
        min-height: 480px;
    }
}

@media (min-width: 900px) {
    .coverage-mapa-container {
        height: 65vh;
    }
}
