.izi-theme-footer {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.2;
}

.izi-theme-footer__segment {
    display: inline-flex;
    overflow: hidden;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.15rem;
}

.izi-theme-footer__seg {
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font: inherit;
    line-height: 1.25;
    cursor: pointer;
    background: transparent;
    color: inherit;
    opacity: 0.8;
    transition: background-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.izi-theme-footer__seg:hover {
    opacity: 1;
}

.izi-theme-footer__seg.is-active {
    opacity: 1;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .izi-theme-footer__seg.is-active,
html.dark .izi-theme-footer__seg.is-active {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.izi-theme-mode {
    display: inline-flex;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    vertical-align: middle;
}

.izi-theme-mode:focus-visible {
    outline: 2px solid color-mix(in oklab, currentColor 35%, transparent);
    outline-offset: 3px;
    border-radius: 9999px;
}

.izi-theme-mode__track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 4.25rem;
    height: 2rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.izi-theme-mode.is-dark .izi-theme-mode__track {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.izi-theme-mode__thumb {
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.64rem;
    height: 1.64rem;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, box-shadow 0.25s ease;
    z-index: 2;
}

.izi-theme-mode.is-dark .izi-theme-mode__thumb {
    transform: translateX(2.05rem);
    background: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.izi-theme-mode__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.izi-theme-mode__icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.izi-theme-mode__icon--sun {
    color: #f59e0b;
}

.izi-theme-mode__icon--moon {
    color: #64748b;
}

.izi-theme-mode:not(.is-dark) .izi-theme-mode__icon--sun {
    opacity: 1;
    transform: scale(1.05);
}

.izi-theme-mode.is-dark .izi-theme-mode__icon--moon {
    opacity: 1;
    color: #e2e8f0;
    transform: scale(1.05);
}

.izi-theme-mode:hover .izi-theme-mode__track {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.izi-theme-mode.is-dark:hover .izi-theme-mode__track {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 2px 6px rgba(0, 0, 0, 0.28);
}

html[data-site-theme="modern"] footer .izi-theme-mode__track {
    background: color-mix(in oklab, var(--card, #fff) 92%, var(--primary, #2563eb) 8%);
}

html[data-site-theme="modern"].dark footer .izi-theme-mode__track {
    background: linear-gradient(180deg, color-mix(in oklab, var(--card, #1a1a1a) 88%, white 12%), #0f172a);
}

html[data-site-theme="modern"].dark footer .izi-theme-mode__thumb {
    background: color-mix(in oklab, var(--foreground, #f8fafc) 88%, #94a3b8 12%);
}

html[data-site-theme="modern"] footer .izi-theme-mode__icon--moon {
    color: var(--muted-foreground, #64748b);
}

html[data-site-theme="modern"].dark footer .izi-theme-mode__icon--moon {
    color: var(--foreground, #e2e8f0);
}

html[data-site-theme="modern"] footer .izi-theme-footer {
    border-top: 1px solid color-mix(in oklab, currentColor 10%, transparent);
    width: 100%;
}

html[data-site-theme="modern"] footer .izi-theme-footer__segment {
    background: color-mix(in oklab, currentColor 8%, transparent);
}

html[data-site-theme="modern"] footer .izi-theme-footer__seg.is-active {
    background: var(--card, #fff);
}

html[data-site-theme="modern"].dark footer .izi-theme-footer__seg.is-active {
    background: color-mix(in oklab, var(--card, #1a1a1a) 90%, white);
}

@media (max-width: 480px) {
    .izi-theme-footer {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .izi-theme-footer__segment {
        width: 100%;
        justify-content: center;
    }

    .izi-theme-footer__seg {
        flex: 1 1 0;
        text-align: center;
    }
}
