/* ===================================================
   Common styles that apply regardless of active theme.
   Currently just the floating theme chooser toggle.
   =================================================== */

.theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 4px 8px;
    font-family: Verdana, Tahoma, Arial, sans-serif;
    font-size: 11px;
    color: #000000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.theme-toggle .theme-toggle-icon {
    font-size: 14px;
    line-height: 1;
}

.theme-toggle .switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

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

.theme-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #999999;
    border: 1px solid #000000;
    border-radius: 20px;
    transition: background-color 0.15s ease-in-out;
}

.theme-toggle .slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border: 1px solid #000000;
    border-radius: 50%;
    transition: transform 0.15s ease-in-out;
}

.theme-toggle input:checked + .slider {
    background-color: #333333;
}

.theme-toggle input:checked + .slider::before {
    transform: translateX(18px);
}

.theme-toggle input:focus-visible + .slider {
    outline: 2px solid #0033aa;
    outline-offset: 2px;
}

@media (max-width: 500px) {
    .theme-toggle {
        top: auto;
        bottom: 10px;
        right: 10px;
    }
}
