/* =========================================================
   Cabecera y menú lateral: capa visual sobre style.css.
   Solo estilos; no cambia el HTML ni el JS del menú (scripts.js
   sigue usando .itemmenu / .itemmenudrop / .seleccionado).
   Para volver al aspecto anterior basta con no cargar este fichero.
   ========================================================= */

:root {
    --lcm-naranja: #eb6e38;
    --lcm-naranja-suave: #fdf1eb;
    --lcm-texto: #4a5568;
    --lcm-texto-suave: #6b7a90;
    --lcm-hover: #f3f5f9;
    --lcm-borde: #eceff4;
}

/* ---------- Cabecera ---------- */

body > header {
    position: relative;
    border-bottom: 1px solid var(--lcm-borde);
    box-shadow: 0 1px 8px rgba(16, 24, 40, 0.04);
}

/* Iconos de la cabecera como botones redondos con zona de clic amplia */
body > header .iconosheader > a:not(.ecorredorlogo),
body > header .iconosheader > div > a {
    /* !important: los botones de WhatsApp y teléfono traen display en línea */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    padding: 0 !important;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

body > header .iconosheader > a:not(.ecorredorlogo):hover,
body > header .iconosheader > div > a:hover,
body > header .iconosheader > div > a[aria-expanded="true"] {
    background: var(--lcm-hover);
}

body > header .iconosheader > a:not(.ecorredorlogo) i,
body > header .iconosheader > div > a i {
    font-size: 25px;
    color: var(--lcm-texto-suave);
    transition: color 0.15s ease;
}

body > header .iconosheader > a:not(.ecorredorlogo):hover i,
body > header .iconosheader > div > a:hover i {
    color: var(--lcm-naranja);
}

/* Mismo color para todos (WhatsApp traía el suyo propio en whatsapp.css) */
body > header .iconosheader a#whatsappDropdown i.la-whatsapp,
body > header .iconosheader a#tlf-toggle i {
    color: var(--lcm-texto-suave);
}

body > header .iconosheader a#whatsappDropdown:hover i.la-whatsapp,
body > header .iconosheader a#tlf-toggle:hover i {
    color: var(--lcm-naranja);
}

/* Globo de WhatsApp: style.css fija width:15px a todo span de la cabecera
   y con dos cifras el número se salía del círculo. */
body > header .iconosheader a#whatsappDropdown #wa-badge {
    top: -1px;
    right: -7px;
    width: auto;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5px;
    line-height: 16px;
    text-align: center;
}

body > header .iconosheader .ecorredorlogo {
    margin-left: 0;
    margin-right: 14px;
}

/* Idioma y usuario: píldora clicable entera */
body > header .usuario {
    padding-left: 14px;
    margin-left: 14px;
    border-left-color: var(--lcm-borde);
}

body > header #idiomasContainer,
body > header #usuarioContainer {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > header #idiomasContainer:hover,
body > header #usuarioContainer:hover {
    background: var(--lcm-hover);
}

body > header .currentuser,
body > header .currentlang {
    font-size: 14px;
    font-weight: 500;
    color: var(--lcm-texto);
    margin-right: 4px;
}

body > header .usuario #idiomasDropdown,
body > header .usuario #userDropdown {
    font-size: 16px;
    transition: transform 0.2s ease;
}

body > header .usuario #idiomasDropdown[aria-expanded="true"],
body > header .usuario #userDropdown[aria-expanded="true"] {
    transform: rotate(180deg);
}

@media (max-width: 1360px) {
    body > header .iconosheader > a:not(.ecorredorlogo),
    body > header .iconosheader > div > a {
        margin-left: 2px;
    }

    body > header .usuario {
        padding-left: 10px;
        margin-left: 10px;
    }
}

@media (max-width: 500px) {
    body > header .usuario {
        padding-left: 6px;
        margin-left: 6px;
    }
}

/* ---------- Menú lateral ---------- */

.sidebar {
    padding: 10px 12px 24px;
    border-right: 1px solid var(--lcm-borde);
    scrollbar-width: thin;
    scrollbar-color: #d5dbe4 transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d5dbe4;
    border-radius: 3px;
}

/* Primer nivel: apartados principales */
.sidebar .navbar ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    margin: 1px 0;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.4px;
    font-weight: 600;
    color: var(--lcm-texto);
    border-bottom: 0;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar .navbar ul li a:hover {
    display: flex;
    background: var(--lcm-hover);
    color: var(--lcm-naranja);
}

.sidebar .navbar ul li a.seleccionado {
    background: var(--lcm-naranja-suave);
    color: var(--lcm-naranja);
}

/* Flecha de desplegar */
.sidebar .itemmenu i {
    float: none;
    flex-shrink: 0;
    margin: 0;
    font-size: 15px;
    color: inherit;
    opacity: 0.7;
}

/* Submenús: sangría con guía vertical */
.sidebar .navbar ul li ul {
    width: auto;
    margin: 2px 0 6px 14px;
    padding-left: 8px;
    border-left: 2px solid var(--lcm-borde);
}

.sidebar .navbar ul li ul li ul {
    padding-left: 8px;
}

.sidebar .navbar ul li ul li a {
    padding: 8px 10px;
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--lcm-texto-suave);
    border-radius: 6px;
}

.sidebar .navbar ul li ul li a:hover {
    background: var(--lcm-hover);
    color: var(--lcm-naranja);
}

.sidebar .navbar ul li ul li a.seleccionado {
    background: var(--lcm-naranja-suave);
    color: var(--lcm-naranja);
    font-weight: 500;
}

.sidebar .menu-group-label {
    padding: 10px 10px 4px;
    border-top: 0;
}
