:root {
    --tk-cookie-accent: #76542f;
    --tk-cookie-bg: #fff;
    --tk-cookie-border: rgb(20 20 20 / 12%);
    --tk-cookie-dark: #151515;
    --tk-cookie-muted: #6d6d6d;
    --tk-cookie-soft: #f6f3ee;
    --tk-cookie-text: #242424;
}

.tk-cookie[hidden],
.tk-cookie-modal[hidden] {
    display: none !important;
}

.tk-cookie {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px;
    background: rgb(255 255 255 / 98%);
    border: 1px solid var(--tk-cookie-border);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgb(0 0 0 / 18%);
    backdrop-filter: blur(12px);
}

.tk-cookie__content,
.tk-cookie__actions,
.tk-cookie-modal__header,
.tk-cookie-modal__footer,
.tk-cookie-option {
    display: flex;
    align-items: center;
}

.tk-cookie__content,
.tk-cookie-modal__header,
.tk-cookie-option {
    justify-content: space-between;
}

.tk-cookie__content {
    gap: 32px;
}

.tk-cookie__text {
    max-width: 680px;
}

.tk-cookie__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--tk-cookie-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
}

.tk-cookie h2,
.tk-cookie-modal h2 {
    margin: 0 0 10px;
    color: var(--tk-cookie-text);
    font-size: 24px;
    line-height: 1.25;
}

.tk-cookie p,
.tk-cookie-modal p {
    margin: 0;
    color: var(--tk-cookie-muted);
    font-size: 14px;
    line-height: 1.7;
}

.tk-cookie__link {
    display: inline-block;
    margin-top: 10px;
    color: var(--tk-cookie-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tk-cookie__actions {
    flex-shrink: 0;
    gap: 10px;
}

.tk-cookie__button {
    min-height: 46px;
    padding: 0 19px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease;
}

.tk-cookie__button:hover {
    transform: translateY(-1px);
}

.tk-cookie__button--primary {
    color: #fff;
    background: var(--tk-cookie-dark);
    border-color: var(--tk-cookie-dark);
}

.tk-cookie__button--secondary {
    color: var(--tk-cookie-text);
    background: var(--tk-cookie-soft);
    border-color: var(--tk-cookie-border);
}

.tk-cookie__button--outline {
    color: var(--tk-cookie-text);
    background: transparent;
    border-color: var(--tk-cookie-text);
}

.tk-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tk-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 58%);
    backdrop-filter: blur(4px);
}

.tk-cookie-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--tk-cookie-bg);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgb(0 0 0 / 32%);
}

.tk-cookie-modal__header,
.tk-cookie-modal__footer {
    gap: 16px;
    padding: 22px 24px;
}

.tk-cookie-modal__header {
    border-bottom: 1px solid var(--tk-cookie-border);
}

.tk-cookie-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--tk-cookie-border);
}

.tk-cookie-modal__close {
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--tk-cookie-text);
    background: var(--tk-cookie-soft);
    border: 0;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.tk-cookie-modal__body {
    padding: 8px 24px;
}

.tk-cookie-option {
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--tk-cookie-border);
}

.tk-cookie-option:last-child {
    border-bottom: 0;
}

.tk-cookie-option__content h3,
.tk-cookie-option__content label {
    display: block;
    margin: 0 0 6px;
    color: var(--tk-cookie-text);
    font-size: 15px;
    font-weight: 700;
}

.tk-cookie-option__status {
    flex-shrink: 0;
    color: var(--tk-cookie-accent);
    font-size: 12px;
    font-weight: 700;
}

.tk-switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 26px;
}

.tk-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.tk-switch__slider {
    position: absolute;
    inset: 0;
    background: #d4d4d4;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.tk-switch__slider::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    content: "";
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
    transition: transform .2s ease;
}

.tk-switch input:checked + .tk-switch__slider {
    background: var(--tk-cookie-dark);
}

.tk-switch input:checked + .tk-switch__slider::before {
    transform: translateX(22px);
}

@media (max-width: 991px) {
    .tk-cookie {
        right: 12px;
        bottom: 12px;
        left: 12px;
        padding: 20px;
    }

    .tk-cookie__content {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .tk-cookie__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tk-cookie__button--primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575px) {
    .tk-cookie h2,
    .tk-cookie-modal h2 {
        font-size: 20px;
    }

    .tk-cookie__actions,
    .tk-cookie-modal__footer {
        flex-direction: column-reverse;
    }

    .tk-cookie__button,
    .tk-cookie-modal__footer .tk-cookie__button {
        width: 100%;
    }

    .tk-cookie-option {
        align-items: flex-start;
    }
}
