/* com_soundmap · la app de Sound of System ocupa la pantalla entera, por encima del tema (m3solaris no se toca). */
html.sos-app, html.sos-app body { height: 100%; overflow: hidden; }
.sos-shell { position: fixed; inset: 0; z-index: 1040; background: var(--bg, #0a0a0b); }
.sos-shell #app-container { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Los paneles de Bootstrap (offcanvas) ya van por encima (z-index 1045) */

/* El tema da estilo a todos los campos dentro de .tb-main (padding, fondo, borde, ancho máximo, radio).
   Dentro de la app mandan los de la web original (styles.css): se reponen con más especificidad. */
html.sos-app .sos-shell input[type="text"].search-input {
    max-width: none; padding: 10px 12px 10px 32px; background: var(--jj-bg); background-color: var(--jj-bg);
    border: 1px solid var(--jj-line); border-radius: 0; color: var(--jj-ink);
}
html.sos-app .sos-shell input[type="text"].search-input:focus { border-color: var(--jj-ink); }
html.sos-app .sos-shell select.category-select {
    max-width: none; padding: 10px 32px 10px 12px; background: var(--jj-bg); background-color: var(--jj-bg);
    border: 1px solid var(--jj-line); border-radius: 0;
}
html.sos-app .sos-shell select.category-select:focus { border-color: var(--jj-ink); }

/* 1.3.0 · Nombre del sitio junto a cada punto del mapa (mínimo, mono en mayúsculas) */
.sos-shell .custom-leaflet-marker { overflow: visible; }
.sos-shell .custom-leaflet-marker .marker-label {
    position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
    max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 9px; line-height: 1.2; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase; color: var(--jj-ink, #f3f4f6);
    text-shadow: 0 0 2px #000, 0 0 6px #000, 0 0 10px rgba(0,0,0,.8);
    pointer-events: auto; cursor: pointer; transition: color 200ms ease;
}
.sos-shell .custom-leaflet-marker:hover .marker-label,
.sos-shell .custom-leaflet-marker.playing .marker-label { color: var(--jj-accent, #ff7eab); }

/* 1.3.0 · Barra inferior tipo app en el móvil (como I Like You Like That), en negro */
.sos-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060;
    height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex; align-items: stretch; justify-content: space-around;
    background: rgba(9, 10, 15, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--jj-line, rgba(255,255,255,.1));
}
.sos-tabbar__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    position: relative; margin: 0; padding: 6px 0; border: 0; border-radius: 0; background: none;
    color: var(--jj-ink-soft, #9ca3af); text-decoration: none; -webkit-tap-highlight-color: transparent;
    font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
    transition: color 150ms ease;
}
.sos-tabbar__item i { font-size: 1.3rem; line-height: 1; }
.sos-tabbar__item b { color: var(--jj-ink, #f3f4f6); font-weight: 700; }
.sos-tabbar__item:active { transform: scale(.94); }
.sos-tabbar__item:hover, .sos-tabbar__item:focus-visible { color: var(--jj-ink, #f3f4f6); outline: none; }
.sos-tabbar__item.is-active, .sos-tabbar__item[aria-pressed="true"] { color: var(--jj-ink, #f3f4f6); }
.sos-tabbar__item.is-active::before { content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--jj-accent, #ff7eab); }
.sos-tabbar .soundwave { height: 20px; }
@media (max-width: 767.98px) {
    /* los botones de la cabecera pasan a la barra de abajo */
    .sos-shell .floating-header__actions { display: none !important; }
    /* los paneles se abren por encima de la barra, sin taparla */
    .sos-shell .offcanvas.offcanvas-end, .sos-shell .offcanvas-md.offcanvas-end, .sos-shell .offcanvas.offcanvas-bottom {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; height: auto !important;
    }
    .sos-shell .leaflet-bottom { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .sos-shell .custom-leaflet-marker .marker-label { max-width: 130px; }
}

/* 1.4.0 · Plano propio (SVG) con Leaflet: ocupa todo y se ve en negro (el plano se invierte a tinta clara sobre negro) */
.sos-shell #map.svg-mode { display: block; padding: 0; overflow: hidden; background: var(--jj-bg, #090a0f); }
.sos-shell #map.svg-mode .sos-plan { filter: invert(1) hue-rotate(180deg) grayscale(1) contrast(1.15) brightness(.85); opacity: .92; }
.sos-shell #map.svg-mode .leaflet-container, .sos-shell #map.svg-mode.leaflet-container { background: var(--jj-bg, #090a0f); }
.sos-shell .custom-leaflet-marker.label-left .marker-label { left: auto; right: 22px; text-align: right; }
.sos-shell #map.svg-mode .sos-plan.sos-plan--native { filter: none; opacity: 1; }

/* 1.5.0 · Acciones de la ficha: guardar en favoritos, WhatsApp, copiar enlace */
.sos-shell .details-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.sos-shell .details-action {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--jj-line, rgba(255,255,255,.12));
    background: transparent; color: var(--jj-ink, #f3f4f6); text-decoration: none; border-radius: 0; cursor: pointer;
    font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
    transition: border-color 150ms ease, color 150ms ease;
}
.sos-shell .details-action i { font-size: 14px; }
.sos-shell .details-action:hover, .sos-shell .details-action:focus-visible { border-color: var(--jj-ink, #f3f4f6); color: var(--jj-ink, #f3f4f6); outline: none; }
.sos-shell .details-action[aria-pressed="true"] { border-color: var(--jj-accent, #ff7eab); color: var(--jj-accent, #ff7eab); }
.sos-shell #details-share-wa:hover { border-color: #25d366; color: #25d366; }

/* 1.5.0 · Panel de favoritos (lista de reproducción) */
.sos-shell .favs-panel { background: var(--jj-bg, #090a0f); color: var(--jj-ink, #f3f4f6); border-left: 1px solid var(--jj-line, rgba(255,255,255,.1)); width: min(420px, 100vw); }
.sos-shell .favs-panel__head { border-bottom: 1px solid var(--jj-line, rgba(255,255,255,.1)); padding: 18px 20px; }
.sos-shell .favs-panel__head b { color: var(--jj-ink, #f3f4f6); margin-left: 6px; }
.sos-shell .favs-panel__body { padding: 16px 20px 24px; }
.sos-shell .favs-playall {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; margin-bottom: 14px;
    background: var(--jj-ink, #f3f4f6); color: var(--jj-bg, #090a0f); border: 0; border-radius: 0; cursor: pointer;
    font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
}
.sos-shell .favs-playall[hidden] { display: none; }
.sos-shell .favs-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--jj-line, rgba(255,255,255,.1)); }
.sos-shell .favs-item { display: grid; grid-template-columns: 40px minmax(0,1fr) 34px 34px; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--jj-line, rgba(255,255,255,.1)); }
.sos-shell .favs-item.is-current .favs-item__title { color: var(--jj-accent, #ff7eab); }
.sos-shell .favs-item button, .sos-shell .favs-item a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: none; border: 1px solid transparent; color: var(--jj-ink-soft, #9ca3af); text-decoration: none; border-radius: 0; cursor: pointer; }
.sos-shell .favs-item__play { width: 40px !important; height: 40px !important; border-color: var(--jj-line, rgba(255,255,255,.15)) !important; color: var(--jj-ink, #f3f4f6) !important; font-size: 18px; }
.sos-shell .favs-item button:hover, .sos-shell .favs-item a:hover { color: var(--jj-ink, #f3f4f6); }
.sos-shell .favs-item__txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sos-shell .favs-item__title { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sos-shell .favs-item__map { font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--jj-ink-soft, #9ca3af); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sos-shell .favs-empty { font-size: 13px; line-height: 1.6; color: var(--jj-ink-soft, #9ca3af); margin: 18px 0 0; }
.sos-shell .favs-empty[hidden] { display: none; }
/* barra del móvil con 5 botones */
.sos-tabbar__item { min-width: 0; }
.sos-tabbar__item span { white-space: nowrap; }
@media (max-width: 380px) { .sos-tabbar__item { font-size: 8px; letter-spacing: .08em; } }
.sos-shell .favs-panel__head { display: flex; justify-content: space-between; align-items: center; }

/* 1.5.1 · Créditos de grabación y foto: abajo de la ficha, pequeños */
.sos-shell .details-credits {
    margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--jj-line, rgba(255,255,255,.1));
    font-family: var(--jj-font-mono, ui-monospace, Menlo, monospace); font-size: 9px; line-height: 1.7; letter-spacing: .06em;
    color: var(--jj-ink-soft, #9ca3af); opacity: .75; white-space: pre-line;
}
.sos-shell .details-credits[hidden] { display: none; }

/* 1.6.2 · Acciones de la ficha solo con icono (el texto queda para lectores de pantalla y como aviso al pasar) */
.sos-shell .details-action { width: 42px; height: 42px; padding: 0; justify-content: center; position: relative; }
.sos-shell .details-action i { font-size: 17px; }
.sos-shell .details-action span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sos-shell .details-actions { gap: 10px; }

/* 1.7.0: más contraste en el nombre del mapa de la ficha y en los créditos (enlazados a su fuente) */
.details-meta #details-date.text-muted { color: #c4c9d4 !important; }
.details-credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 1.8.0: el menú (hamburguesa) va por encima de todo, también de la ficha de un sonido */
#settings-menu.offcanvas, #settings-menu { z-index: 1075 !important; }
/* sin reborde de color al abrir un panel (Bootstrap le da el foco al panel al abrirse, p. ej. desde un enlace compartido) */
#details-panel:focus, #details-panel:focus-visible, .offcanvas:focus, .offcanvas:focus-visible { outline: none !important; box-shadow: none !important; }
/* el idioma, abajo del menú */
.settings-menu__body { display: flex; flex-direction: column; }
.settings-menu__body .settings-group--lang { margin-top: auto; padding-top: 24px; }

/* 1.8.1: la X no ocupa una fila propia.
   Ficha del sonido (móvil): la X va encima de la foto, arriba a la derecha (como en escritorio). */
@media (max-width: 767.98px) {
    #details-panel .details-panel__mobile-head {
        position: absolute !important; top: 0; right: 0; left: auto; z-index: 30;
        min-height: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important;
    }
    #details-panel .details-panel__mobile-head .btn-close-x {
        position: static !important; width: 44px; height: 44px; color: #fff;
        text-shadow: 0 1px 3px rgba(0,0,0,.8);
    }
    #details-panel .details-panel__mobile-head .btn-close-x i { font-size: 18px; }
}
/* Menú (hamburguesa): la X va en la esquina, a la altura del primer bloque; sin cabecera vacía */
#settings-menu .settings-menu__head {
    position: absolute !important; top: 8px; right: 8px; z-index: 5;
    min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important;
}
#settings-menu .settings-menu__head-left { display: none; }
#settings-menu .settings-menu__head .btn-close-x { position: static !important; width: 40px; height: 40px; }
#settings-menu .settings-menu__body { padding-top: 20px !important; }
#settings-menu .settings-menu__body > .settings-group:first-child .form-label { padding-right: 44px; }

/* 1.8.2: botón «Parar todos los sonidos» del menú */
.menu-stop-all { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; background: transparent; color: var(--jj-ink, #f3f4f6); border: 1px solid var(--jj-line, rgba(255,255,255,.15)); font-family: var(--jj-font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.menu-stop-all:hover, .menu-stop-all:focus-visible { border-color: var(--jj-accent, #ff7eab); color: var(--jj-accent, #ff7eab); outline: none; }
.menu-stop-all i { font-size: 14px; }
/* 1.8.2: audio cargando: el botón de play late y la duración muestra «···» */
.details-player__btn.is-loading { animation: sos-loading 1s ease-in-out infinite; }
@keyframes sos-loading { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
