/* Cookie consent banner and preferences panel (CookieConsentRenderer.Banner, consent-banner.js).
   Shared by every brand; scoped under .tk-consent so theme styles don't leak in or out. */

.tk-consent,
.tk-consent * {
    box-sizing: border-box;
}

.tk-consent [hidden] {
    display: none !important;
}

.tk-consent {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #414141;
}

/* Footer "Cookie Settings" link: ships hidden (inline display:none), shown only where the banner is on. */
.cookie-settings-link,
[data-cookie-settings="true"] {
    display: inline !important;
}

/* --- Banner ---------------------------------------------------------------- */
.tk-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    margin: 20px;
    padding: 24px 30px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, .29);
}

.tk-consent-banner:focus {
    outline: none;
}

.tk-consent-banner:focus-visible {
    outline: 2px solid #414141;
    outline-offset: 2px;
}

.tk-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tk-consent-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.tk-consent .tk-consent-title {
    margin: 0 0 6px;
    padding: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: #414141;
}

.tk-consent-text {
    margin: 0;
    font-size: 13px;
    color: #595959;
}

.tk-consent-text p {
    margin: 0 0 8px;
}

.tk-consent-text a,
.tk-consent-policy {
    color: #414141;
    text-decoration: underline;
}

.tk-consent-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
}

/* Accept All and Reject All are deliberately identical: same size, weight and contrast. */
.tk-consent .tk-consent-btn {
    display: inline-block;
    min-width: 140px;
    margin: 0;
    padding: 11px 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    background: #414141;
    border: 1px solid #414141;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.tk-consent .tk-consent-btn:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

.tk-consent .tk-consent-btn:focus-visible,
.tk-consent .tk-consent-link:focus-visible,
.tk-consent .tk-consent-close:focus-visible,
.tk-consent .tk-consent-switch:focus-visible {
    outline: 2px solid #414141;
    outline-offset: 2px;
}

.tk-consent .tk-consent-link {
    margin: 0 0 0 4px;
    padding: 6px 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #414141;
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

/* --- Preferences panel ----------------------------------------------------- */
html.tk-consent-open {
    overflow: hidden;
}

.tk-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    background: rgba(0, 0, 0, .45);
}

.tk-consent-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2147483002;
    display: flex;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 640px;
    max-height: calc(100% - 32px);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, .29);
}

.tk-consent-panel:focus {
    outline: none;
}

.tk-consent-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #e1e1e1;
}

.tk-consent-panel-head .tk-consent-title {
    margin: 0;
    font-size: 18px;
}

.tk-consent .tk-consent-close {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    font-size: 26px;
    line-height: 1;
    color: #414141;
    background: none;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.tk-consent-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 24px;
}

.tk-consent-panel-body > .tk-consent-text {
    margin-bottom: 12px;
}

.tk-consent-cat {
    padding: 14px 0;
    border-top: 1px solid #eee;
}

.tk-consent-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tk-consent .tk-consent-cat-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #414141;
    cursor: default;
}

.tk-consent label.tk-consent-cat-name {
    cursor: pointer;
}

.tk-consent-always {
    font-size: 12px;
    font-weight: 700;
    color: #2f6b2f;
}

.tk-consent-cat-desc {
    margin-top: 4px;
    font-size: 13px;
    color: #595959;
}

/* Toggle switch */
.tk-consent .tk-consent-switch {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    margin: 0;
    background: #8a8a8a;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.tk-consent .tk-consent-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.tk-consent .tk-consent-switch:checked {
    background: #414141;
}

.tk-consent .tk-consent-switch:checked::after {
    transform: translateX(20px);
}

.tk-consent-panel-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #e1e1e1;
}

/* --- Small screens ----------------------------------------------------------- */
@media (max-width: 767px) {
    .tk-consent-banner {
        margin: 12px;
        padding: 20px;
    }

    .tk-consent-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .tk-consent-actions {
        flex-wrap: wrap;
    }

    .tk-consent-actions .tk-consent-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .tk-consent-actions .tk-consent-link {
        flex: 1 1 100%;
        margin: 0;
    }

    .tk-consent-panel-foot .tk-consent-btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tk-consent .tk-consent-btn,
    .tk-consent .tk-consent-switch,
    .tk-consent .tk-consent-switch::after {
        transition: none;
    }
}
