/* biblio-drawer.css — Astrolab Biblioteca */

/* Términos marcados en el texto */
.albib-term {
    border-bottom: 1px dashed #8b6914;
    cursor: pointer;
    color: inherit;
    transition: background 0.15s;
}
.albib-term:hover {
    background: rgba(139, 105, 20, 0.1);
}

/* Overlay */
#albib-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
}
#albib-overlay.albib-visible {
    display: block;
}

/* Drawer — base */
#albib-drawer {
    position: fixed;
    z-index: 9999;
    background: #fff;
    overflow-y: auto;
    transition: transform 0.28s ease;
}

/* Móvil: sube desde abajo */
@media (max-width: 768px) {
    #albib-drawer {
        left: 0; right: 0; bottom: 0;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        padding: 0;
    }
    #albib-drawer.albib-visible {
        transform: translateY(0);
    }
}

/* Desktop: panel lateral derecho */
@media (min-width: 769px) {
    #albib-drawer {
        top: 0; right: 0; bottom: 0;
        width: 380px;
        border-left: 1px solid #ddd;
        box-shadow: -4px 0 16px rgba(0,0,0,0.12);
        transform: translateX(100%);
    }
    #albib-drawer.albib-visible {
        transform: translateX(0);
    }
}

/* Inner */
#albib-drawer-inner {
    padding: 24px 20px 40px;
    position: relative;
}

/* Botón cerrar */
#albib-cerrar {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
    line-height: 1;
}
#albib-cerrar:hover { color: #000; }

/* Contenido */
.albib-etiqueta {
    margin: 0 0 16px;
    font-size: 1.2em;
    font-weight: 700;
    color: #1a1a1a;
}

.albib-nivel {
    margin-bottom: 16px;
}

.albib-nivel p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #333;
    margin: 0 0 8px;
}

.albib-analogia {
    border-left: 3px solid #8b6914;
    padding-left: 12px;
    margin: 8px 0 0;
    font-style: italic;
    color: #555;
    font-size: 0.9em;
}

.albib-nivel2 summary,
.albib-nivel3 summary {
    cursor: pointer;
    font-size: 0.85em;
    color: #8b6914;
    font-weight: 600;
    padding: 4px 0;
}

.albib-cita {
    border-left: 3px solid #ccc;
    padding-left: 12px;
    margin: 12px 0 0;
    font-size: 0.88em;
    color: #444;
}
.albib-cita footer {
    margin-top: 6px;
    font-size: 0.85em;
    color: #888;
    font-style: normal;
}

.albib-cargando {
    color: #888;
    font-size: 0.9em;
}
.albib-error {
    color: #b32d2e;
    font-size: 0.9em;
}
