/* Aviso de mapas y vídeos, marcadores de contenido de terceros, datos del titular en el pie. */

.consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    max-width: 34rem;
    padding: 1.25rem;
    background: #1f2937;
    color: #f3f4f6;
    border: 1px solid #84cc16;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

.consent-titulo {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.consent-texto {
    margin: 0;
    color: #e5e7eb;
}

.consent-banner a,
.consent-dialogo a,
.consent-placeholder a {
    color: #bef264;
    text-decoration: underline;
}

.consent-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* «Aceptar» y «Rechazar» comparten la misma clase: mismo tamaño, color y estilo. */
.consent-btn {
    flex: 1 1 8rem;
    min-height: 44px;
    padding: 0.6rem 1rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    background: #84cc16;
    border: 2px solid #84cc16;
    border-radius: 8px;
    cursor: pointer;
}

.consent-btn--secundario {
    color: #f3f4f6;
    background: transparent;
    border-color: #9ca3af;
}

.consent-btn:hover {
    filter: brightness(1.08);
}

.consent-btn:focus-visible,
.consent-abrir:focus-visible,
.consent-banner a:focus-visible,
.consent-dialogo a:focus-visible,
.consent-placeholder a:focus-visible,
.consent-opcion input:focus-visible {
    outline: 3px solid #fde047;
    outline-offset: 2px;
}

.consent-dialogo {
    width: min(36rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 1.5rem;
    background: #1f2937;
    color: #f3f4f6;
    border: 1px solid #84cc16;
    border-radius: 12px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

.consent-dialogo::backdrop {
    background: rgba(15, 23, 42, 0.75);
}

.consent-dialogo .consent-titulo {
    font-size: 1.25rem;
}

.consent-dialogo .consent-titulo:focus {
    outline: none;
}

.consent-opcion {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.consent-opcion--fija {
    display: block;
}

.consent-opcion input {
    width: 24px;
    height: 24px;
    margin: 10px;
    accent-color: #84cc16;
}

.consent-opcion label,
.consent-opcion-nombre {
    margin: 0;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
}

.consent-opcion-desc {
    grid-column: 2;
    margin: 0;
    font-size: 0.9rem;
    color: #d1d5db;
}

.consent-opcion--fija .consent-opcion-desc {
    margin-top: 0.25rem;
}

/* Marcador en lugar del mapa o del vídeo mientras no se acepte. */
iframe[data-consent-src] {
    display: none !important;
}

.consent-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    min-height: 200px;
    padding: 1.25rem;
    background: #1f2937;
    color: #e5e7eb;
    border: 1px dashed #6b7280;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.consent-placeholder p {
    margin: 0;
}

/* El color del aviso no lo pisan los estilos del artículo */
div.consent-placeholder p {
    color: inherit;
}

.consent-placeholder--cubre {
    position: absolute;
    inset: 0;
    min-height: 0;
}

.consent-placeholder .consent-btn {
    flex: 0 0 auto;
}

.consent-placeholder__acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.consent-abrir {
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
    min-height: 24px;
}

.titular-legal {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.pie-legal-simple {
    padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    background: #0f172a;
    color: #cbd5e1;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    text-align: center;
}

.pie-legal-simple a {
    color: #e5e7eb;
}

.pie-legal-simple .legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .consent-banner {
        left: 0.5rem;
        right: 0.5rem;
        bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
        padding: 1rem;
        font-size: 0.9rem;
    }

    .consent-dialogo {
        padding: 1.1rem;
    }
}

/* Primera capa de protección de datos bajo los formularios. */
.info-proteccion-datos {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.info-proteccion-datos a {
    color: #bef264;
    text-decoration: underline;
}

/* Datos que el propietario tiene que confirmar antes de publicar (ver comprobar-legal.py). */
mark.pendiente {
    padding: 0.05em 0.35em;
    background: #fde047;
    color: #111827;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.9em;
}
