/* ==========================================================================
   ENTRENA-T - GESTIÓN DE COOKIES & PRIVACIDAD (DISCRETO Y PROFESIONAL)
   ========================================================================== */

:root {
    --cookie-primary: #00e676;
    --cookie-bg: #111317;
    --cookie-text: #e5e7eb;
    --cookie-text-muted: #9ca3af;
    --cookie-border: rgba(255, 255, 255, 0.1);
}

/* Banner de Cookies Discreto (Tarjeta compacta en esquina inferior) */
#entrenat-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 440px;
    width: calc(100% - 40px);
    background: var(--cookie-bg);
    border: 1px solid var(--cookie-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    color: var(--cookie-text);
    padding: 16px 20px;
    z-index: 999999;
    transform: translateY(130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

#entrenat-cookie-banner.active {
    transform: translateY(0);
    opacity: 1;
}

.entrenat-cookie-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entrenat-cookie-text {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--cookie-text-muted);
    margin: 0;
}

.entrenat-cookie-text a {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.2s;
}

.entrenat-cookie-text a:hover {
    color: var(--cookie-primary);
}

.entrenat-cookie-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.entrenat-btn-cookie {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.2;
}

.entrenat-btn-primary {
    background: #ffffff;
    color: #090a0c;
}

.entrenat-btn-primary:hover {
    background: var(--cookie-primary);
    color: #000000;
}

.entrenat-btn-secondary {
    background: transparent;
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.15);
}

.entrenat-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.entrenat-btn-link {
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 7px 10px;
    text-decoration: underline;
    margin-right: auto;
}

.entrenat-btn-link:hover {
    color: #ffffff;
}

/* Modal de Configuración Discreto */
#entrenat-cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#entrenat-cookie-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.entrenat-cookie-modal {
    background: #14161d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px;
    color: #e5e7eb;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
}

.entrenat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.entrenat-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.entrenat-modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.entrenat-modal-close:hover {
    color: #ffffff;
}

.entrenat-cookie-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.entrenat-category-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.entrenat-category-top h4 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
}

.entrenat-category-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    font-weight: 600;
}

.entrenat-category-desc {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #9ca3af;
    margin: 0;
}

.entrenat-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

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

.entrenat-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #374151;
    transition: .25s ease;
    border-radius: 22px;
}

.entrenat-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s ease;
    border-radius: 50%;
}

input:checked + .entrenat-slider {
    background-color: #00e676;
}

input:checked + .entrenat-slider:before {
    transform: translateX(18px);
}

.entrenat-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* El botón flotante permanente se oculta para no estorbar en pantalla */
#entrenat-cookie-floating-btn {
    display: none !important;
}

@media (max-width: 640px) {
    #entrenat-cookie-banner {
        bottom: 12px;
        left: 12px;
        width: calc(100% - 24px);
        max-width: none;
        padding: 14px 16px;
        border-radius: 12px;
    }
    .entrenat-cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .entrenat-btn-link {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 4px;
    }
    .entrenat-btn-secondary,
    .entrenat-btn-primary {
        flex: 1;
        text-align: center;
    }
}
