/* ── TOGGLE DÍA/NOCHE ──
.theme-toggle {
    background: none;
    border: 1px solid var(--border-moderate);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ipax-L100);
    font-size: 1.1rem;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    background: color-mix(in srgb, var(--ipax-L100) 10%, transparent);
    border-color: color-mix(in srgb, var(--ipax-L100) 40%, transparent);
}

.theme-toggle i {
    position: absolute;
    transition: opacity 0.2s, transform 0.2s;
}
 */

 /* ── PILL TOGGLE ── */
.theme-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    /* background: color-mix(in srgb, var(--ipax-L100) 10%, transparent); */
	background: #ffffff33;
    border-radius: 50px;
    padding: 3px;
    cursor: pointer;
    user-select: none;
    /* border: 1px solid color-mix(in srgb, var(--ipax-L100) 20%, transparent); */
	border: 1px solid #ffffff33;
    transition: background 0.3s;
}

.theme-pill:focus-visible {
    outline: 2px solid var(--ipax-L100);
    outline-offset: 2px;
}

/* Iconos */
.pill-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

/* Indicador deslizante */
.pill-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 28px;
    background: var(--ipax-L100);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.2); */
}

/* ============ LIGHT MODE (default) ============ */
/* Sol activo: oscuro sobre indicador blanco */
.pill-sun {
    /* color: var(--ipax-L010); */
	color:orange;
}
/* Luna inactiva: blanca con opacidad */
.pill-moon {
    color: color-mix(in srgb, var(--ipax-L100) 50%, transparent);
}

/* ============ NIGHT MODE (clase en body o en el mismo pill) ============ */
/* Podemos usar body.night-mode o la clase .night en el pill */
body.night-mode .pill-indicator,
.theme-pill.night .pill-indicator {
    transform: translateX(28px);
}

body.night-mode .pill-sun,
.theme-pill.night .pill-sun {
    /* color: color-mix(in srgb, var(--ipax-L100) 50%, transparent); */
	color: #ffffff66;
}

body.night-mode .pill-moon,
.theme-pill.night .pill-moon {
    /* color: var(--ipax-L010); */
	color: oklch(90% 0.05 250);
}