/* =========================================
   OFFBRAND — SETTINGS PANEL
   Uses the site's own colour variables, so it always matches
   whatever look is currently selected.
========================================= */

.ob-settings-toggle {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1400;

    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;

    transition: transform 0.3s ease, border-color 0.3s ease;
}

.ob-settings-toggle:hover {
    transform: translateY(-3px) rotate(-8deg);
    border-color: var(--accent);
}

.ob-settings-toggle:focus-visible,
.ob-settings-panel button:focus-visible,
.ob-custom input:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}


/* ---------- panel ---------- */

.ob-settings-panel {
    position: fixed;
    left: 22px;
    bottom: 84px;
    z-index: 1400;

    width: min(340px, calc(100vw - 44px));
    max-height: min(640px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.ob-settings-panel[hidden] {
    display: none;
}

.ob-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.ob-settings-header strong {
    display: block;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.ob-settings-header span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.ob-settings-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.ob-settings-close:hover {
    border-color: var(--accent);
}

.ob-settings-body {
    padding: 6px 20px 20px;
    overflow-y: auto;
}

.ob-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.ob-group h3 {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}


/* ---------- segmented buttons ---------- */

.ob-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ob-segmented button {
    flex: 1 1 auto;
    padding: 9px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.ob-segmented button:hover {
    color: var(--text);
}

.ob-segmented button[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}


/* ---------- colour dots ---------- */

.ob-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ob-swatch {
    position: relative;
    width: 34px;
    height: 34px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.ob-swatch:hover {
    transform: scale(1.1);
}

.ob-swatch[aria-pressed="true"] {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.ob-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.ob-custom input {
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}


/* ---------- footer ---------- */

.ob-settings-footer {
    padding-top: 18px;
}

.ob-reset {
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color 0.25s ease;
}

.ob-reset:hover {
    border-color: var(--accent);
}

.ob-settings-footer p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}


/* ---------- phones ---------- */

@media (max-width: 560px) {

    .ob-settings-toggle {
        left: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
    }

    .ob-settings-panel {
        left: 12px;
        right: 12px;
        bottom: 68px;
        width: auto;
        max-height: calc(100vh - 100px);
    }

}

@media (prefers-reduced-motion: reduce) {

    .ob-settings-toggle,
    .ob-swatch,
    .ob-segmented button {
        transition: none;
    }

}
