:root {
    --hts-consent-bg: #ffffff;
    --hts-consent-text: #1f2937;
    --hts-consent-muted: #667085;
    --hts-consent-border: #d0d5dd;
    --hts-consent-primary: #152d75;
    --hts-consent-primary-text: #ffffff;
    --hts-consent-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

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

.hts-consent[hidden],
.hts-consent__settings[hidden],
.hts-consent__summary[hidden] {
    display: none !important;
}

.hts-consent {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    color: var(--hts-consent-text);
}

.hts-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}

.hts-consent__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--hts-consent-bg);
    border-radius: 18px;
    box-shadow: var(--hts-consent-shadow);
    padding: 28px;
}

.hts-consent__panel h2 {
    margin: 0 40px 12px 0;
    font-size: 1.55rem;
    line-height: 1.25;
}

.hts-consent__panel p {
    margin: 0;
    line-height: 1.65;
    color: var(--hts-consent-muted);
}

.hts-consent__close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.hts-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hts-consent__button,
.hts-consent-link {
    appearance: none;
    border: 1px solid var(--hts-consent-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--hts-consent-text);
    font: inherit;
    cursor: pointer;
}

.hts-consent__button {
    padding: 12px 16px;
    font-weight: 700;
}

.hts-consent__button--primary {
    background: var(--hts-consent-primary);
    border-color: var(--hts-consent-primary);
    color: var(--hts-consent-primary-text);
}

.hts-consent__button--link {
    border-color: transparent;
    text-decoration: underline;
}

.hts-consent__legal {
    display: flex;
    gap: 16px;
    margin-top: 18px;
    font-size: 0.9rem;
}

.hts-consent__legal a {
    color: var(--hts-consent-muted);
}

.hts-consent__categories {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.hts-consent__category {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--hts-consent-border);
    border-radius: 12px;
    cursor: pointer;
}

.hts-consent__category-copy {
    display: grid;
    gap: 5px;
}

.hts-consent__category-copy small {
    color: var(--hts-consent-muted);
    line-height: 1.45;
}

.hts-consent__category input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
}

.hts-consent-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .hts-consent {
        align-items: stretch;
        padding: 0;
    }

    .hts-consent__panel {
        width: 100%;
        max-height: 100vh;
        min-height: 100vh;
        border-radius: 0;
        padding: 24px 20px;
    }

    .hts-consent__actions {
        display: grid;
    }

    .hts-consent__button {
        width: 100%;
    }

    .hts-consent__category {
        align-items: flex-start;
    }
}
