
/* Segmented Theme Control */
.theme-segmented {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 3px;
    border: 1px solid var(--border-color);
    gap: 2px;
    width: fit-content;
}

.theme-segmented-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.theme-segmented-btn i {
    font-size: 0.8rem;
}

.theme-segmented-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

[data-theme="dark"] .theme-segmented-btn.active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Modern Theme Toggle Switcher (Redefined here for safety) */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--bg-tertiary);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-primary);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider-toggle:before {
    transform: translateX(18px);
    background-color: #fff;
}

/* Floating Theme Toggle */
.theme-floating-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(15px);
    -webkit-backdrop-filter: saturate(180%) blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
}

.theme-floating-box:hover {
    background: var(--bg-secondary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.theme-floating-box i {
    font-size: 1.2rem;
    transition: transform 0.5s ease;
}

/* Theme Side Tab */
.theme-side-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-5px);
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(15px);
    -webkit-backdrop-filter: saturate(180%) blur(15px);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 12px 15px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    color: var(--text-primary);
}

.theme-side-tab:hover {
    transform: translateY(-50%) translateX(0);
    background: var(--bg-secondary);
    padding-right: 20px;
    box-shadow: 8px 0 20px rgba(0,0,0,0.15);
}

.theme-side-tab i {
    font-size: 1rem;
}

.theme-side-tab span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.theme-side-tab:hover span {
    max-width: 100px;
    opacity: 1;
    margin-left: 8px;
}
 
/* Professional Vertical Theme Pill */
.theme-vertical-pill {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.theme-vertical-pill:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.18);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.theme-pill-option {
    width: 32px;
    height: 32px;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-size: 1rem;
    position: relative;
}

.theme-pill-option:hover {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.theme-pill-option.active {
    background: var(--text-secondary);
    color: #fff;
}