html.agora-cmp-scroll-locked,
body.agora-cmp-scroll-locked {
    overflow: hidden;
}

.agora-cmp {
    --agora-cmp-accent: #16715f;
    --agora-cmp-accent-hover: color-mix(in srgb, var(--agora-cmp-accent) 82%, #000000);
    --agora-cmp-focus: color-mix(in srgb, var(--agora-cmp-accent) 38%, #ffffff);
    color: #172026;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    background: rgba(23, 32, 38, 0.58);
    overflow: auto;
}

.agora-cmp button {
    font: inherit;
}

.agora-cmp.is-visible {
    display: flex;
}

.agora-cmp__dialog {
    box-sizing: border-box;
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    border: 1px solid #d8e0e4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(23, 32, 38, 0.22);
    overflow: auto;
}

.agora-cmp__content {
    padding: 24px;
}

.agora-cmp__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.agora-cmp__brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
}

.agora-cmp__logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    max-width: 132px;
    max-height: 42px;
    object-fit: contain;
}

.agora-cmp__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

.agora-cmp__header-link {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #46535c;
    padding: 4px 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-align: right;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.agora-cmp__header-link:hover,
.agora-cmp__header-link:focus-visible {
    color: #6f7c85;
    text-decoration: underline;
    background-color: transparent;
    outline: none;
    border: none;
}

.agora-cmp__description {
    margin: 0;
    color: #46535c;
    line-height: 1.5;
}

.agora-cmp__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.agora-cmp__button {
    border: 1px solid var(--agora-cmp-accent);
    border-radius: 6px;
    background: var(--agora-cmp-accent);
    color: #ffffff;
    padding: 10px 14px;
    font-weight: 650;
    cursor: pointer;
}

.agora-cmp__button:hover {
    background: var(--agora-cmp-accent-hover);
}

.agora-cmp__button--secondary {
    border-color: #b9c3c9;
    background: #ffffff;
    color: #172026;
}

.agora-cmp__button--secondary:hover {
    background: #eef3f4;
}

.agora-cmp__purposes {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.agora-cmp__purpose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d8e0e4;
    border-radius: 8px;
    background: #fbfcfc;
}

.agora-cmp__purpose-title {
    margin: 0 0 4px;
    font-weight: 700;
}

.agora-cmp__purpose-description {
    margin: 0;
    color: #52616b;
    line-height: 1.45;
}

.agora-cmp__required {
    color: var(--agora-cmp-accent);
    font-weight: 700;
    white-space: nowrap;
}

.agora-cmp__toggle {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 28px;
}

.agora-cmp__toggle input {
    position: absolute;
    opacity: 0;
}

.agora-cmp__toggle span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #aeb9bf;
    transition: background 160ms ease;
    cursor: pointer;
}

.agora-cmp__toggle span::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(23, 32, 38, 0.26);
    transition: transform 160ms ease;
}

.agora-cmp__toggle input:checked + span {
    background: var(--agora-cmp-accent);
}

.agora-cmp__toggle input:checked + span::before {
    transform: translateX(20px);
}

.agora-cmp__toggle input:focus-visible + span,
.agora-cmp__button:focus-visible,
.agora-cmp__header-link:focus-visible {
    outline: 3px solid var(--agora-cmp-focus);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .agora-cmp {
        padding: 8px;
    }

    .agora-cmp__content {
        padding: 18px;
    }

    .agora-cmp__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .agora-cmp__header-link {
        text-align: left;
    }

    .agora-cmp__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .agora-cmp__button {
        width: 100%;
        text-align: center;
    }

    .agora-cmp__purpose {
        grid-template-columns: 1fr;
    }
}
