/* TMC Cookies: banner, preferences and placeholders. No pointer-over states or animated changes. */
.tmc-cookies,
.tmc-cookies-modal,
.tmc-cookies-float,
.tmc-cookies-ph {
    --tmc-bg: #ffffff;
    --tmc-text: #1a1a1a;
    --tmc-muted: #555555;
    --tmc-border: #d6d6d6;
    --tmc-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tmc-text);
}
.tmc-cookies *,
.tmc-cookies-modal *,
.tmc-cookies-ph * {
    box-sizing: border-box;
}
.tmc-cookies[hidden],
.tmc-cookies-modal[hidden],
.tmc-cookies-float[hidden] {
    display: none !important;
}

/* ── Banner ── */
.tmc-cookies {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.tmc-cookies__inner {
    pointer-events: auto;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 22px;
    background: var(--tmc-bg);
    border: 1px solid var(--tmc-border);
    border-radius: var(--tmc-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.tmc-cookies__title {
    margin: 0 0 6px;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tmc-text);
    text-transform: none;
    letter-spacing: 0;
}
.tmc-cookies__text {
    margin: 0 0 14px;
    color: var(--tmc-muted);
    font-size: 14px;
}
.tmc-cookies__text a,
.tmc-cookies-ph a {
    color: inherit;
    text-decoration: underline;
}
.tmc-cookies__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Buttons (Accept and Reject share one style: equal prominence) ── */
.tmc-btn {
    flex: 1 1 160px;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    border: 2px solid var(--tmc-primary, #1f2937);
    border-radius: 6px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: none;
}
.tmc-btn--primary {
    background: var(--tmc-primary, #1f2937);
    color: var(--tmc-on-primary, #ffffff);
}
.tmc-btn--outline {
    background: transparent;
    color: var(--tmc-text);
}
.tmc-btn--link {
    flex: 0 0 auto;
    min-height: 0;
    border-color: transparent;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    font-weight: 400;
}
.tmc-btn:focus-visible,
.tmc-x:focus-visible,
.tmc-cookies-float:focus-visible,
.tmc-switch:focus-visible,
.tmc-cookies__text a:focus-visible {
    outline: 3px solid var(--tmc-text);
    outline-offset: 2px;
}

/* ── Preferences modal ── */
html.tmc-cookies-lock {
    overflow: hidden;
}
.tmc-cookies-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tmc-cookies-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.tmc-cookies-modal__box {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px;
    background: var(--tmc-bg);
    border-radius: var(--tmc-radius);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}
.tmc-cookies-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.tmc-x {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin: -6px -6px 0 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--tmc-text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.tmc-cat {
    padding: 14px 0;
    border-top: 1px solid var(--tmc-border);
}
.tmc-cat__head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tmc-cat__label {
    flex: 1 1 auto;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.tmc-cat__always {
    font-size: 13px;
    color: var(--tmc-muted);
}
.tmc-cat__desc,
.tmc-cat__services {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--tmc-muted);
}
.tmc-cat__services {
    font-size: 13px;
}
.tmc-cookies-modal .tmc-cookies__actions {
    padding-top: 14px;
    border-top: 1px solid var(--tmc-border);
}

/* Toggle switch (native checkbox, keyboard and screen-reader friendly) */
.tmc-switch {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 13px;
    background: #9a9a9a;
    cursor: pointer;
}
.tmc-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
}
.tmc-switch:checked {
    background: var(--tmc-primary, #1f2937);
}
.tmc-switch:checked::after {
    left: 23px;
}
.tmc-switch:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Floating settings button ── */
.tmc-cookies-float {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147482999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tmc-primary, #1f2937);
    color: var(--tmc-on-primary, #ffffff);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* ── Embed placeholder ── */
.tmc-cookies-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    padding: 20px;
    background: #f2f2f2;
    border: 1px solid var(--tmc-border);
    border-radius: 8px;
    text-align: center;
}
.tmc-cookies-ph__text {
    max-width: 520px;
    margin: 0;
    font-size: 14px;
}
.tmc-cookies-ph .tmc-btn--primary {
    flex: 0 0 auto;
}

/* ── Shortcodes ── */
.tmc-cookies-open {
    cursor: pointer;
}
.tmc-cookies-table__scroll {
    overflow-x: auto;
    margin-bottom: 1.5em;
}
.tmc-cookies-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.tmc-cookies-table th,
.tmc-cookies-table td {
    padding: 8px 10px;
    border: 1px solid #dddddd;
    text-align: left;
    vertical-align: top;
}
.tmc-cookies-table code {
    word-break: break-all;
}

@media (max-width: 600px) {
    .tmc-cookies {
        left: 0;
        right: 0;
        bottom: 0;
    }
    .tmc-cookies__inner {
        max-height: 85vh;
        padding: 16px;
        border-radius: var(--tmc-radius) var(--tmc-radius) 0 0;
        border-width: 1px 0 0;
    }
    .tmc-btn {
        flex-basis: 100%;
    }
    .tmc-cookies-modal {
        padding: 0;
        align-items: flex-end;
    }
    .tmc-cookies-modal__box {
        max-height: 92vh;
        border-radius: var(--tmc-radius) var(--tmc-radius) 0 0;
        padding: 18px 16px;
    }
}
