.scc-cookie-popup,
.scc-cookie-popup *,
.scc-floating-settings,
.scc-manage-consent {
    box-sizing: border-box;
}

.scc-cookie-popup {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 999999;
    width: min(820px, calc(100% - 32px));
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    transform: translate(-50%, 18px);
    padding: 28px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 20px;
    background: var(--scc-bg, #fff);
    color: var(--scc-text, #1f2937);
    box-shadow: 0 24px 80px rgba(17, 24, 39, .22);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    font-family: inherit;
}

.scc-cookie-popup.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.scc-cookie-popup[hidden],
.scc-cookie-view[hidden] {
    display: none !important;
}

.scc-cookie-view[data-scc-view="summary"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 205px;
    gap: 30px;
    align-items: end;
}

.scc-cookie-eyebrow {
    margin: 0 0 7px;
    color: var(--scc-accent, #8b6333);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.scc-cookie-popup h2,
.scc-cookie-popup h3,
.scc-cookie-popup p {
    color: inherit;
    font-family: inherit;
}

.scc-cookie-popup h2 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3vw, 29px);
    line-height: 1.15;
    font-weight: 700;
    outline: none;
}

.scc-cookie-popup h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
}

.scc-cookie-popup p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.scc-withdraw-note {
    margin-top: 9px !important;
    opacity: .75;
    font-size: 12px !important;
}

.scc-cookie-policy {
    display: inline-block;
    margin-top: 11px;
    color: var(--scc-text, #1f2937);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.scc-cookie-actions,
.scc-preference-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.scc-btn,
.scc-back,
.scc-floating-settings,
.scc-manage-consent {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
}

.scc-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border: 2px solid var(--scc-accent, #8b6333);
    border-radius: 999px;
    background: var(--scc-bg, #fff);
    color: var(--scc-text, #1f2937);
    font-size: 13px;
    transition: transform .15s ease, background-color .15s ease;
}

/* Accept, Reject and Customise deliberately share the same visual weight. */
.scc-btn-choice:hover,
.scc-btn-choice:focus-visible {
    background: color-mix(in srgb, var(--scc-accent, #8b6333) 10%, var(--scc-bg, #fff));
}

.scc-btn-save {
    background: var(--scc-accent, #8b6333);
    color: var(--scc-button-text, #fff);
}

.scc-btn:hover,
.scc-back:hover,
.scc-floating-settings:hover,
.scc-manage-consent:hover {
    transform: translateY(-1px);
}

.scc-btn:focus-visible,
.scc-back:focus-visible,
.scc-floating-settings:focus-visible,
.scc-manage-consent:focus-visible,
.scc-cookie-policy:focus-visible,
.scc-details summary:focus-visible,
.scc-switch input:focus-visible + .scc-switch-ui {
    outline: 3px solid color-mix(in srgb, var(--scc-accent, #8b6333) 35%, transparent);
    outline-offset: 3px;
}

.scc-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.scc-back {
    padding: 8px 12px;
    border: 1px solid rgba(17,24,39,.18);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 12px;
}

.scc-category-list {
    display: grid;
    gap: 10px;
}

.scc-category {
    padding: 16px;
    border: 1px solid rgba(17,24,39,.12);
    border-radius: 14px;
}

.scc-category-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.scc-category-heading > div > p {
    opacity: .82;
}

.scc-third-parties {
    margin-top: 7px !important;
    font-size: 12px !important;
}

.scc-always-on {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17,24,39,.07);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.scc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

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

.scc-switch-ui {
    position: relative;
    width: 48px;
    height: 28px;
    border: 2px solid rgba(17,24,39,.25);
    border-radius: 999px;
    background: rgba(17,24,39,.06);
    transition: background .15s ease, border-color .15s ease;
}

.scc-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--scc-text, #1f2937);
    transition: transform .15s ease, background .15s ease;
}

.scc-switch input:checked + .scc-switch-ui {
    border-color: var(--scc-accent, #8b6333);
    background: var(--scc-accent, #8b6333);
}

.scc-switch input:checked + .scc-switch-ui::after {
    transform: translateX(20px);
    background: var(--scc-button-text, #fff);
}

.scc-details {
    margin-top: 12px;
    font-size: 12px;
}

.scc-details summary {
    width: max-content;
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.scc-table-wrap {
    overflow-x: auto;
    margin-top: 10px;
}

.scc-cookie-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 11px;
}

.scc-cookie-table th,
.scc-cookie-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(17,24,39,.1);
    text-align: left;
    vertical-align: top;
}

.scc-cookie-table th {
    font-weight: 700;
}

.scc-empty {
    margin-top: 9px !important;
    font-size: 12px !important;
    opacity: .72;
}

.scc-preference-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.scc-floating-settings {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 999998;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid rgba(17,24,39,.2);
    border-radius: 999px;
    background: var(--scc-bg, #fff);
    color: var(--scc-text, #1f2937);
    box-shadow: 0 5px 20px rgba(17,24,39,.12);
    font-size: 11px;
}

.scc-manage-consent {
    padding: 9px 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 13px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 720px) {
    .scc-cookie-popup {
        bottom: 10px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        padding: 21px;
        border-radius: 16px;
    }

    .scc-cookie-view[data-scc-view="summary"] {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .scc-cookie-actions--summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .scc-category-heading {
        gap: 12px;
    }

    .scc-preference-actions {
        grid-template-columns: 1fr;
    }

    .scc-floating-settings {
        left: 10px;
        bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scc-cookie-popup,
    .scc-btn,
    .scc-back,
    .scc-switch-ui,
    .scc-switch-ui::after,
    .scc-floating-settings,
    .scc-manage-consent {
        transition: none;
    }
}
