:root {
    --acc-bg: #ffffff;
    --acc-text: #1f2937;
    --acc-muted: #4b5563;
    --acc-border: #d1d5db;
    --acc-accent: #111827;
    --acc-accent-text: #ffffff;
    --acc-radius: 12px;
    --acc-shadow: 0 18px 55px rgba(15, 23, 42, .2);
    --acc-title-size: 18px;
    --acc-text-size: 16px;
    --acc-mobile-title-size: 12px;
    --acc-mobile-text-size: 11px;
}

.acc-consent[hidden] {
    display: none !important;
}

.acc-consent {
    color: var(--acc-text);
    font: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    z-index: 2147483000;
}

.acc-consent *,
.acc-consent *::before,
.acc-consent *::after {
    box-sizing: border-box;
}

.acc-consent--popup {
    position: fixed;
    inset: 0;
    display: flex;
    padding: 18px;
    pointer-events: none;
}

.acc-consent--popup.is-active {
    pointer-events: none;
}

.acc-consent--popup.acc-position--bottom {
    align-items: flex-end;
    justify-content: center;
}

.acc-consent--popup.acc-position--center {
    align-items: center;
    justify-content: center;
}

.acc-consent--popup.acc-position--bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.acc-consent--popup.acc-position--bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

.acc-consent__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    background: var(--acc-bg);
    box-shadow: var(--acc-shadow);
    outline: none;
    pointer-events: auto;
}

.acc-consent--popup.acc-position--bottom .acc-consent__panel {
    width: min(1120px, 100%);
}

.acc-consent--inline {
    position: relative;
    width: 100%;
    margin: 18px 0;
}

.acc-consent--inline .acc-consent__panel {
    width: 100%;
    max-height: none;
    box-shadow: none;
}

.acc-consent__title {
    margin: 0 42px 10px 0;
    color: var(--acc-text);
    font: inherit;
    font-size: var(--acc-title-size, 18px);
    font-weight: 700;
    line-height: 1.35;
}

.acc-consent__text,
.acc-consent__text p,
.acc-consent__category p {
    margin: 0;
    color: var(--acc-muted);
    font: inherit;
    font-size: var(--acc-text-size, 16px);
    line-height: 1.55;
}

.acc-consent__text p + p {
    margin-top: 8px;
}

.acc-consent__text a {
    color: inherit;
    font: inherit;
    font-size: 1em;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.acc-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.acc-actions-position--right .acc-consent__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
    gap: 22px;
    align-items: center;
}

.acc-actions-position--right .acc-consent__summary .acc-consent__actions {
    flex-direction: column;
    flex-wrap: nowrap;
    margin-top: 0;
}

.acc-actions-position--right .acc-consent__summary .acc-consent__button {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
}

.acc-consent__button {
    appearance: none;
    min-height: 30px;
    min-width: 145px;
    flex: 1 1 145px;
    margin: 0;
    padding: 4px 18px;
    border: 2px solid var(--acc-accent);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.acc-consent__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .14);
}

.acc-consent__button:focus-visible,
.acc-settings-link:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.acc-consent__button--primary {
    background: var(--acc-accent);
    color: var(--acc-accent-text);
}

/* «Принять» и «Отклонить» используют один и тот же класс и визуальный вес. */
.acc-consent__button--secondary {
    background: var(--acc-bg);
    color: var(--acc-accent);
}

.acc-consent__category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid var(--acc-border);
}

.acc-consent__category:first-of-type {
    margin-top: 8px;
}

.acc-consent__category strong {
    display: block;
    margin-bottom: 3px;
    font-size: 1em;
}

.acc-switch {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 28px;
    flex: 0 0 50px;
}

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

.acc-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #9ca3af;
    cursor: pointer;
    transition: background .15s ease;
}

.acc-switch span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}

.acc-switch input:checked + span {
    background: var(--acc-accent);
}

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

.acc-switch input:focus-visible + span {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.acc-switch input:disabled + span {
    cursor: not-allowed;
    opacity: .72;
}

.acc-footer-link-wrap {
    width: 100%;
    margin: 10px 0;
    text-align: center;
}

.acc-settings-link {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 1em;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 760px) {
    .acc-actions-position--right .acc-consent__summary {
        display: block;
    }

    .acc-actions-position--right .acc-consent__summary .acc-consent__actions {
        margin-top: 10px;
    }
}

@media (max-width: 640px) {
    .acc-consent--popup {
        padding: 10px;
    }

    .acc-consent__panel {
        max-height: calc(100vh - 20px);
        padding: 9px;
        border-radius: 10px;
    }

    .acc-consent__title {
        font-size: var(--acc-mobile-title-size, 12px);
    }

    .acc-consent__text,
    .acc-consent__text p,
    .acc-consent__category p {
        font-size: var(--acc-mobile-text-size, 11px);
    }

    .acc-consent__actions {
        display: grid;
        grid-auto-flow: column;
        justify-content: center;
    }

    .acc-consent__button {
        width: auto;
        min-width: 0;
        min-height: 26px;
        padding: 0;
        font-size: var(--acc-mobile-text-size, 11px);
    }

    .acc-actions-position--right .acc-consent__summary .acc-consent__button {
        width: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acc-consent__button,
    .acc-switch span,
    .acc-switch span::after {
        transition: none;
    }
}

/* Respect mobile safe areas and prevent scroll chaining inside the banner. */
.acc-consent--popup {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
}

.acc-consent__panel {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (forced-colors: active) {
    .acc-consent__button,
    .acc-switch span {
        border: 2px solid ButtonText;
    }
}

.acc-form-consents,
.acc-cf7-consents {
    display: grid;
    gap: 0.65rem;
}

.acc-form-consents__item,
.acc-cf7-consents .acc-cf7-acceptance {
    display: block;
}

.acc-cf7-consents .wpcf7-list-item {
    margin: 0;
}

.acc-form-consents label,
.acc-cf7-consents label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    cursor: pointer;
}

.acc-form-consents input[type="checkbox"],
.acc-cf7-consents input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.2em;
}

.acc-form-consents--invalid,
.acc-cf7-consents--invalid {
    outline: 1px solid #d63638;
    outline-offset: 0.35rem;
}

.acc-form-consents a,
.acc-cf7-consents a {
    text-decoration: underline;
}

