/* ==========================================================================
   Corral FM - Banner y Modal de Cookies RGPD / AEPD
   ========================================================================== */

/* Banner Flotante Inferior */
.corral-cookie-banner {
    position: fixed;
    bottom: 92px; /* Elevado para no tapar el sticky audio player */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 32px);
    max-width: 980px;
    background: rgba(6, 18, 14, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.15);
    padding: 18px 24px;
    box-sizing: border-box;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #e2e8f0;
}

.corral-cookie-banner.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.corral-cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.corral-cookie-banner-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.corral-cookie-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.corral-cookie-banner-title .cookie-icon {
    font-size: 1.25rem;
}

.corral-cookie-banner-text p {
    margin: 0;
}

.corral-cookie-banner-text a {
    color: #34d399;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s;
}

.corral-cookie-banner-text a:hover {
    color: #6ee7b7;
}

.corral-cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Botones con equilibrio visual conforme a las directrices de la AEPD */
.corral-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}

.corral-cookie-btn-accept {
    background: #10b981;
    color: #022016;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.corral-cookie-btn-accept:hover {
    background: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.45);
}

.corral-cookie-btn-reject {
    background: rgba(16, 185, 129, 0.12);
    color: #f1f5f9;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.corral-cookie-btn-reject:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(52, 211, 153, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
}

.corral-cookie-btn-settings {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 10px 14px;
}

.corral-cookie-btn-settings:hover {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Modal de Configuración de Preferencias */
.corral-cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.corral-cookie-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.corral-cookie-modal {
    background: #06120e;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.corral-cookie-modal-backdrop.active .corral-cookie-modal {
    transform: scale(1);
}

.corral-cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.corral-cookie-modal-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.corral-cookie-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.corral-cookie-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.corral-cookie-modal-body {
    padding: 20px 24px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
    flex: 1;
}

.corral-cookie-modal-intro {
    margin-bottom: 20px;
    color: #94a3b8;
}

.corral-cookie-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.corral-cookie-group:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.corral-cookie-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.corral-cookie-group-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.corral-cookie-badge-locked {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.corral-cookie-group-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Switch iOS / Modern Style */
.corral-cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.corral-cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.corral-cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #334155;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.corral-cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.corral-cookie-switch input:checked + .corral-cookie-slider {
    background-color: #10b981;
}

.corral-cookie-switch input:checked + .corral-cookie-slider:before {
    transform: translateX(20px);
}

.corral-cookie-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

/* Footer Legal Links Bar */
.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 18px 0 10px 0;
    padding-top: 14px;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    font-size: 0.85rem;
}

.footer-legal-links a,
.footer-legal-links button {
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: color 0.2s;
}

.footer-legal-links a:hover,
.footer-legal-links button:hover {
    color: #34d399;
    text-decoration: underline;
}

.footer-legal-divider {
    color: rgba(148, 163, 184, 0.35);
    user-select: none;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .corral-cookie-banner {
        bottom: 84px;
        padding: 16px 18px;
        width: calc(100% - 20px);
    }

    .corral-cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .corral-cookie-banner-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .corral-cookie-btn {
        width: 100%;
        padding: 11px 16px;
        font-size: 0.9rem;
    }

    .footer-legal-links {
        gap: 10px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Estilos de Contenedor para Páginas Legales (Aviso Legal, Privacidad, Cookies)
   ========================================================================== */
.legal-main {
    min-height: 80vh;
    padding: 20px 16px 100px 16px;
}

.legal-page-section {
    max-width: 920px;
    margin: 30px auto;
    padding: 40px 36px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #334155;
    line-height: 1.75;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    box-sizing: border-box;
}

.legal-page-section h1 {
    font-family: 'Outfit', sans-serif;
    color: #064e3b;
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.legal-page-date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.legal-page-section h2 {
    font-family: 'Outfit', sans-serif;
    color: #047857;
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-page-section h3 {
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-page-section p {
    margin-bottom: 16px;
    font-size: 0.98rem;
    color: #334155;
}

.legal-page-section ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.legal-page-section li {
    margin-bottom: 8px;
}

.legal-page-section a {
    color: #059669;
    text-decoration: underline;
    font-weight: 600;
}

.legal-page-section a:hover {
    color: #047857;
}

.legal-table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.legal-table th, .legal-table td {
    border: 1px solid #cbd5e1;
    padding: 12px 14px;
    text-align: left;
}

.legal-table th {
    background: #f1f5f9;
    color: #064e3b;
    font-weight: 700;
}

.legal-badge-inline {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.legal-badge-necessary {
    background: #d1fae5;
    color: #065f46;
}

.legal-badge-optional {
    background: #e0f2fe;
    color: #0369a1;
}

.legal-action-callout {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .legal-page-section {
        padding: 24px 18px;
        margin: 16px auto;
    }
    .legal-page-section h1 {
        font-size: 1.7rem;
    }
}

