/**
 * Two-option mode segment (Simple/Pro, Basic/Pro, etc.)
 * Sliding indicator — no Tailwind translate on thumb; position via data-state only.
 */
.finducation-mode-segment {
    --fms-pad: 0.25rem;
    --fms-gap: 0;
    --fms-track-bg: #f3f4f6;
    --fms-indicator-bg: #ffffff;
    --fms-indicator-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    --fms-inactive-fg: #6b7280;
    --fms-active-fg: var(--color-primary, #10b981);
    --fms-radius: 9999px;
    position: relative;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    padding: var(--fms-pad);
    gap: var(--fms-gap);
    border-radius: var(--fms-radius);
    background: var(--fms-track-bg);
    flex-shrink: 0;
}

.finducation-mode-segment--rect {
    --fms-radius: 0.5rem;
}

.finducation-mode-segment--compact {
    min-width: 9rem;
    height: 2.25rem;
}

.finducation-mode-segment__indicator {
    position: absolute;
    top: var(--fms-pad);
    left: var(--fms-pad);
    width: calc(50% - var(--fms-pad));
    height: calc(100% - (var(--fms-pad) * 2));
    border-radius: calc(var(--fms-radius) - var(--fms-pad));
    background: var(--fms-indicator-bg);
    box-shadow: var(--fms-indicator-shadow);
    transform: translateX(0);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

.finducation-mode-segment[data-state="right"] .finducation-mode-segment__indicator,
.finducation-mode-segment[data-state="pro"] .finducation-mode-segment__indicator {
    transform: translateX(100%);
}

.finducation-mode-segment__btn {
    position: relative;
    z-index: 1;
    flex: 1 1 0%;
    min-width: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--fms-inactive-fg);
    font-weight: 600;
    transition: color 200ms ease;
    line-height: 1.25;
}

.finducation-mode-segment__btn:hover {
    color: var(--fms-active-fg);
}

.finducation-mode-segment__btn:focus-visible {
    outline: 2px solid var(--fms-active-fg);
    outline-offset: 2px;
}

.finducation-mode-segment[data-state="left"] .finducation-mode-segment__btn:first-of-type,
.finducation-mode-segment[data-state="simple"] .finducation-mode-segment__btn:first-of-type,
.finducation-mode-segment[data-state="basic"] .finducation-mode-segment__btn:first-of-type {
    color: var(--fms-active-fg);
}

.finducation-mode-segment[data-state="right"] .finducation-mode-segment__btn:last-of-type,
.finducation-mode-segment[data-state="pro"] .finducation-mode-segment__btn:last-of-type {
    color: var(--fms-active-fg);
}

/* When indicator carries active fill (settings / emerald segment) */
.finducation-mode-segment--indicator-fill {
    --fms-active-fg: #ffffff;
    --fms-inactive-fg: #94a3b8;
}

.finducation-mode-segment--indicator-fill[data-state="left"] .finducation-mode-segment__btn:first-of-type,
.finducation-mode-segment--indicator-fill[data-state="right"] .finducation-mode-segment__btn:last-of-type,
.finducation-mode-segment--indicator-fill[data-state="pro"] .finducation-mode-segment__btn:last-of-type,
.finducation-mode-segment--indicator-fill[data-state="basic"] .finducation-mode-segment__btn:first-of-type {
    color: var(--fms-active-fg);
}

.finducation-mode-segment--emerald {
    --fms-track-bg: rgba(30, 41, 59, 0.8);
    --fms-indicator-bg: #059669;
    --fms-inactive-fg: #94a3b8;
    --fms-active-fg: #ffffff;
}

.finducation-mode-segment--indigo {
    --fms-track-bg: #e2e8f0;
    --fms-indicator-bg: #4f46e5;
    --fms-inactive-fg: #64748b;
    --fms-active-fg: #ffffff;
}

body.light-mode .finducation-mode-segment--indigo {
    --fms-track-bg: #e2e8f0;
}

.finducation-mode-segment--indigo.finducation-mode-segment--indicator-fill[data-state="left"] .finducation-mode-segment__btn:first-of-type,
.finducation-mode-segment--indigo.finducation-mode-segment--indicator-fill[data-state="right"] .finducation-mode-segment__btn:last-of-type {
    color: #ffffff;
}

.finducation-mode-segment--indigo.finducation-mode-segment--indicator-fill[data-state="left"] .finducation-mode-segment__btn:last-of-type,
.finducation-mode-segment--indigo.finducation-mode-segment--indicator-fill[data-state="right"] .finducation-mode-segment__btn:first-of-type {
    color: #64748b;
}

.finducation-mode-segment--slate-dashboard {
    --fms-track-bg: rgba(30, 41, 59, 0.5);
    --fms-indicator-bg: rgba(16, 185, 129, 0.35);
    --fms-inactive-fg: #94a3b8;
    --fms-active-fg: #34d399;
    --fms-radius: 0.5rem;
    --fms-pad: 0.25rem;
    border: 1px solid rgba(51, 65, 85, 0.8);
}

body[data-theme="light"] .finducation-mode-segment--slate-dashboard {
    --fms-track-bg: #f1f5f9;
    --fms-indicator-bg: rgba(16, 185, 129, 0.25);
    --fms-inactive-fg: #64748b;
    --fms-active-fg: #059669;
    border-color: #e2e8f0;
}

.dark .finducation-mode-segment,
.dark-mode .finducation-mode-segment,
html.dark .finducation-mode-segment {
    --fms-track-bg: #374151;
    --fms-indicator-bg: #4b5563;
    --fms-inactive-fg: #9ca3af;
}