/**
 * Cookie consent banner — minimal, high-contrast, BEM.
 */

.cookie-consent {
    position: fixed;
    z-index: 2147483000;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background-color: #f4f4f5;
    border-top: 1px solid #d4d4d8;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    font-size: 0.875rem;
    line-height: 1.5;
    color: #18181b;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
}

.cookie-consent.cookie-consent--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-consent__inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.cookie-consent__text {
    flex: 1 1 18rem;
    margin: 0;
    max-width: 48rem;
}

.cookie-consent__text a {
    color: #0f172a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__text a:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.cookie-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cookie-consent__btn:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.cookie-consent__btn--secondary {
    background-color: #fff;
    color: #18181b;
    border-color: #a1a1aa;
}

.cookie-consent__btn--secondary:hover {
    background-color: #fafafa;
}

.cookie-consent__btn--ghost {
    background-color: transparent;
    color: #3f3f46;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__btn--ghost:hover {
    color: #0f172a;
}

.cookie-consent__btn--primary {
    background-color: #18181b;
    color: #fafafa;
    border-color: #18181b;
}

.cookie-consent__btn--primary:hover {
    background-color: #27272a;
}

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

/* Dialog customization */
.cookie-consent-dialog {
    z-index: 2147483001;
    max-width: 28rem;
    width: calc(100vw - 2rem);
    padding: 0;
    border: 1px solid #d4d4d8;
    border-radius: 4px;
    background-color: #fff;
    color: #18181b;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
}

.cookie-consent-dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.45);
}

.cookie-consent-dialog__header {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #e4e4e7;
}

.cookie-consent-dialog__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
}

.cookie-consent-dialog__body {
    padding: 1rem 1.25rem;
}

.cookie-consent-dialog__note {
    margin: 0 0 1rem 0;
    font-size: 0.8125rem;
    color: #52525b;
    line-height: 1.45;
}

.cookie-consent-dialog__field {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-consent-dialog__field:last-child {
    margin-bottom: 0;
}

.cookie-consent-dialog__field input[type='checkbox'] {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: #18181b;
}

.cookie-consent-dialog__label {
    font-size: 0.875rem;
    line-height: 1.45;
}

.cookie-consent-dialog__label strong {
    display: block;
    margin-bottom: 0.15rem;
}

.cookie-consent-dialog__footer {
    padding: 0.75rem 1.25rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}
