/*
 * public/css/theme-switch.css
 * Selector de modo claro / oscuro / automático (cabecera de la web, portal
 * y app). Colores: /public/css/theme.css.
 */
.tp-theme-switch { position: relative; display: inline-flex; align-items: center; margin-right: 6px; }
.tp-theme-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0; border-radius: 8px;
    border: 1px solid var(--bd-e8e9f0); background: var(--bg-white); color: var(--tx-4a4c62);
    cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.tp-theme-btn:hover { background: var(--bg-gray-100); color: var(--tx-0d0e14); }
.tp-theme-btn:focus-visible { outline: 2px solid var(--bd-5b5ef6); outline-offset: 2px; }
.tp-theme-btn .tp-theme-ico { display: none; }
:root[data-theme-pref="light"] .tp-theme-btn .tp-theme-ico--light,
:root:not([data-theme-pref]) .tp-theme-btn .tp-theme-ico--light,
:root[data-theme-pref="dark"]  .tp-theme-btn .tp-theme-ico--dark,
:root[data-theme-pref="auto"]  .tp-theme-btn .tp-theme-ico--auto { display: inline-flex; }

.tp-theme-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 1200;
    min-width: 170px; padding: 6px; border-radius: 10px;
    background: var(--bg-white); border: 1px solid var(--bd-e8e9f0);
    box-shadow: 0 10px 25px var(--sh-0d0e14-a10);
}
.tp-theme-switch.is-open .tp-theme-menu { display: block; }
.tp-theme-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border: none; border-radius: 7px; background: transparent;
    font: inherit; font-size: .85rem; color: var(--tx-4a4c62); text-align: left; cursor: pointer;
}
.tp-theme-item:hover { background: var(--bg-gray-100); color: var(--tx-0d0e14); }
.tp-theme-item.is-active { background: var(--bg-ebebff); color: var(--ot-5b5ef6); font-weight: 600; }
.tp-theme-ico { display: inline-flex; align-items: center; }

/* Logo: versión clara u oscura según el modo */
:root:not([data-theme="dark"]) .tp-logo--themed-dark { display: none !important; }
:root[data-theme="dark"] .tp-logo--themed-light { display: none !important; }
