/* --- Estilos para Páginas Legales (TyC y Privacidad) --- */

/* Fondo general */
.tb-legal-main {
    background-color: #0a0a0a;
    color: #ffffff;
    padding-bottom: 140px;
    /* deja espacio para la barra fija */
}

/* Header de la página (Título) */
.tb-legal-header {
    padding: 90px 0 40px;
    background: radial-gradient(circle at center, #1f4fff20 0%, transparent 70%);
    text-align: center;
}

.tb-legal-header h1 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    letter-spacing: -1px;
    margin: 0;
    text-transform: none;
}

/* Tarjeta contenedora (con scroll interno) */
.tb-legal-content-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;

    /* SCROLL INTERNO */
    max-height: calc(100vh - 320px);
    /* ajuste: calcula espacio disponible */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Añadir pequeño margen a la derecha para que el scrollbar no tape texto */
.tb-legal-content-wrap::-webkit-scrollbar {
    width: 10px;
}

.tb-legal-content-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* Contenido dentro de la tarjeta */
.tb-legal-content {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
}

/* Títulos se distinguen */
.tb-legal-content h3 {
    color: #ffffff;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 18px;
    font-size: 1.4rem;
    border-left: 4px solid #1F4FFF;
    padding-left: 15px;
}

.tb-legal-content p {
    margin-bottom: 16px;
}

.tb-legal-content ul,
.tb-legal-content ol {
    margin-bottom: 18px;
    padding-left: 20px;
}

.tb-legal-content li {
    margin-bottom: 8px;
}

.tb-legal-content strong {
    color: #1F4FFF;
}

/* Barra de progreso FIJA (visible todo el tiempo) */
.tb-reading-progress-fixed {
    position: fixed;
    bottom: 26px;
    /* separada del footer */
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 90%);
    z-index: 1200;
    pointer-events: none;
    /* no molesta clicks */
    text-align: center;
}

/* Contenedor de barra */
.tb-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    /* en caso de querer interacción futura */
}

/* Relleno dinámico */
.tb-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1F4FFF 0%, #00d4ff 100%);
    width: 0%;
    transition: width 120ms linear;
    border-radius: 999px;
}

/* Texto de porcentaje */
.tb-reading-status {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #999;
    pointer-events: none;
    text-align: center;
}

.tb-reading-status span {
    color: #1F4FFF;
    font-weight: 700;
}

/* En móviles reducimos la altura máxima para que la tarjeta no quede muy pequeña */
@media (max-width: 768px) {
    .tb-legal-header h1 {
        font-size: 1.9rem;
    }

    .tb-legal-content-wrap {
        padding: 22px;
        max-height: calc(100vh - 240px);
    }

    .tb-reading-progress-fixed {
        bottom: 18px;
        width: 94%;
    }
}

/* En pantallas muy grandes permitir más alto */
@media (min-width: 1400px) {
    .tb-legal-content-wrap {
        max-height: calc(100vh - 360px);
        padding: 50px;
    }
}