/* Consent banner (spec 2026-11-04-meta-pixel): a small card, no backdrop, the shop stays usable behind it.
   Colours come from the shop theme variables in shop.css, so it follows each organizer's branding. */
.autoconfig-consent {
    position: fixed;
    z-index: 1050;
    left: 16px;
    bottom: 16px;
    box-sizing: border-box;
    width: 340px;
    max-width: calc(100vw - 32px);
    padding: 16px 18px;
    border: 1px solid var(--autoconfig-border, #e5e5e5);
    border-radius: 16px;
    background: var(--autoconfig-card-bg, #ffffff);
    color: var(--autoconfig-card-text, #111111);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.autoconfig-consent[hidden],
.autoconfig-consent__view[hidden] {
    display: none;
}
.autoconfig-consent.is-visible {
    opacity: 1;
    transform: none;
}
.autoconfig-consent p {
    margin: 0 0 14px;
}
.autoconfig-consent a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.75;
}
.autoconfig-consent a:hover {
    opacity: 1;
}
.autoconfig-consent__buttons {
    display: flex;
    gap: 8px;
}
.autoconfig-consent__buttons button {
    flex: 1;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.autoconfig-consent__primary {
    border: 1px solid var(--autoconfig-brand, #ff6b6b);
    background: var(--autoconfig-brand, #ff6b6b);
    color: var(--autoconfig-on-brand-text, #ffffff);
    font-weight: 600 !important;
}
.autoconfig-consent__primary:hover {
    border-color: var(--autoconfig-brand-hover, #e85555);
    background: var(--autoconfig-brand-hover, #e85555);
}
.autoconfig-consent__secondary {
    border: 1px solid var(--autoconfig-border, #e5e5e5);
    background: transparent;
    color: var(--autoconfig-text-muted, #666666);
}
.autoconfig-consent__secondary:hover {
    border-color: var(--autoconfig-text-faint, #999999);
}
.autoconfig-consent button:focus-visible,
.autoconfig-consent__switch:focus-visible {
    outline: 2px solid var(--autoconfig-brand, #ff6b6b);
    outline-offset: 2px;
}
.autoconfig-consent__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
    font-weight: 400;
    cursor: pointer;
}
.autoconfig-consent__muted {
    color: var(--autoconfig-text-muted, #666666);
}
/* A switch drawn on the checkbox itself, so it keeps native keyboard and screen-reader behaviour. */
.autoconfig-consent__switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: none;
    width: 40px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    background: var(--autoconfig-border, #e5e5e5);
    cursor: pointer;
    transition: background-color 0.15s;
}
.autoconfig-consent__switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
}
.autoconfig-consent__switch:checked {
    background: var(--autoconfig-brand, #ff6b6b);
}
.autoconfig-consent__switch:checked::after {
    transform: translateX(16px);
}
/* Room to scroll the last content (footer, checkout button) clear of the open banner. */
body.autoconfig-consent-open {
    padding-bottom: 180px;
}
@media (max-width: 480px) {
    .autoconfig-consent {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        max-width: none;
        padding: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .autoconfig-consent,
    .autoconfig-consent__switch,
    .autoconfig-consent__switch::after {
        transition: none;
    }
}
