/* Cookie banner, preference center and blocked-embed placeholders. */

.cc-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    max-width: 640px;
    margin-inline: auto;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, .8));
    border-radius: var(--radius-lg, 24px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, .18);
}

.cc-banner[hidden],
.cc-modal[hidden] {
    display: none;
}

.cc-banner__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color, #55b2d8);
    margin-bottom: .5rem;
}

.cc-banner__text {
    font-size: .9rem;
    color: var(--text-muted, #7f8c8d);
    margin-bottom: 1.25rem;
}

.cc-banner__text a,
.cc-modal__intro a {
    color: var(--accent-color, #ff5285);
    font-weight: 600;
}

.cc-banner__actions,
.cc-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
}

.cc-btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: .625rem 1.25rem;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: var(--radius-pill, 50px);
    cursor: pointer;
    transition: filter .2s, background-color .2s;
}

.cc-btn:focus-visible {
    outline: 3px solid var(--primary-color, #55b2d8);
    outline-offset: 2px;
}

.cc-btn--accept {
    background: var(--accent-color, #ff5285);
    color: #fff;
}

/* Refusal must be no harder than acceptance: same size, same prominence. */
.cc-btn--reject {
    background: #fff;
    color: var(--text-main, #34495e);
    border-color: var(--text-muted, #7f8c8d);
}

.cc-btn--save {
    background: var(--primary-color, #55b2d8);
    color: #fff;
}

.cc-btn--link {
    flex: 1 1 100%;
    background: none;
    color: var(--text-muted, #7f8c8d);
    text-decoration: underline;
}

.cc-btn:hover {
    filter: brightness(.95);
}

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 52, 54, .6);
}

.cc-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    background: #fff;
    border-radius: var(--radius-lg, 24px);
    box-shadow: 0 20px 60px rgba(31, 38, 135, .25);
}

.cc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #eef2f5;
}

.cc-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #55b2d8);
    margin: 0;
}

.cc-modal__close {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-muted, #7f8c8d);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.cc-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

.cc-modal__intro {
    font-size: .9rem;
    color: var(--text-muted, #7f8c8d);
    margin-bottom: 1.5rem;
}

.cc-modal__footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #eef2f5;
}

.cc-group + .cc-group {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f5;
}

.cc-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
}

.cc-group__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #34495e);
    margin: 0;
}

.cc-group__desc {
    font-size: .85rem;
    color: var(--text-muted, #7f8c8d);
    margin: 0;
}

.cc-badge {
    flex-shrink: 0;
    padding: .25rem .75rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--success-color, #10ac84);
    background: rgba(16, 172, 132, .12);
    border-radius: var(--radius-pill, 50px);
}

.cc-switch {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 52px;
    height: 30px;
    margin: 0;
    cursor: pointer;
}

.cc-switch__slider {
    display: block;
    width: 52px;
    height: 30px;
    background: #cfd8dc;
    border-radius: var(--radius-pill, 50px);
    transition: background-color .2s;
}

.cc-switch__slider::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    margin: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s;
}

.cc-switch input:checked + .cc-switch__slider {
    background: var(--success-color, #10ac84);
}

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

.cc-switch input:focus-visible + .cc-switch__slider {
    outline: 3px solid var(--primary-color, #55b2d8);
    outline-offset: 2px;
}

.cc-switch__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

body.cc-locked {
    overflow: hidden;
}

/* Placeholder shown in place of an embed awaiting consent. */
.cc-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1.5rem;
    text-align: center;
    background: #eef4f8;
    color: var(--text-main, #34495e);
}

.cc-placeholder__icon {
    font-size: 2rem;
    color: var(--primary-color, #55b2d8);
}

.cc-placeholder__text {
    max-width: 38ch;
    font-size: .85rem;
    color: var(--text-muted, #7f8c8d);
    margin: 0;
}

.cc-placeholder__btn {
    min-height: 44px;
    padding: .5rem 1.25rem;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color, #55b2d8);
    border: 0;
    border-radius: var(--radius-pill, 50px);
    cursor: pointer;
}

.cc-placeholder__link {
    font-size: .78rem;
    color: var(--text-muted, #7f8c8d);
}

@media (max-width: 575.98px) {
    .cc-banner__actions .cc-btn,
    .cc-modal__footer .cc-btn {
        flex: 1 1 100%;
    }
}
