.vb-theme-switch {
    --switch-ink: #52665a;
    --switch-line: #d4dfd6;
    --switch-selected: #e1eee4;
    --switch-accent: #26583e;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1px;
    border: 1px solid var(--switch-line);
    padding: 2px;
    border-radius: 9px;
    vertical-align: middle;
}

.vb-theme-switch button {
    appearance: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 6px;
    color: var(--switch-ink);
    background: transparent;
    cursor: pointer;
}

.vb-theme-switch button:hover,
.vb-theme-switch button[aria-pressed="true"] {
    color: var(--switch-accent);
    background: var(--switch-selected);
}

.vb-theme-switch button:focus-visible {
    outline: 2px solid var(--switch-accent);
    outline-offset: -2px;
}

.vb-theme-switch svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6px;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

html[data-vb-theme-area="store"] body #contacts.w100 {
    transition-property: top;
}

#contacts .vb-theme-switch {
    --switch-ink: #e7cfb2;
    --switch-line: #776656;
    --switch-selected: #615142;
    --switch-accent: #ffe1b5;
    float: right;
    margin: 13px 0 0 16px;
}

html[data-vb-theme="dark"][data-vb-theme-area="admin"] .vb-theme-switch {
    --switch-ink: #bfcec1;
    --switch-line: #4a6051;
    --switch-selected: #344b3d;
    --switch-accent: #c6f0ce;
}

body > .vb-theme-switch {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: var(--switch-line);
}

@media screen and (max-width: 999px) {
    html[data-vb-theme-area="store"] body #contacts.w100 {
        min-height: 179px;
    }

    #contacts > .center {
        position: relative;
    }

    #contacts .vb-theme-switch {
        --switch-ink: #5a4b40;
        --switch-line: #d9cdbf;
        --switch-selected: #efe5d7;
        --switch-accent: #624422;
        position: absolute;
        z-index: 100;
        top: 131px;
        right: 0;
        float: none;
        margin: 0;
    }

    html[data-vb-theme="dark"] #contacts .vb-theme-switch {
        --switch-ink: #e7cfb2;
        --switch-line: #776656;
        --switch-selected: #615142;
        --switch-accent: #ffe1b5;
    }
}

@media screen and (max-width: 360px) {
    #top .vb-theme-switch {
        gap: 0;
        padding: 1px;
    }

    #top .vb-theme-switch button {
        width: 26px;
    }
}

html[data-vb-theme-area="store"] #contacts .vb-theme-switch-pill-ready {
    gap: 0;
    padding: 0;
    border: 0;
}

#contacts button.vb-theme-pill {
    --pill-track: #f5f0e5;
    --pill-border: #b7a688;
    --pill-symbol: #7a5c36;
    --pill-thumb: #697e58;
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 58px;
    height: 44px;
    border-radius: 999px;
    color: var(--pill-symbol);
    background: transparent;
}

#contacts button.vb-theme-pill[aria-checked="true"] {
    --pill-track: #393129;
    --pill-border: #8e7b64;
    --pill-symbol: #e2c8a4;
    --pill-thumb: #bba382;
}

#contacts button.vb-theme-pill:focus-visible {
    outline-color: var(--pill-border);
}

#contacts .vb-theme-pill-track {
    position: absolute;
    inset: 9px 2px;
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    background: var(--pill-track);
}

#contacts .vb-theme-pill svg {
    position: absolute;
    top: 15px;
    width: 14px;
    height: 14px;
    stroke-width: 1.65px;
}

#contacts .vb-theme-pill-sun { left: 10px; }
#contacts .vb-theme-pill-moon { right: 10px; }
#contacts .vb-theme-pill[aria-checked="true"] .vb-theme-pill-sun,
#contacts .vb-theme-pill[aria-checked="false"] .vb-theme-pill-moon { visibility: hidden; }

#contacts .vb-theme-pill-thumb {
    position: absolute;
    top: 13px;
    left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pill-thumb);
    transition: transform .16s ease;
}

#contacts .vb-theme-pill[aria-checked="false"] .vb-theme-pill-thumb {
    transform: translateX(28px);
}

@media screen and (min-width: 1000px) {
    html[data-vb-theme-area="store"] #contacts .vb-theme-switch-pill-ready { margin-top: 7px; }
}

@media screen and (max-width: 999px) {
    html[data-vb-theme-area="store"] body #contacts.w100:has(.vb-theme-switch-pill-ready) {
        min-height: 171px;
    }

    html[data-vb-theme-area="store"] #contacts .vb-theme-switch-pill-ready { top: 119px; }
}

@media (prefers-reduced-motion: reduce) {
    #contacts .vb-theme-pill-thumb { transition: none; }
}
