/* =========================================================================
   MÓDULO DE APUNTES
   Estilos adheridos al minimalismo OLED & Glassmorphism
========================================================================= */

/* Item de lista de apuntes */
.apunte-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apunte-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.apunte-item.activo {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    border-left: 3px solid rgba(0, 229, 255, 0.8);
}

.apunte-item h4 {
    margin: 0 0 4px 0;
    font-size: 0.95em;
    color: var(--texto-principal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apunte-item p {
    margin: 0;
    font-size: 0.8em;
    color: var(--texto-secundario);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apunte-item .apunte-meta {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* Scrollbars personalizados para editor */


/* Thumbs de imágenes adjuntas */
.img-thumb-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: 0.2s;
}

.img-thumb:hover {
    opacity: 0.8;
}

.btn-eliminar-img {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.2s;
}

.img-thumb-container:hover .btn-eliminar-img {
    opacity: 1;
}

.btn-eliminar-img:hover {
    background: #ef4444;
}

/* Modal Overlay image (lightbox) */
#lightbox-img-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
#lightbox-img-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* ──────────────────────────────────────────────
   SELECT CASCADE MATERIA — LIBRETA DE APUNTES
   ────────────────────────────────────────────── */
#apunte-materia {
    background: var(--carbon-tarjeta, #1a1d23) !important;
    color: var(--texto-secundario, #aaa) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 2px !important;
    padding: 6px 28px 6px 10px !important;
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%2300e5ff' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    min-width: 180px;
    max-width: 260px;
}
#apunte-materia:focus {
    border-color: rgba(0,229,255,.4) !important;
    box-shadow: 0 0 0 2px rgba(0,229,255,.12);
    color: var(--texto-primario, #e0e0e0) !important;
}
#apunte-materia optgroup {
    color: #00e5ff;
    font-weight: 700;
    font-size: .76rem;
    background: #13161c;
}
#apunte-materia option {
    color: #e0e0e0;
    background: #13161c;
}
