.th-cookie-consent,
.th-cookie-feedback {
    position: fixed;
    z-index: 999999;
    right: 22px;
    bottom: 22px;
    width: 440px;
    max-width: calc(100% - 44px);
    margin: 0;
    box-sizing: border-box;
    color: #203b51;
    background: #fff;
    border: 1px solid #b8d4e8;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(22, 60, 90, .2);
}

.th-cookie-consent {
    padding: 21px;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    overflow: auto;
    border-top: 4px solid #235e91;
}

.th-cookie-consent [hidden],
.th-cookie-consent[hidden],
.th-cookie-feedback:empty {
    display: none !important;
}

.th-cookie-consent h2 {
    color: #20496d;
    margin: 0 0 9px;
    font-size: 22px;
    line-height: 1.25;
}

.th-cookie-consent p {
    color: #344d60;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.th-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.th-cookie-actions button,
.th-cookie-settings-link {
    cursor: pointer;
    font: inherit;
}

.th-cookie-actions button {
    min-height: 44px;
    padding: 7px 11px;
    border: 1px solid #235e91;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.th-cookie-choice {
    color: #fff;
    background: #235e91;
}

.th-cookie-secondary {
    color: #1c527e;
    background: #fff;
}

.th-cookie-actions button:focus-visible,
.th-cookie-category input:focus-visible,
.th-cookie-settings-link:focus-visible {
    outline: 3px solid #2875af;
    outline-offset: 2px;
}

.th-cookie-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef5fa;
}

.th-cookie-category label {
    margin: 0;
}

.th-cookie-category input {
    margin: 0;
    width: 20px;
    height: 20px;
}

.th-cookie-category p {
    grid-column: 1 / -1;
}

.th-cookie-consent .th-cookie-error {
    margin-top: 12px;
    color: #9b2323;
}

.th-cookie-settings-link {
    display: inline-block;
    border: 0;
    padding: 4px 0;
    color: inherit;
    background: transparent;
    text-decoration: underline;
}

.th-cookie-feedback {
    width: auto;
    padding: 10px 14px;
}

@media (max-width: 600px) {
    .th-cookie-consent,
    .th-cookie-feedback {
        right: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
    }

    .th-cookie-consent {
        padding: 15px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
}

@media (max-width: 420px) {
    .th-cookie-actions button {
        width: 100%;
    }
}
