/* Merchant controls and support share Bistrivo's palette and accessible native form semantics. */
.sidebar .sidebar-contact {
    display: block;
    margin: 24px 0 16px;
}
.stat-value {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.stat-value:hover,
.stat-value:focus {
    border-color: currentColor;
}
.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.settings-form > .panel {
    margin-bottom: 24px;
}
/* Shared switch geometry keeps the thumb centered in every merchant form. */
.bistrivo-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin: 0;
    min-height: 44px;
    cursor: pointer;
}
.bistrivo-switch input {
    position: absolute;
    left: 0;
    width: 48px;
    height: 28px;
    opacity: 0;
    margin: 0;
}
.switch-track {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    width: 48px;
    height: 28px;
    flex: 0 0 48px;
    border-radius: 20px;
    background: #c5cbbf;
    border: 1px solid #8b9688;
    transition: background 150ms ease;
}
.switch-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px #0003;
    transition: transform 150ms ease;
}
.bistrivo-switch input:checked + .switch-track {
    background: #173f35;
    border-color: #173f35;
}
.bistrivo-switch input:checked + .switch-track::after {
    transform: translateX(20px);
}
.bistrivo-switch input:disabled + .switch-track {
    opacity: 0.5;
}
.bistrivo-switch input:focus + .switch-track,
.theme-choice input:focus + .theme-choice-card {
    outline: 3px solid #e9a078;
    outline-offset: 3px;
}
.theme-picker fieldset {
    border: 0;
    padding: 0;
    margin: 20px 0 0;
    min-width: 0;
}
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}
.theme-choice {
    position: relative;
    cursor: pointer;
    margin: 0;
    min-width: 0;
}
.theme-choice > input {
    position: absolute;
    left: 16px;
    top: 16px;
    opacity: 0;
    width: 20px;
    height: 20px;
}
.theme-choice-card {
    display: block;
    border: 2px solid #dfe3da;
    border-radius: 18px;
    padding: 10px;
    height: 100%;
}
.theme-choice input:checked + .theme-choice-card {
    border-color: #173f35;
    background: #f2f5ec;
}
.theme-preview {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 10px;
    border-top: 3px solid;
    min-height: 235px;
    overflow: hidden;
}
.theme-mini-brand {
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.theme-mini-title {
    font: 36px Georgia, serif;
    margin: 14px 0;
}
.theme-mini-line {
    border-top: 1px solid;
    opacity: 0.3;
    margin-bottom: 10px;
}
.theme-mini-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin: 5px 0;
}
.theme-mini-button {
    align-self: flex-start;
    font-size: 11px;
    border-radius: 5px;
    padding: 6px 10px;
    margin-top: 14px;
}
.theme-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 8px 6px;
}
.theme-check {
    visibility: hidden;
    border-radius: 50%;
    background: #173f35;
    color: white;
    width: 25px;
    text-align: center;
}
.theme-choice input:checked + .theme-choice-card .theme-check {
    visibility: visible;
}
.theme-description {
    display: block;
    margin: 0 8px 10px;
    font-size: 13px;
    color: #657264;
    font-weight: 400;
}
.theme-choice[hidden] {
    display: none;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.support-toolbar,
.support-row,
.support-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.support-row {
    padding: 22px 0;
    border-bottom: 1px solid var(--line, #dfe3da);
    text-decoration: none;
    color: inherit;
}
.support-row h3 {
    font-size: 19px;
    margin: 0 0 8px;
}
.support-row:last-child {
    border-bottom: 0;
}
.support-message {
    max-width: 820px;
    margin: 24px 0;
    padding: 24px;
    border-radius: 16px;
    background: #f4f5ee;
    border: 1px solid #dfe3da;
}
.support-message.is-admin {
    background: #eaf0e3;
    border-left: 4px solid #173f35;
}
.support-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    margin: 16px 0 0;
}
.support-form textarea {
    min-height: 170px;
}
.support-meta {
    font-size: 14px;
}
.support-pager {
    display: flex;
    gap: 20px;
    margin-top: 24px;
}
.legal-nav {
    padding: 24px;
    border-radius: 16px;
    background: #eaf0e3;
    margin: 24px 0 40px;
}
.legal-nav a {
    display: block;
    padding: 5px 0;
}
.legal-section {
    scroll-margin-top: 24px;
}
@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }
    .support-row,
    .support-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (prefers-reduced-motion: reduce) {
    .switch-track,
    .switch-track::after {
        transition: none;
    }
}
@media (forced-colors: active) {
    .bistrivo-switch input,
    .theme-choice > input {
        position: static;
        opacity: 1;
    }
    .switch-track {
        display: none;
    }
}

/* The menu preview keeps its QR beside the details when space allows, then wraps naturally. */
.dashboard-menu-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}
.dashboard-menu-info {
    flex: 1 1 220px;
    min-width: 0;
}
.dashboard-menu-url {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}
.dashboard-menu-url a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
.dashboard-menu-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.dashboard-menu-qr {
    flex: 0 0 148px;
    max-width: 100%;
    text-align: center;
}
.dashboard-qr-preview {
    display: block;
    width: 148px;
    max-width: 100%;
    padding: 6px;
    border: 1px solid var(--line, #dfe3da);
    border-radius: 12px;
    background: #fff;
}
.dashboard-qr-preview svg {
    display: block;
    width: 100%;
    height: auto;
}
.dashboard-qr-preview:hover,
.dashboard-qr-preview:focus {
    border-color: var(--ink, #173f35);
    outline: 2px solid var(--ink, #173f35);
    outline-offset: 3px;
}
.dashboard-qr-download {
    min-height: 44px;
    margin-top: 4px;
}
@media (max-width: 600px) {
    .dashboard-menu-qr {
        margin: 0 auto;
    }
}

/* Keep digital QR downloads and physical sticker ordering in one merchant workspace. */
.qr-hub {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}
.qr-hub .panel {
    min-width: 0;
}
.qr-print-offer {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.qr-print-offer h2 {
    max-width: 14em;
}
.qr-print-offer .actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}
.qr-hub .qr-panel > p {
    overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
    .qr-hub {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media print {
    .qr-hub {
        display: block;
    }
    .qr-hub .qr-print-offer {
        display: none;
    }
}
