.hemera-consent,
.hemera-consent * {
    box-sizing: border-box;
}

.hemera-consent {
    --hemera-consent-ink: #0a1628;
    --hemera-consent-muted: #475569;
    --hemera-consent-surface: #ffffff;
    --hemera-consent-soft: #f1f5f9;
    --hemera-consent-border: #cbd5e1;
    --hemera-consent-primary: var(--color-primary, #2563eb);
    --hemera-consent-primary-dark: var(--color-secondary, #1e40af);
    --hemera-consent-focus: #1d4ed8;
    --hemera-consent-danger: #8d2834;
    color: var(--hemera-consent-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.hemera-consent--light {
    --hemera-consent-primary: var(--color-primary, #2563eb);
    --hemera-consent-primary-dark: var(--color-secondary, #1e40af);
}

.hemera-consent [hidden] {
    display: none !important;
}

.hemera-consent__layer {
    align-items: flex-end;
    background: rgb(4 17 32 / 62%);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: clamp(0.5rem, 2vw, 1.5rem);
    position: fixed;
    z-index: 2147483000;
}

.hemera-consent--bottom-left .hemera-consent__layer {
    justify-content: flex-start;
}

.hemera-consent--bottom-right .hemera-consent__layer {
    justify-content: flex-end;
}

.hemera-consent__dialog {
    background: var(--hemera-consent-surface);
    border: 1px solid var(--hemera-consent-border);
    border-radius: 1rem;
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 28%);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: min(90vh, 54rem);
    max-width: 72rem;
    overflow: hidden;
    width: 100%;
}

.hemera-consent--bottom-left .hemera-consent__dialog,
.hemera-consent--bottom-right .hemera-consent__dialog {
    max-width: 42rem;
}

.hemera-consent__header {
    align-items: center;
    background: linear-gradient(110deg, #eff6ff 0%, #f8fafc 62%, #eef4ff 100%);
    border-bottom: 1px solid var(--hemera-consent-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: auto 1fr auto;
    padding: 1rem clamp(1rem, 3vw, 1.75rem);
}

.hemera-consent__logo {
    height: 3.5rem;
    object-fit: contain;
    width: 3.5rem;
}

.hemera-consent__site-name {
    color: var(--hemera-consent-primary-dark);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    max-width: 11rem;
}

.hemera-consent__heading h2 {
    color: var(--hemera-consent-ink);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    line-height: 1.2;
    margin: 0;
}

.hemera-consent__eyebrow {
    color: var(--hemera-consent-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 0 0 0.15rem;
    text-transform: uppercase;
}

.hemera-consent__close {
    align-items: center;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    color: var(--hemera-consent-ink);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 1.8rem;
    height: 2.75rem;
    justify-content: center;
    line-height: 1;
    width: 2.75rem;
}

.hemera-consent__body {
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1rem clamp(1rem, 3vw, 1.75rem);
}

.hemera-consent__intro {
    color: var(--hemera-consent-muted);
    margin: 0;
    max-width: 74ch;
}

.hemera-consent__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0.65rem;
}

.hemera-consent__legal a,
.hemera-consent__service a,
.hemera-consent__noscript a {
    color: var(--hemera-consent-primary-dark);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
}

.hemera-consent__categories {
    border: 0;
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 0;
    padding: 0;
}

.hemera-consent__categories legend {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    padding: 0;
}

.hemera-consent__category {
    align-items: center;
    background: var(--hemera-consent-soft);
    border: 1px solid var(--hemera-consent-border);
    border-radius: 0.65rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 3.6rem;
    padding: 0.65rem 0.85rem;
}

.hemera-consent__category-name {
    display: block;
    font-weight: 800;
}

.hemera-consent__category-note {
    color: var(--hemera-consent-muted);
    display: block;
    font-size: 0.86rem;
}

.hemera-consent__switch {
    cursor: pointer;
    display: inline-block;
    flex: 0 0 auto;
    height: 2rem;
    position: relative;
    width: 3.5rem;
}

.hemera-consent__switch input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.hemera-consent__slider {
    background: #687787;
    border: 2px solid #526171;
    border-radius: 2rem;
    inset: 0;
    position: absolute;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.hemera-consent__slider::before {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 1.4rem;
    left: 0.18rem;
    position: absolute;
    top: 0.18rem;
    transition: transform 160ms ease;
    width: 1.4rem;
}

.hemera-consent__switch input:checked + .hemera-consent__slider {
    background: var(--hemera-consent-primary);
    border-color: var(--hemera-consent-primary-dark);
}

.hemera-consent__switch input:checked + .hemera-consent__slider::before {
    transform: translateX(1.45rem);
}

.hemera-consent__switch input:focus-visible + .hemera-consent__slider {
    outline: 3px solid var(--hemera-consent-focus);
    outline-offset: 3px;
}

.hemera-consent__switch--locked {
    cursor: not-allowed;
    opacity: 0.78;
}

.hemera-consent__switch--locked .hemera-consent__slider::after {
    color: #fff;
    content: "✓";
    font-size: 0.75rem;
    font-weight: 900;
    left: 0.52rem;
    position: absolute;
    top: 0.34rem;
}

.hemera-consent__details-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--hemera-consent-primary-dark);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 800;
    gap: 0.4rem;
    justify-content: space-between;
    margin-top: 0.75rem;
    min-height: 2.75rem;
    padding: 0.35rem 0;
    text-align: left;
    width: 100%;
}

.hemera-consent__details {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.65rem;
}

.hemera-consent__detail-group {
    border: 1px solid var(--hemera-consent-border);
    border-radius: 0.75rem;
    padding: 0.85rem;
}

.hemera-consent__detail-group > h3 {
    font-size: 1.05rem;
    margin: 0;
}

.hemera-consent__detail-group > p {
    color: var(--hemera-consent-muted);
    margin: 0.2rem 0 0.75rem;
}

.hemera-consent__service {
    background: var(--hemera-consent-soft);
    border-left: 0.25rem solid var(--hemera-consent-primary);
    margin-top: 0.65rem;
    padding: 0.75rem;
}

.hemera-consent__service h4 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.hemera-consent__service dl,
.hemera-consent__service dl div {
    margin: 0;
}

.hemera-consent__service dl div {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(7rem, 0.35fr) 1fr;
    padding: 0.2rem 0;
}

.hemera-consent__service dt {
    font-weight: 800;
}

.hemera-consent__service dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.hemera-consent__empty-service {
    background: #fff8df;
    border: 1px solid #dcc575;
    border-radius: 0.5rem;
    color: #483b10 !important;
    padding: 0.65rem;
}

.hemera-consent__actions {
    background: #f8fafb;
    border-top: 1px solid var(--hemera-consent-border);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.85rem clamp(1rem, 3vw, 1.75rem);
}

.hemera-consent__button {
    border: 2px solid var(--hemera-consent-primary-dark);
    border-radius: 0.55rem;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 3rem;
    padding: 0.6rem 0.9rem;
}

.hemera-consent__button--accept {
    background: var(--hemera-consent-primary-dark);
    color: #fff;
}

.hemera-consent__button--save {
    background: #fff;
    color: var(--hemera-consent-primary-dark);
}

.hemera-consent__button--reject {
    background: #fff;
    border-color: var(--hemera-consent-danger);
    color: var(--hemera-consent-danger);
}

.hemera-consent__noscript {
    background: #fff8df;
    border: 2px solid #8b6f0b;
    bottom: 0;
    color: #292206;
    left: 0;
    padding: 0.8rem 1rem;
    position: fixed;
    right: 0;
    z-index: 2147483000;
}

.hemera-consent__noscript p {
    margin: 0 0 0.25rem;
}

.hemera-consent__sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.hemera-consent :where(button, a):focus-visible,
.hemera-consent__dialog:focus-visible {
    outline: 3px solid var(--hemera-consent-focus);
    outline-offset: 3px;
}

.hemera-consent :where(button, a):hover {
    filter: brightness(0.94);
}

html.hemera-consent-open {
    overflow: hidden;
}

@media (max-width: 48rem) {
    .hemera-consent__layer {
        padding: 0.35rem;
    }

    .hemera-consent__dialog {
        border-radius: 0.8rem;
        max-height: calc(100dvh - 0.7rem);
    }

    .hemera-consent__header {
        gap: 0.65rem;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .hemera-consent__logo {
        height: 2.75rem;
        width: 2.75rem;
    }

    .hemera-consent__actions {
        grid-template-columns: 1fr;
    }

    .hemera-consent__service dl div {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 24rem) {
    .hemera-consent__category {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hemera-consent *,
    .hemera-consent *::before,
    .hemera-consent *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@media (forced-colors: active) {
    .hemera-consent__slider,
    .hemera-consent__button {
        forced-color-adjust: auto;
    }
}
