/* Shared pill toggle switches (index header, minimal checkout features) */

.demo-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: var(--demo-surface);
    border: 1px solid var(--demo-border);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.demo-switch:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.demo-switch:has(.demo-switch__input:checked) {
    background: linear-gradient(180deg, #fff 0%, #fff8f7 100%);
    border-color: #f5c4c0;
}

.demo-switch:has(.demo-switch__input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.demo-switch__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.demo-switch__track {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 999px;
    transition: background 0.22s ease;
}

.demo-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-switch__input:checked + .demo-switch__track {
    background: var(--demo-accent);
}

.demo-switch__input:checked + .demo-switch__track .demo-switch__thumb {
    transform: translateX(18px);
}

.demo-switch__input:focus-visible + .demo-switch__track {
    outline: 2px solid var(--demo-accent);
    outline-offset: 2px;
}

.demo-switch__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--demo-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
