/* =========================================
   XN Visuals — Widget flotante
   Colores: blanco / grises
   ========================================= */

/* ── Botón principal ─────────────────────── */
#xnv-widget {
    position: fixed;
    bottom: var(--xnv-widget-bottom, 24px);
    right: var(--xnv-widget-right, 24px);
    z-index: 9990;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#xnv-main-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.13);
    transition: box-shadow 0.2s, transform 0.15s;
    outline: none;
    position: relative;
    z-index: 2;
}

#xnv-main-btn:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    transform: scale(1.06);
}

#xnv-widget.xnv-open #xnv-main-btn {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ── Panel ───────────────────────────────── */
#xnv-panel {
    display: none;
    position: absolute;
    bottom: 52px;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 14px;
    min-width: 180px;
    animation: xnv-fadeup 0.18s ease;
}

@keyframes xnv-fadeup {
    from { opacity:0; transform: translateY(8px); }
    to   { opacity:1; transform: translateY(0); }
}

/* ── Sección dentro del panel ────────────── */
.xnv-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.xnv-btn-row {
    display: flex;
    gap: 6px;
}

.xnv-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 10px 0;
}

/* ── Botones de opción ───────────────────── */
.xnv-opt {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    transition: all 0.13s ease;
    outline: none;
    padding: 0 8px;
}

.xnv-opt span {
    font-size: 11px;
    font-weight: 600;
}

.xnv-opt:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.xnv-opt.xnv-active {
    background: #1f2937;
    border-color: #1f2937;
    color: #ffffff;
}

/* Tooltip */
.xnv-opt[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17,24,39,0.82);
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}
.xnv-opt { position: relative; }

/* ── Overlay de carga (cambio de layout) ─── */
#xnv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(3px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.xnv-spinner {
    font-size: 32px;
    color: #6b7280;
    animation: xnv-spin 0.8s linear infinite;
}

@keyframes xnv-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.xnv-spinner i { display: block; }
