﻿/* =============================================================================
   RUTA: wwwroot/css/gaia/layout.css
   =============================================================================
   GAIA VIP — Layout (Shell / Sidebar / Topbar / Scroll)
   Invariantes:
   - Sidebar: 3 estados visuales (Accesible / Activo / Deshabilitado)
   - Accesible: marco visible + texto muted; hover ilumina
   - Activo: .sidebar-link-active (marcado persistente)
   - Deshabilitado: pe-none + opacity-50 (Bootstrap) + aria-disabled/tabindex
   ============================================================================= */

/* =============================================================================
   SHELL / LAYOUT
   ============================================================================= */

.app-shell,
.gaia-shell {
    height: 100vh;
    background: var(--bg-shell);
}

.app-layout,
.gaia-shell {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.app-sidebar,
.gaia-sidebar {
    width: 260px;
    flex: 0 0 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 8px 0 25px rgba(0,0,0,.45);
    overflow: hidden;
}

/* Área principal */
.app-main-area,
.gaia-main {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-shell);
    overflow: hidden;
}

/* =============================================================================
   DEMO BADGE (Header)
   RUTA: wwwroot/css/gaia/layout.css
   Última modificación: 2026-02-14
   ============================================================================= */

.header-demo-version {
    color: #ffd54a; /* amarillo */
    font-weight: 800; /* bold */
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: .65rem;
}


/* =============================================================================
   TOPBAR (Header)
   ============================================================================= */

.app-topbar, .gaia-header,
.gaia-topbar {
    flex: 0 0 auto;
    min-height: 60px;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-subtle);
    padding: .55rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    min-width: 0;
}

.page-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: .01em;
    white-space: nowrap;
}

.page-subtitle {
    margin: 0;
    font-size: .98rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55vw;
}

    .page-subtitle::before {
        content: "·";
        margin-right: .55rem;
        color: var(--text-muted);
    }

.header-right,
.topbar-actions {
    display: flex;
    align-items: center;
}

.topbar-controls {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: nowrap;
}

.topbar-label {
    font-size: .85rem;
    font-weight: 650;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 576px) {
    .topbar-label {
        display: none;
    }
}

/* =============================================================================
   CONTENT — Scroll aquí
   ============================================================================= */

.app-content,
.gaia-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: var(--bg-shell);
    padding: 1.25rem 1.5rem;
}

@media (max-width: 576px) {
    .app-content,
    .gaia-content {
        padding: 1rem;
    }
}

/* =============================================================================
   Anti-subrayados en sidebar
   ============================================================================= */

.app-sidebar a,
.app-sidebar a:hover,
.app-sidebar a:focus,
.app-sidebar a:active,
.gaia-sidebar a,
.gaia-sidebar a:hover,
.gaia-sidebar a:focus,
.gaia-sidebar a:active {
    text-decoration: none !important;
}

/* =============================================================================
   SIDEBAR — Brand / Nav / Footer
   ============================================================================= */

.sidebar-brand,
.gaia-brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: 1rem 1.1rem .75rem 1.1rem;
}

/* -----------------------------------------------------------------------------
   NUEVO (Día Hosting/Favicon):
   Logo en la cabecera del sidebar (a la izquierda del título "GAIA VIP")
   - Altura 60px (como pediste)
   - Fondo transparente y bordes ligeramente redondeados
   - Preparado para que se vea bien en oscuro
   ----------------------------------------------------------------------------- */
.gaia-brand-logo {
    height: 60px;
    width: auto;
    display: block;
    flex: 0 0 auto;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0,0,0,.35);
}

.gaia-brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* (Legacy) Dot opcional: lo mantenemos por si quieres volver a usarlo */
.sidebar-brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #ffffff, var(--accent-primary-strong));
    box-shadow: 0 0 12px rgba(15,241,179,.6);
    flex: 0 0 auto;
}

.gaia-brand-link {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
    color: var(--text-main);
}

.sidebar-brand-subtitle,
.gaia-brand-sub {
    font-size: .75rem;
    color: var(--text-muted);
}

.sidebar-nav,
.gaia-nav {
    padding: 0 .75rem;
    overflow: auto;
    flex: 1 1 auto;
}

.sidebar-icon {
    width: 1.4rem;
    text-align: center;
    font-size: 1rem;
}

/* =============================================================================
   BOTÓN CANÓNICO DEL SIDEBAR (INVARIANTE)
   Estados:
   - Accesible: marco visible + texto muted
   - Hover: ilumina + refuerza marco
   - .sidebar-link-active: marcado persistente (activo)
   ============================================================================= */

.sidebar-link,
.gaia-nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .52rem .80rem;
    border-radius: 999px;
    font-size: .92rem;
    /* Accesible (reposo): marco visible + muted */
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.06);
    color: var(--text-muted);
    margin-bottom: .22rem;
    transition: background .12s ease-out, color .12s ease-out, box-shadow .12s ease-out, border-color .12s ease-out, transform .05s ease-out;
}

    .sidebar-link:hover,
    .gaia-nav-item:hover {
        background: rgba(255,255,255,.04);
        border-color: rgba(15,241,179,.28);
        color: var(--accent-primary);
        transform: translateY(-1px);
    }

    .sidebar-link:focus-visible,
    .gaia-nav-item:focus-visible {
        outline: 2px solid var(--accent-primary);
        outline-offset: 2px;
    }

/* ACTIVO (ruta actual) */
.sidebar-link-active {
    background: var(--accent-primary-soft);
    border-color: rgba(15,241,179,.42);
    box-shadow: 0 0 0 1px rgba(15,241,179,.12);
    color: var(--accent-primary) !important;
    font-weight: 700;
    transform: none;
}

    /* El activo en hover no debe “cambiar de estado”, solo reforzar */
    .sidebar-link-active:hover {
        background: rgba(15,241,179,.16);
        border-color: rgba(15,241,179,.55);
        color: var(--accent-primary) !important;
        transform: none;
    }

/* =============================================================================
   FOOTER (Cuenta) — usa MISMO botón canónico
   ============================================================================= */

.sidebar-footer,
.gaia-sidebar-footer {
    padding: 1rem 1.1rem 1.1rem 1.1rem;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-user-title {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.sidebar-user-name {
    font-size: .95rem;
    font-weight: 650;
    margin-top: .35rem;
}

/* Acciones de cuenta: botones a ancho completo */
.sidebar-user-actions {
    margin-top: .85rem;
    display: grid;
    gap: .50rem;
    justify-items: stretch;
}

    .sidebar-user-actions .sidebar-link {
        width: 100%;
        margin-bottom: 0;
    }

    .sidebar-user-actions form {
        width: 100%;
        margin: 0;
    }

        .sidebar-user-actions form button.sidebar-link {
            width: 100%;
            justify-content: flex-start;
            appearance: none;
            -webkit-appearance: none;
        }

/* Links “legales” (no son botones del menú) */
.sidebar-legal {
    margin-top: 1rem;
    font-size: .78rem;
    color: var(--text-muted);
    text-decoration: none !important;
}

.footer-note {
    margin-top: .6rem;
    font-size: .74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
