.ac-root,
.ac-root * {
    box-sizing: border-box;
}

.ac-root {
    --ac-accent: #e30613;
    --ac-text: #22252a;
    --ac-muted: #666b73;
    --ac-border: #e4e6ea;
    --ac-bg: #ffffff;
    --ac-shadow: 0 12px 42px rgba(24, 32, 47, 0.18);
    position: relative;
    z-index: 2147483000;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ac-text);
}

.ac-root [hidden] {
    display: none !important;
}

.ac-banner {
    position: fixed;
    z-index: 2147483000;
    background: var(--ac-bg);
    border: 1px solid var(--ac-border);
    box-shadow: var(--ac-shadow);
}

.ac-bottom_full .ac-banner {
    left: 24px;
    right: 24px;
    bottom: 18px;
    border-radius: 18px;
}

.ac-bottom_center .ac-banner {
    left: 50%;
    bottom: 18px;
    width: min(980px, calc(100vw - 32px));
    transform: translateX(-50%);
    border-radius: 18px;
}

.ac-bottom_left .ac-banner,
.ac-bottom_right .ac-banner {
    bottom: 18px;
    width: min(560px, calc(100vw - 32px));
    border-radius: 18px;
}

.ac-bottom_left .ac-banner {
    left: 18px;
}

.ac-bottom_right .ac-banner {
    right: 18px;
}

.ac-banner__content {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 22px 24px;
}

.ac-banner__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.ac-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}

.ac-text,
.ac-modal__intro,
.ac-category__text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ac-muted);
}

.ac-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ac-link:hover,
.ac-link:focus-visible {
    color: var(--ac-accent);
}

.ac-banner__actions,
.ac-modal__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ac-banner__actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.ac-button,
.ac-close,
.ac-reopen {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.ac-button {
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ac-button:hover {
    transform: translateY(-1px);
}

.ac-button:focus-visible,
.ac-close:focus-visible,
.ac-reopen:focus-visible,
.ac-switch input:focus-visible + .ac-switch__track {
    outline: 3px solid color-mix(in srgb, var(--ac-accent) 30%, transparent);
    outline-offset: 2px;
}

.ac-button--primary {
    background: var(--ac-accent);
    color: #ffffff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--ac-accent) 26%, transparent);
}

.ac-button--secondary {
    background: #f0f1f3;
    color: var(--ac-text);
}

.ac-button--link {
    min-height: 36px;
    padding: 8px 4px;
    border-radius: 4px;
    background: transparent;
    color: var(--ac-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ac-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: grid;
    place-items: center;
    padding: 20px;
}

.ac-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19, 24, 32, 0.58);
}

.ac-modal__panel {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 18px;
    background: var(--ac-bg);
    box-shadow: var(--ac-shadow);
}

.ac-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ac-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #f0f1f3;
    color: var(--ac-text);
    font-size: 26px;
    line-height: 1;
}

.ac-modal__intro {
    margin-bottom: 18px;
}

.ac-categories {
    border-top: 1px solid var(--ac-border);
}

.ac-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--ac-border);
}

.ac-category__copy {
    min-width: 0;
}

.ac-category__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 700;
}

.ac-required {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef0f3;
    color: var(--ac-muted);
    font-size: 11px;
    font-weight: 700;
}

.ac-switch {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

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

.ac-switch__track {
    display: inline-flex;
    width: 48px;
    height: 28px;
    padding: 3px;
    border-radius: 999px;
    background: #c9cdd3;
    transition: background-color 0.18s ease;
}

.ac-switch__thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(20, 26, 36, 0.24);
    transition: transform 0.18s ease;
}

.ac-switch input:checked + .ac-switch__track {
    background: var(--ac-accent);
}

.ac-switch input:checked + .ac-switch__track .ac-switch__thumb {
    transform: translateX(20px);
}

.ac-switch input:disabled + .ac-switch__track {
    opacity: 0.72;
    cursor: not-allowed;
}

.ac-modal__actions {
    margin-top: 20px;
}

.ac-reopen {
    position: fixed;
    z-index: 2147482999;
    bottom: 14px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--ac-border);
    border-radius: 999px;
    background: var(--ac-bg);
    color: var(--ac-text);
    box-shadow: 0 6px 24px rgba(24, 32, 47, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.ac-reopen-left .ac-reopen {
    left: 14px;
}

.ac-reopen-right .ac-reopen {
    right: 14px;
}

.ac-modal-open {
    overflow: hidden;
}

.ac-visually-hidden {
    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;
}

iframe[data-ac-src] {
    min-height: 160px;
    background: #f2f3f5;
}

@media (max-width: 860px) {
    .ac-bottom_full .ac-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .ac-banner__content {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .ac-banner__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .ac-button {
        width: 100%;
    }

    .ac-button--link {
        width: auto;
    }

    .ac-modal {
        padding: 10px;
        align-items: end;
    }

    .ac-modal__panel {
        max-height: calc(100vh - 20px);
        padding: 18px;
        border-radius: 16px 16px 0 0;
    }

    .ac-category {
        align-items: flex-start;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ac-root *,
    .ac-root *::before,
    .ac-root *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
