/* /assets/css/mapa-catastro-liebana.css */

.tool--mapa-catastro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem var(--page-padding, 1rem);
}

.tool--mapa-catastro .tool__panel {
    background: var(--card-bg, #ffffff);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
}

.tool--mapa-catastro .tool__panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.tool--mapa-catastro .tool__tips {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.tool--mapa-catastro .tool__tips li {
    margin-bottom: 0.25rem;
}

.hero-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:1rem;
    margin-top:1rem;
}
.hero__kicker{
    margin:0 0 .35rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.8rem;
    color:#f4dfc7;
}
.goto-grid{
    display:flex;
    flex-wrap:wrap;
    gap:.4rem;
}
.goto-btn{
    border:1px solid rgba(0,0,0,.15);
    background:rgba(255,255,255,.9);
    color:#4b2f1e;
    border-radius:999px;
    padding:.35rem .75rem;
    cursor:pointer;
    font-weight:600;
    transition:background .2s ease,transform .2s ease;
}
.goto-btn:hover{
    background:#fee6c8;
    transform:translateY(-1px);
}
.base-switcher__buttons{
    display:flex;
    gap:.5rem;
}
.base-btn{
    flex:1;
    border:1px solid rgba(255,255,255,.4);
    background:rgba(255,255,255,.15);
    color:#fff;
    border-radius:12px;
    padding:.55rem .65rem;
    text-align:left;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    gap:.15rem;
    transition:background .2s ease,border-color .2s ease;
}
.base-btn small{font-size:.75rem;opacity:.8;}
.base-btn.is-active{
    background:#fff;
    color:#1f2937;
    border-color:#fff;
    box-shadow:0 8px 20px rgba(0,0,0,.2);
}
.overlay-switcher{
    display:flex;
    flex-direction:column;
    gap:.35rem;
}
.overlay-toggle{
    display:flex;
    align-items:center;
    gap:.4rem;
    font-size:.9rem;
    background:rgba(255,255,255,.15);
    padding:.45rem .6rem;
    border-radius:10px;
}
.overlay-toggle input{accent-color:#f97316;}
.share-box{
    display:flex;
    flex-direction:column;
    gap:.35rem;
}

#mapa-catastro-liebana {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Nota de fuente */
.tool--mapa-catastro .tool__note {
    font-size: 0.8rem;
    color: #666;
}
.tool--mapa-catastro .tool__history{
    margin-top:1.25rem;
    padding:1rem;
    border:1px solid rgba(0,0,0,.08);
    border-radius:12px;
    background:#fffaf3;
}
.tool--mapa-catastro .tool__history h3{
    margin:.1rem 0 .3rem;
    font-size:1rem;
}
.tool--mapa-catastro .tool__history ul{
    list-style:none;
    padding:0;
    margin:.5rem 0 0;
    display:flex;
    flex-direction:column;
    gap:.35rem;
}
.tool--mapa-catastro .tool__history button{
    border:1px solid rgba(0,0,0,.15);
    background:#fff;
    border-radius:999px;
    padding:.3rem .6rem;
    font-size:.9rem;
    text-align:left;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:space-between;
    transition:background .2s ease;
}
.tool--mapa-catastro .tool__history button:hover{background:#f6e1c1;}
.share-btn{
    border:1px solid rgba(0,0,0,.15);
    background:#0f172a;
    color:#fff;
    border-radius:999px;
    padding:.35rem .85rem;
    cursor:pointer;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:.35rem;
}
.share-btn::before{
    content:'🔗';
}
.share-status{
    font-size:.85rem;
    color:#0f172a;
}
.map-shell{
    position:relative;
    padding:0 10px;
}
.map-shell .map-hint{
    position:absolute;
    top:12px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(17,24,39,.9);
    color:#f1f5f9;
    padding:.45rem .75rem;
    border-radius:999px;
    font-size:.85rem;
    pointer-events:none;
    opacity:0;
    transition:opacity .2s ease;
}
.map-shell .map-hint.show{opacity:1;}
.map-loader{
    position:absolute;
    inset:0;
    background:rgba(255,255,255,.72);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:.4rem;
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
}
.map-loader.active{opacity:1;}
.map-loader .spinner{
    width:28px;height:28px;
    border:3px solid rgba(15,23,42,.2);
    border-top-color:#f97316;
    border-radius:50%;
    animation:spin 0.9s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

.parcel-info{
    margin-top:1rem;
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    border-radius:12px;
    padding:1rem;
    box-shadow:0 4px 14px rgba(0,0,0,.06);
}
.parcel-info h3{
    margin:.1rem 0 .5rem;
    font-size:1rem;
}
.parcel-info .parcel-placeholder{
    margin:0;
    color:#6b7280;
    font-size:.92rem;
}
.parcel-info .parcel-details{
    font-size:.92rem;
    color:#1f2937;
}
.parcel-info .parcel-details--raw{
    margin-top:.5rem;
    font-size:.85rem;
    color:#475569;
    overflow:auto;
}
.parcel-info .parcel-details a{
    color:#2563eb;
    text-decoration:none;
}
.parcel-details--raw{
    overflow:auto;
}
.parcel-details--raw table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    color:#1f2937;
    font-size:.85rem;
}
.parcel-details--raw th,
.parcel-details--raw td{
    border:1px solid #d6d3d1;
    padding:.3rem .4rem;
    text-align:left;
}
.parcel-details--raw tr:nth-child(odd){
    background:#fafafa;
}
.parcel-details--raw a{
    color:#0f62fe;
    word-break:break-all;
}
.parcel-popup-wrap .leaflet-popup-content-wrapper,
.parcel-popup-wrap .leaflet-popup-tip{
    background:#0f172a;
    color:#f8fafc;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.1);
    box-shadow:0 10px 25px rgba(0,0,0,.35);
}
.parcel-popup-wrap .leaflet-popup-tip{
    border-top-color:rgba(255,255,255,.1);
}
.parcel-popup{
    font-size:.9rem;
}
.parcel-popup hr{
    border:none;
    height:1px;
    background:rgba(255,255,255,.2);
    margin:.4rem 0 .6rem;
}
.parcel-popup__content{
    max-height:200px;
    overflow:auto;
}
.parcel-popup__content a{
    color:#38bdf8;
}

/* Mobile first: ya va en columna; en escritorio ampliamos un poco */
@media (min-width: 900px) {
    .tool--mapa-catastro {
        padding: 1.5rem 2rem 2rem;
    }

    #mapa-catastro-liebana {
        height: 75vh;
    }
}
