.kp-cookie-dialog {
    --kp-cookie-accent: #1374bd;
    --kp-cookie-accent-hover: #0c5e9b;
    box-sizing: border-box;
    color: #222;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 0 16px #0003;
    line-height: 1.5;
}

html:has(.kp-cookie-dialog[open]) {
    overflow: hidden;
    overscroll-behavior: none;
}

.kp-cookie-dialog:not([open]),
.kp-cookie-dialog [hidden],
#kp-cookie-footer[hidden] {
    display: none;
}

.kp-cookie-banner p,
.kp-cookie-choice p {
    margin: 0;
}

.kp-cookie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 8px;
}

.kp-cookie-links a {
    color: var(--kp-cookie-accent);
    text-decoration: underline;
}

.kp-cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.kp-cookie-button {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--kp-cookie-accent);
    border-radius: 6px;
    background: #fff;
    color: var(--kp-cookie-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.kp-cookie-button:hover {
    background: #edf6fd;
}

.kp-cookie-button--primary {
    background: var(--kp-cookie-accent);
    color: #fff;
}

.kp-cookie-button--primary:hover {
    background: var(--kp-cookie-accent-hover);
}

.kp-cookie-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(800px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 32px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(16px, 4vw, 32px);
    font-size: 14px;
}

.kp-cookie-dialog::backdrop {
    background: #000b;
}

.kp-cookie-dialog--banner {
    width: min(500px, calc(100% - 32px));
}

.kp-cookie-dialog h2 {
    margin: 0 38px 16px 0;
    font-size: 22px;
}

.kp-cookie-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #495057;
    font: inherit;
    font-size: 28px;
    cursor: pointer;
}

.kp-cookie-close:hover,
.kp-cookie-close:active {
    background: transparent;
}

.kp-cookie-choice {
    padding: 14px 0;
    border-top: 1px solid #e3e7eb;
}

.kp-cookie-choice label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-height: 24px;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.kp-cookie-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.kp-cookie-switch {
    position: relative;
    flex: 0 0 40px;
    height: 20px;
    border-radius: 10px;
    background: #69747f;
}

.kp-cookie-switch::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    content: '';
}

.kp-cookie-choice input:checked + .kp-cookie-switch {
    background: var(--kp-cookie-accent);
}

.kp-cookie-choice input:checked + .kp-cookie-switch::after {
    transform: translateX(20px);
}

.kp-cookie-choice input:disabled + .kp-cookie-switch {
    opacity: .65;
}

.kp-cookie-actions--save {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e3e7eb;
    padding-top: 16px;
    margin-top: 0;
}

.kp-cookie-footer-button {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0097fd;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.kp-cookie-footer-button:hover,
.kp-cookie-footer-button:active {
    background: transparent;
    text-decoration: underline;
}

.kp-cookie-button:focus-visible,
.kp-cookie-footer-button:focus-visible,
.kp-cookie-choice input:focus-visible + .kp-cookie-switch {
    outline: 2px solid #0c5e9b;
    outline-offset: 3px;
}

.kp-cookie-banner [data-kp-cookie-settings]:focus,
.kp-cookie-close:focus {
    outline: none;
}
