/* ============================================================
   🤖 MentorSync — Sidebar + Menu + Modal
   - Botón flotante
   - Menú de opciones (tres puntos)
   - Modal de memoria
   - Light/Dark Mode con data-theme
============================================================ */

/* ============================================================
   SIDEBAR — BOTÓN FLOTANTE (CORREGIDO + CENTRADO)
============================================================ */
.mentorsync-sidebar {
    position: fixed;
    right: 1.5rem;

    /* 🔥 Centrado vertical perfecto */
    top: 50%;
    transform: translateY(-50%);

    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    cursor: pointer;
    z-index: 2147483646;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: transform .22s ease, box-shadow .22s ease;
}

.mentorsync-sidebar:hover {
    transform: translateY(-50%) translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.mentorsync-sidebar-avatar-img {
    width: 72%;
    height: 72%;
    border-radius: 999px;
    user-select: none;
    pointer-events: none;
}

.mentorsync-sidebar-inner {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mentorsync-sidebar-avatar-img {
    width: 70%;
    height: 70%;
    object-fit: contain;         /* Asegura proporción perfecta */
    display: block;              /* Elimina espacios invisibles */
    margin: 0 auto;              /* Centrado horizontal */
}

.mentorsync-sidebar-inner {
    width: 100% !important;
    height: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    line-height: 0 !important; /* 🔥 Bootstrap lo rompe */
}


/* ============================================================
   LIGHT MODE — SIDEBAR
============================================================ */
html[data-theme="light"] .mentorsync-sidebar {
    background: linear-gradient(135deg, #6366f1, #ec4899);
}

html[data-theme="light"] .mentorsync-sidebar:hover {
    filter: brightness(1.1);
}

/* ============================================================
   DARK MODE — SIDEBAR
============================================================ */
html[data-theme="dark"] .mentorsync-sidebar {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
}

html[data-theme="dark"] .mentorsync-sidebar:hover {
    filter: brightness(1.12);
}


.mentorsync-ai-menu-item {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 0.65rem;

    transition: background .2s ease, color .2s ease;
}

/* ------------------------------------------------------------
   ÍCONOS DEL MENÚ
------------------------------------------------------------ */
.mentorsync-ai-menu-item i {
    font-size: 0.95rem;
}

/* ============================================================
   LIGHT MODE — MENU
============================================================ */
html[data-theme="light"] .mentorsync-ai-menu {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0,0,0,0.08);
}

html[data-theme="light"] .mentorsync-ai-menu-item {
    color: #111;
}

html[data-theme="light"] .mentorsync-ai-menu-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ============================================================
   DARK MODE — MENU
============================================================ */
html[data-theme="dark"] .mentorsync-ai-menu {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148,163,184,0.25);
}

html[data-theme="dark"] .mentorsync-ai-menu-item {
    color: #e2e8f0;
}

html[data-theme="dark"] .mentorsync-ai-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   MODAL DE MEMORIA
============================================================ */
.mentorsync-memory-modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 2147483647;
    padding: 1rem;
}

.mentorsync-memory-modal.is-visible {
    display: flex;
}

/* Contenido del modal */
.mentorsync-memory-box {
    width: min(420px, 100%);
    padding: 1.4rem 1.1rem;
    border-radius: 1.1rem;

    backdrop-filter: blur(14px);
    border: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

/* Título */
.mentorsync-memory-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Botones dentro del modal */
.mentorsync-memory-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.mentorsync-memory-btn {
    padding: 0.55rem 1.15rem;
    border-radius: 0.65rem;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background .22s ease, color .22s ease, border-color .22s ease;
}

/* ============================================================
   LIGHT MODE — MODAL
============================================================ */
html[data-theme="light"] .mentorsync-memory-modal {
    background: rgba(255,255,255,0.55);
}

html[data-theme="light"] .mentorsync-memory-box {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0,0,0,0.12);
    color: #111;
}

html[data-theme="light"] .mentorsync-memory-btn {
    background: #2563eb;
    color: white;
}
html[data-theme="light"] .mentorsync-memory-btn:hover {
    background: #1d4ed8;
}

/* Close / Secondary button */
html[data-theme="light"] .mentorsync-memory-btn.cancel {
    background: rgba(0,0,0,0.07);
    color: #111;
}
html[data-theme="light"] .mentorsync-memory-btn.cancel:hover {
    background: rgba(0,0,0,0.12);
}

/* ============================================================
   DARK MODE — MODAL
============================================================ */
html[data-theme="dark"] .mentorsync-memory-modal {
    background: rgba(2,6,23,0.55);
}

html[data-theme="dark"] .mentorsync-memory-box {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148,163,184,0.25);
    color: #e2e8f0;
}

html[data-theme="dark"] .mentorsync-memory-btn {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: white;
}
html[data-theme="dark"] .mentorsync-memory-btn:hover {
    filter: brightness(1.12);
}

/* Close / Secondary button */
html[data-theme="dark"] .mentorsync-memory-btn.cancel {
    background: rgba(255,255,255,0.09);
    color: #e2e8f0;
}
html[data-theme="dark"] .mentorsync-memory-btn.cancel:hover {
    background: rgba(255,255,255,0.15);
}

/* ============================================================
   ANIMACIONES
============================================================ */
@keyframes msyncModalIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mentorsync-memory-box {
    animation: msyncModalIn .25s ease;
}
