/*
 * mapa.css
 * Estilos da página Mapa — ESccb
 * Colocar em: assets/css/mapa.css
 */

/* ── Banner ──────────────────────────────────────────────────────────────── */
[data-page="mapa"] .profile-wid-bg::before {
    opacity: 0.3;
    background: #f8f8f8;
    background: -webkit-gradient(linear, left bottom, left top, from(#000), to(#1a3a5c));    
    background: linear-gradient(to top, #000, #1a3a5c);
}

/* ── Mapa a 100% dentro do tab — sem padding lateral extra ───────────────── */
[data-page="mapa"] .tab-content .col-12 {
    padding-left: 0;
    padding-right: 0;
}


/* ── Contentor do mapa ───────────────────────────────────────────────────── */
.map-container {
    position: relative;
    overflow: hidden;
    height: 560px;       /* altura do mapa — ajusta conforme necessário */
    width: 100%;
    border-radius: 0 0 8px 8px;
}

#gmap {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Overlay escuro subtil sobre o mapa */
.map-container::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 1;
}

/* ── Link "Como Chegar" ──────────────────────────────────────────────────── */
.map-link {
    position: absolute;
    top: 12px; right: 16px;
    z-index: 10;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.map-link:hover {
    background: #405189;
    color: #fff;
    text-decoration: none;
}

.map-link i { margin-right: 6px; }

/* ── Marker: wrapper VILA REAL + label ───────────────────────────────────── */
.map-marker-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.map-marker-vila-real {
    font-weight: 300;
    font-size: 44px;
    color: #EE0000;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.map-marker-label {
    background: rgba(0,0,0,0.75);
    border-left: 3px solid #F9A825;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
    pointer-events: none;
    display: inline-block;
    border-radius: 0 4px 4px 0;
}

.map-marker-label strong {
    display: block;
    font-size: 13px;
    font-weight: normal;
    color: #F9A825;
    margin-bottom: 2px;
}

/* ── Info-box: caixa de distâncias no canto esquerdo ─────────────────────── */
#map-info-box {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.65);
    border-left: 3px solid #F9A825;
    padding: 10px 16px;
    pointer-events: none;
    border-radius: 0 4px 4px 0;
}

#map-info-box .compact p {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 6px;
    line-height: 1.5;
}

#map-info-box .compact p:last-child { margin-bottom: 0; }

#map-info-box .compact i {
    color: #F9A825;
    font-size: 11px;
}

#map-info-box .map-info-school {
    color: #fff;
    font-size: 12px;
    margin-bottom: 3px;
}

#map-info-box .map-info-divider {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 6px 0 !important;
    padding: 0 !important;
}

/* Rotas: versão curta (mobile) / completa (desktop) */
.map-route-short { display: none; }
.map-route-full  { display: inline; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .map-container { height: 380px; }

    .map-hide-mobile { display: none !important; }

    .map-route-short { display: inline; }
    .map-route-full  { display: none; }

    #map-info-box { padding: 8px 12px; top: 8px; left: 8px; }
    #map-info-box .compact p { font-size: 11px; margin-bottom: 4px; white-space: nowrap; }

    .map-marker-vila-real { font-size: 28px; }
}

/* ── Dark Mode ───────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .map-container::after {
    background: rgba(0,0,0,0.3);
}

/* ── Legenda da foto do banner ───────────────────────────────────────────── */
[data-page="mapa"] .mapa-profile-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

[data-page="mapa"] .mapa-profile-left {
    flex: 1;
    min-width: 0;
}

[data-page="mapa"] .mapa-banner-legenda {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

[data-page="mapa"] .mapa-legenda-linha1 {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.02em;
    margin: 0 0 2px 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}

[data-page="mapa"] .mapa-legenda-linha2 {
    font-size: 0.68rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.52);
    letter-spacing: 0.03em;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}

@media (max-width: 576px) {
    [data-page="mapa"] .mapa-profile-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    [data-page="mapa"] .mapa-banner-legenda {
        align-items: flex-start;
        text-align: left;
    }
}
