:root {
    --tcg-consent-ink: #131313;
    --tcg-consent-paper: #fffdfa;
    --tcg-consent-gold: #b9842d;
    --tcg-consent-line: rgba(19, 19, 19, 0.18);
}

.tcg-consent-banner,
.tcg-consent-modal {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.tcg-consent-banner *,
.tcg-consent-modal * {
    box-sizing: border-box;
}

.tcg-consent-banner[hidden],
.tcg-consent-modal[hidden] {
    display: none !important;
}

.tcg-consent-banner {
    position: fixed;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 1000000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    width: min(1180px, calc(100% - 44px));
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    margin: 0 auto;
    padding: 24px 26px;
    color: #fff;
    background: rgba(16, 16, 16, 0.985);
    border: 1px solid rgba(185, 132, 45, 0.7);
    border-radius: 10px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
}

.tcg-consent-banner h2,
.tcg-consent-modal h2,
.tcg-consent-option h3,
.tcg-consent-banner p,
.tcg-consent-modal p {
    margin-top: 0;
}

.tcg-consent-banner h2 {
    margin-bottom: 7px;
    color: #fff;
    font-size: clamp(20px, 2vw, 27px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.tcg-consent-banner__copy > p:not(.tcg-consent-kicker) {
    max-width: 760px;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.55;
}

.tcg-consent-banner a {
    color: #e2b76e;
    font-size: 13px;
    text-underline-offset: 3px;
}

.tcg-consent-kicker {
    margin-bottom: 7px;
    color: #d8a654;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tcg-consent-banner__actions,
.tcg-consent-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tcg-consent-banner__actions {
    justify-content: flex-end;
}

button.tcg-consent-action,
.tcg-media-consent button {
    appearance: none;
    min-height: 44px;
    margin: 0;
    padding: 11px 16px;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 4px;
    box-shadow: none;
    font: 800 11px/1.15 Arial, Helvetica, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

button.tcg-consent-action--equal,
button.tcg-consent-action--save {
    color: #141414;
    background: #d4a250;
    border-color: #d4a250;
}

button.tcg-consent-action:hover,
button.tcg-consent-action:focus-visible,
.tcg-media-consent button:hover,
.tcg-media-consent button:focus-visible {
    color: #141414;
    background: #fff;
    border-color: #fff;
    outline: 3px solid rgba(216, 166, 84, 0.48);
    outline-offset: 2px;
}

.tcg-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    display: grid;
    place-items: center;
    padding: 24px;
}

.tcg-consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.tcg-consent-modal__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(840px, calc(100vh - 48px));
    overflow-y: auto;
    padding: 34px;
    color: var(--tcg-consent-ink);
    background: var(--tcg-consent-paper);
    border: 1px solid rgba(185, 132, 45, 0.65);
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.tcg-consent-modal__dialog:focus {
    outline: none;
}

.tcg-consent-modal__dialog h2 {
    margin-bottom: 8px;
    color: var(--tcg-consent-ink);
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1;
    letter-spacing: -0.04em;
}

/* Keep theme-wide heading rules from overpowering the cookie dialog on phones. */
.tcg-consent-modal__dialog #tcg-consent-title {
    width: auto;
    max-width: 100%;
    margin-right: 46px;
    color: var(--tcg-consent-ink) !important;
    font-size: clamp(27px, 5vw, 42px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
    text-align: left !important;
    overflow-wrap: break-word;
}

.tcg-consent-modal__dialog > p:not(.tcg-consent-kicker) {
    max-width: 590px;
    margin-bottom: 24px;
    color: #4d4d4d;
    font-size: 15px;
    line-height: 1.55;
}

button.tcg-consent-modal__close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #262626;
    background: transparent;
    border: 1px solid var(--tcg-consent-line);
    border-radius: 50%;
    font: 300 28px/38px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.tcg-consent-options {
    border-top: 1px solid var(--tcg-consent-line);
}

.tcg-consent-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--tcg-consent-line);
}

.tcg-consent-option h3 {
    margin-bottom: 4px;
    color: #171717;
    font-size: 17px;
    line-height: 1.2;
}

.tcg-consent-option p {
    margin-bottom: 0;
    color: #5a5a5a;
    font-size: 13px;
    line-height: 1.45;
}

.tcg-consent-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #333;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tcg-consent-switch input {
    width: 44px;
    height: 24px;
    margin: 0;
    accent-color: var(--tcg-consent-gold);
    cursor: pointer;
}

.tcg-consent-switch input:disabled {
    cursor: not-allowed;
}

.tcg-consent-modal__actions {
    justify-content: flex-end;
    margin-top: 24px;
}

.tcg-consent-modal button.tcg-consent-action {
    color: #171717;
    border-color: rgba(19, 19, 19, 0.45);
}

.tcg-consent-modal button.tcg-consent-action--save {
    border-color: #d4a250;
}

body.tcg-consent-modal-open {
    overflow: hidden;
}

.tcg-cookie-settings-button {
    appearance: none;
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tcg-cookie-settings-button:hover,
.tcg-cookie-settings-button:focus-visible {
    color: #d4a250;
    background: transparent;
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.tcg-form-privacy-notice {
    margin: 12px 0 0;
    color: inherit;
    opacity: 0.78;
    font-size: 12px;
    line-height: 1.5;
}

.tcg-form-privacy-notice a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tcg-media-consent {
    display: grid;
    place-items: center;
    min-height: 240px;
    padding: 28px;
    text-align: center;
    color: #f8f5ef;
    background: #161616;
    border: 1px solid rgba(185, 132, 45, 0.5);
}

.tcg-media-consent p {
    margin: 0 0 15px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.tcg-media-consent strong {
    color: #fff;
    font-size: 17px;
}

@media (max-width: 840px) {
    .tcg-consent-banner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tcg-consent-banner__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .tcg-consent-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }

    .tcg-consent-banner__actions,
    .tcg-consent-modal__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    button.tcg-consent-action {
        width: 100%;
    }

    .tcg-consent-modal {
        padding: 10px;
    }

    .tcg-consent-modal__dialog {
        max-height: calc(100vh - 20px);
        padding: 28px 20px 22px;
    }

    .tcg-consent-modal__dialog #tcg-consent-title {
        font-size: clamp(27px, 8vw, 34px) !important;
        line-height: 1.12 !important;
    }

    .tcg-consent-option {
        gap: 12px;
    }

    .tcg-consent-switch {
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tcg-consent-banner,
    .tcg-consent-modal,
    .tcg-consent-modal * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Compact banner on phones (14 Oct 2026): about a quarter of the screen instead of half.
   Accept and reject stay equally prominent, side by side; Manage choices stays one tap away. */
@media (max-width: 560px) {
    .tcg-consent-banner {
        gap: 12px;
        padding: 14px 16px 12px;
        border-radius: 8px;
    }

    .tcg-consent-banner .tcg-consent-kicker {
        display: none;
    }

    body .tcg-consent-banner h2 {
        margin-bottom: 4px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
    }

    .tcg-consent-banner__copy > p:not(.tcg-consent-kicker) {
        margin-bottom: 2px;
        font-size: 13px;
        line-height: 1.45;
    }

    .tcg-consent-banner a {
        font-size: 12px;
    }

    .tcg-consent-banner__actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tcg-consent-banner__actions button.tcg-consent-action {
        min-height: 44px;
        padding: 10px 8px;
    }

    .tcg-consent-banner__actions button.tcg-consent-action:not(.tcg-consent-action--equal) {
        grid-column: 1 / -1;
        order: 3;
        min-height: 36px;
        padding: 6px 8px;
        border-color: transparent;
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

/* Some page templates restyle every h2 (huge, thin); keep the banner heading at its intended size everywhere. */
body .tcg-consent-banner h2 {
    font-family: inherit !important;
    font-size: clamp(20px, 2vw, 26px) !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
}

@media (max-width: 560px) {
    body .tcg-consent-banner h2 {
        font-size: 17px !important;
        line-height: 1.2 !important;
    }
}
