/* ==========================================
   ILUSTRAMA LABS: UI COMPARTIDA (MENÚ + UPSELL)
   Ecosistema Laboratory / 2026
========================================== */


 :root {
    --ibg-card: #1a1a19;
    --itext-main: #f5f4f0;
    --itext-muted: #a0a0a0;
    --iborder: #333333;
    --glass-bg: rgba(17, 17, 16, 0.5);
}
[data-theme="light"] {
    --ibg-card: #f5f4f0;
    --itext-main: #111110;
    --itext-muted: #666666;
    --iborder: #e5e4e0;
    --glass-bg: rgba(245, 244, 240, 0.5);
}

.labs-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', 'Inter', sans-serif;
    text-transform: uppercase;
}

/* 1. BOTÓN CIRCULAR */
.labs-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--iborder);
    color: var(--itext-main);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.labs-btn:hover {
    background: var(--itext-main);
    color: var(--ibg-card);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: transparent;
}

/* 2. PANEL — ESTRUCTURA FLEX CON SCROLL SOLO EN LA LISTA */
.labs-menu-content {
    position: absolute;
    bottom: 65px;
    right: 0;
    background: var(--ibg-card);
    border: 1px solid var(--iborder);
    border-radius: 12px;
    width: 230px;
    display: none;
    flex-direction: column;
    max-height: calc(80vh - 140px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden; /* el scroll está dentro de .labs-list */
}

.labs-menu-content.active {
    display: flex;
    animation: labs_revealContent 0.3s ease forwards;
}

@keyframes labs_revealContent {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HEADER FIJO */
.labs-header {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--itext-muted);
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.labs-divider {
    height: 1px;
    background: var(--iborder);
    margin: 0 20px;
    flex-shrink: 0;
}

/* LISTA SCROLLEABLE */
.labs-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 8px 20px;
    position: relative;
}

/* Scrollbar visible y estilizada */
.labs-list::-webkit-scrollbar {
    width: 5px;
    
}
.labs-list::-webkit-scrollbar-track {
    background: transparent;
}
.labs-list::-webkit-scrollbar-thumb {
    background: var(--itext-muted);
    border-radius: 3px;
}
.labs-list::-webkit-scrollbar-thumb:hover {
    background: var(--itext-muted);
}



/* Cuando no hay overflow (lista corta), ocultamos el indicador */
.labs-list:not(:overflow)::after {
    display: none;
}

/* Enlaces de doble línea */
.labs-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    text-decoration: none;
    color: var(--itext-main);
    transition: all 0.2s;
}

.labs-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.labs-dot {
    width: 8px;
    height: 8px;
    background: var(--iborder);
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.labs-menu-item:hover {
    transform: translateX(4px);
}

.labs-menu-item:hover .labs-dot {
    background: var(--itext-main);
    transform: scale(1.2);
}

.labs-name {
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.labs-context {
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--itext-muted);
    letter-spacing: 1px;
    text-align: right;
}

/* ENLACE "VER TODAS" — FIJO */
.labs-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 4px;
    text-decoration: none;
    color: var(--itext-main);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    border-top: 1px solid var(--iborder);
    margin-top: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.labs-view-all:hover {
    color: var(--itext-muted);
}

.labs-view-all svg {
    transition: transform 0.2s;
}

.labs-view-all:hover svg {
    transform: translate(3px, -3px);
}

/* FOOTER — FIJO */
.labs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--itext-main);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 12px 20px 20px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.labs-footer svg {
    transition: transform 0.2s;
}

.labs-footer:hover {
    color: var(--itext-muted);
}

.labs-footer:hover svg {
    transform: translate(3px, -3px);
}

/* ==========================================
   3. UPSELL FLOTANTE
========================================== */
.upsell-toast {
    position: fixed;
    top: 100px;
    right: -400px;
    background: var(--ibg-card);
    border: 1px solid var(--iborder);
    padding: 24px;
    border-radius: 16px;
    width: 320px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    font-family: 'Outfit', 'Inter', sans-serif;
}

.upsell-toast.active {
    right: 20px;
}

.upsell-toast p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--itext-main);
    line-height: 1.5;
    font-weight: 300;
}

.upsell-btn {
    background: var(--itext-main);
    color: var(--ibg-card);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.upsell-btn:hover {
    transform: translateY(-2px);
}

.upsell-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--itext-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.upsell-close:hover {
    color: var(--itext-main);
}