/*
 * Buzones de Denuncia Ciudadana.
 * Complementa transparencia.css (tokens --tx-*) con el mapa y la lista.
 */

.bz-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Contacto (sobre .tx-directory de Transparencia) */
.bz-directory-sub {
    display: block;
    margin: .35rem 0 0 1.5rem;
    color: var(--tx-muted);
    font-size: .9rem;
    font-weight: 600;
}

.bz-tel {
    display: inline-block;
    min-width: 2.8rem;
    color: var(--tx-green);
    font-size: 1.15rem;
}

.bz-break {
    overflow-wrap: anywhere;
}

.bz-item-extra,
.bz-pop .bz-pop-extra {
    color: var(--tx-green-bright) !important;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Mapa y lista */
.bz-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(19rem, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.bz-map-wrap {
    position: sticky;
    top: 6.5rem;
    overflow: hidden;
    border: 1px solid var(--tx-line);
    border-radius: var(--tx-radius);
    background: var(--tx-wash);
    box-shadow: var(--tx-shadow);
}

.bz-map {
    width: 100%;
    height: min(72vh, 640px);
    min-height: 420px;
    font-family: inherit;
}

.bz-noscript {
    padding: 1.5rem;
    color: var(--tx-muted);
}

.bz-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    max-height: min(72vh, 640px);
    min-height: 420px;
    margin: 0;
    padding: 0 .35rem 0 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
}

.bz-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    padding: .25rem .8rem .25rem .25rem;
    border: 1px solid var(--tx-line);
    border-radius: 14px;
    background: var(--tx-paper);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.bz-item:hover {
    border-color: #bdc9c1;
}

.bz-item.is-active {
    border-color: var(--tx-gold);
    box-shadow: 0 0 0 3px rgba(195, 162, 110, .22);
}

.bz-item-btn {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    width: 100%;
    padding: .7rem .5rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bz-item-btn:focus-visible {
    outline: 3px solid rgba(11, 62, 35, .25);
    outline-offset: 0;
}

.bz-num {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--tx-green);
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
}

.bz-item.is-active .bz-num {
    background: var(--tx-gold);
    color: var(--tx-green);
}

.bz-item-body {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.bz-item-name {
    color: var(--tx-green);
    font-weight: 700;
    line-height: 1.3;
}

.bz-item-addr {
    color: var(--tx-muted);
    font-size: .86rem;
    line-height: 1.4;
}

.bz-item-tag {
    align-self: flex-start;
    margin-top: .2rem;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--tx-wash);
    color: #7a6a4c;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.bz-route {
    color: var(--tx-green-bright);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.bz-route:hover,
.bz-route:focus-visible {
    text-decoration: underline;
}

.bz-route i {
    font-size: .7rem;
}

/* Marcadores */
.bz-marker {
    background: transparent;
    border: 0;
}

.bz-marker span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid var(--tx-gold);
    border-radius: 999px;
    background: var(--tx-green);
    color: #fff;
    font-family: 'Krub', sans-serif;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(11, 62, 35, .35);
    transition: transform .15s ease;
}

.bz-marker.is-approx span {
    border-style: dashed;
}

.bz-marker.is-active span,
.bz-marker:hover span {
    background: var(--tx-gold);
    border-color: var(--tx-green);
    color: var(--tx-green);
    transform: scale(1.15);
}

.bz-marker.is-active {
    z-index: 1000 !important;
}

.bz-pop {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-family: 'Krub', sans-serif;
    color: var(--tx-ink);
}

.bz-pop-n {
    color: var(--tx-gold);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bz-pop strong {
    color: var(--tx-green);
    font-size: .98rem;
    line-height: 1.25;
}

.bz-pop span:not(.bz-pop-n) {
    color: var(--tx-muted);
    font-size: .82rem;
    line-height: 1.4;
}

.bz-pop em {
    color: #7a6a4c;
    font-size: .74rem;
    font-style: normal;
    font-weight: 700;
}

.bz-pop a {
    margin-top: .3rem;
    color: var(--tx-green-bright);
    font-weight: 700;
}

.bz-page .leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.bz-page .leaflet-container a {
    color: var(--tx-green-bright);
}

/* Cartel */
.bz-flyer {
    padding-top: 0;
}

.bz-flyer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--tx-radius);
    background: var(--tx-wash);
}

.bz-flyer-title {
    margin: 0;
    color: var(--tx-green);
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    letter-spacing: -.035em;
    line-height: 1.05;
}

.bz-flyer-text {
    margin: 1rem 0 0;
    color: var(--tx-muted);
    line-height: 1.65;
}

.bz-flyer-img {
    display: block;
    width: 100%;
    max-width: 420px;
    justify-self: center;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: var(--tx-shadow);
}

.bz-flyer-img img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .bz-layout {
        grid-template-columns: 1fr;
    }

    .bz-map-wrap {
        position: relative;
        top: auto;
    }

    .bz-map {
        height: 62vh;
        min-height: 340px;
        max-height: 520px;
    }

    .bz-list {
        max-height: none;
        min-height: 0;
        overflow: visible;
        padding: 0;
    }

    .bz-flyer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .bz-item {
        grid-template-columns: 1fr;
        padding: .25rem .25rem .7rem;
    }

    .bz-route {
        padding-left: 3.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bz-marker span {
        transition: none;
    }
}
