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

.yess-consent {
    --yess-radius: 16px;
    --yess-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    --yess-soft-border: rgba(17, 24, 39, 0.1);
    color: var(--yess-text);
    font-family: inherit;
    position: relative;
    z-index: 2147483000;
}

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

.yess-consent__banner {
    align-items: center;
    background: var(--yess-banner-bg);
    border: 1px solid var(--yess-soft-border);
    border-radius: var(--yess-radius);
    bottom: 22px;
    box-shadow: var(--yess-shadow);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    left: 50%;
    max-width: min(1120px, calc(100vw - 32px));
    padding: 20px;
    position: fixed;
    transform: translateX(-50%);
    width: 100%;
    animation: yessConsentFade 280ms ease forwards;
}

.yess-consent[data-position="bottom-left"] .yess-consent__banner,
.yess-consent[data-position="bottom-right"] .yess-consent__banner {
    max-width: min(520px, calc(100vw - 32px));
}

.yess-consent[data-position="bottom-left"] .yess-consent__banner {
    left: 22px;
    transform: none;
}

.yess-consent[data-position="bottom-right"] .yess-consent__banner {
    left: auto;
    right: 22px;
    transform: none;
}

.yess-consent[data-position="center-modal"].is-banner-visible .yess-consent__backdrop,
.yess-consent.is-settings-visible .yess-consent__backdrop {
    animation: yessConsentFade 220ms ease forwards;
    background: rgba(17, 24, 39, 0.42);
    inset: 0;
    position: fixed;
}

.yess-consent[data-position="center-modal"] .yess-consent__banner {
    bottom: auto;
    left: 50%;
    max-width: min(660px, calc(100vw - 32px));
    top: 50%;
    transform: translate(-50%, -50%);
}

.yess-consent__content {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.yess-consent__mark {
    align-items: center;
    background: color-mix(in srgb, var(--yess-primary) 12%, transparent);
    border-radius: 14px;
    color: var(--yess-primary);
    display: flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.yess-consent__mark svg,
.yess-consent__floating svg {
    fill: currentColor;
    height: 24px;
    width: 24px;
}

.yess-consent__copy h2,
.yess-consent__modal h2,
.yess-consent__category h3 {
    color: var(--yess-text);
    letter-spacing: 0;
    margin: 0;
}

.yess-consent__copy h2 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.yess-consent__copy p {
    color: color-mix(in srgb, var(--yess-text) 78%, transparent);
    font-size: 14px;
    line-height: 1.55;
    margin: 6px 0 0;
}

.yess-consent__copy a {
    color: var(--yess-primary);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.yess-consent__actions,
.yess-consent__modal-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.yess-consent__button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.1;
    min-height: 44px;
    padding: 12px 18px;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, background-color 180ms ease;
    white-space: nowrap;
}

.yess-consent__button:hover,
.yess-consent__button:focus-visible {
    transform: translateY(-1px);
}

.yess-consent__button--accept {
    background: var(--yess-accept);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--yess-accept) 24%, transparent);
    color: #fff;
}

.yess-consent__button--necessary {
    background: var(--yess-necessary);
    border-color: color-mix(in srgb, var(--yess-text) 10%, transparent);
    color: var(--yess-text);
}

.yess-consent__button--ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--yess-primary) 28%, transparent);
    color: var(--yess-primary);
}

.yess-consent__modal {
    background: var(--yess-banner-bg);
    border: 1px solid var(--yess-soft-border);
    border-radius: var(--yess-radius);
    box-shadow: var(--yess-shadow);
    left: 50%;
    max-height: min(720px, calc(100vh - 32px));
    max-width: min(720px, calc(100vw - 32px));
    overflow: auto;
    padding: 24px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, calc(-50% + 16px));
    width: 100%;
    animation: yessConsentModal 220ms ease forwards;
}

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

.yess-consent__eyebrow {
    color: var(--yess-primary);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.yess-consent__modal h2 {
    font-size: 24px;
    line-height: 1.2;
}

.yess-consent__icon-button {
    align-items: center;
    background: color-mix(in srgb, var(--yess-text) 6%, transparent);
    border: 0;
    border-radius: 999px;
    color: var(--yess-text);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 24px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    transition: transform 180ms ease, background-color 180ms ease;
    width: 38px;
}

.yess-consent__icon-button:hover,
.yess-consent__icon-button:focus-visible {
    background: color-mix(in srgb, var(--yess-text) 10%, transparent);
    transform: rotate(3deg) scale(1.04);
}

.yess-consent__categories {
    display: grid;
    gap: 12px;
}

.yess-consent__category {
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--yess-text) 10%, transparent);
    border-radius: 16px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 16px;
}

.yess-consent__category h3 {
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
}

.yess-consent__category p {
    color: color-mix(in srgb, var(--yess-text) 72%, transparent);
    font-size: 13px;
    line-height: 1.45;
    margin: 5px 0 0;
}

.yess-consent__switch {
    display: inline-flex;
    flex: 0 0 auto;
}

.yess-consent__switch input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.yess-consent__switch span {
    background: color-mix(in srgb, var(--yess-text) 18%, transparent);
    border-radius: 999px;
    cursor: pointer;
    display: inline-block;
    height: 30px;
    position: relative;
    transition: background-color 180ms ease;
    width: 54px;
}

.yess-consent__switch span::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
    content: "";
    height: 24px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform 180ms ease;
    width: 24px;
}

.yess-consent__switch input:checked + span {
    background: var(--yess-primary);
}

.yess-consent__switch input:checked + span::after {
    transform: translateX(24px);
}

.yess-consent__switch input:disabled + span {
    cursor: not-allowed;
    opacity: 0.82;
}

.yess-consent__modal-actions {
    margin-top: 18px;
}

.yess-consent__floating {
    align-items: center;
    background: var(--yess-floating);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    bottom: 22px;
    box-shadow: 0 14px 32px color-mix(in srgb, var(--yess-floating) 32%, transparent);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: var(--yess-floating-size-desktop, 56px);
    justify-content: center;
    opacity: 0.82;
    padding: 0;
    position: fixed;
    right: 22px;
    transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    width: var(--yess-floating-size-desktop, 56px);
}

.yess-consent__floating svg {
    height: calc(var(--yess-floating-size-desktop, 56px) * 0.46);
    width: calc(var(--yess-floating-size-desktop, 56px) * 0.46);
}

.yess-consent[data-floating-position="bottom-left"] .yess-consent__floating {
    left: 22px;
    right: auto;
}

.yess-consent[data-floating-position="bottom-right"] .yess-consent__floating {
    left: auto;
    right: 22px;
}

.yess-consent__floating:hover,
.yess-consent__floating:focus-visible {
    box-shadow: 0 18px 42px color-mix(in srgb, var(--yess-floating) 40%, transparent);
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
}

@keyframes yessConsentFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes yessConsentModal {
    to {
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 780px) {
    .yess-consent__banner {
        align-items: stretch;
        bottom: 14px;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .yess-consent[data-position="bottom-left"] .yess-consent__banner,
    .yess-consent[data-position="bottom-right"] .yess-consent__banner {
        left: 14px;
        max-width: calc(100vw - 28px);
        right: auto;
    }

    .yess-consent__actions,
    .yess-consent__modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .yess-consent__button {
        min-width: 0;
        white-space: normal;
        width: 100%;
    }

    .yess-consent__modal {
        max-height: calc(100vh - 28px);
        padding: 20px;
    }

    .yess-consent__category {
        align-items: flex-start;
    }

    .yess-consent__floating {
        box-shadow: 0 8px 18px color-mix(in srgb, var(--yess-floating) 20%, transparent);
        bottom: 16px;
        height: var(--yess-floating-size-mobile, 52px);
        right: 16px;
        width: var(--yess-floating-size-mobile, 52px);
    }

    .yess-consent__floating:hover,
    .yess-consent__floating:focus-visible {
        box-shadow: 0 10px 22px color-mix(in srgb, var(--yess-floating) 24%, transparent);
    }

    .yess-consent[data-floating-mobile-visible="no"] .yess-consent__floating {
        display: none !important;
    }

    .yess-consent__floating svg {
        height: calc(var(--yess-floating-size-mobile, 52px) * 0.46);
        width: calc(var(--yess-floating-size-mobile, 52px) * 0.46);
    }

    .yess-consent[data-floating-position-mobile="bottom-left"] .yess-consent__floating {
        left: 16px;
        right: auto;
    }

    .yess-consent[data-floating-position-mobile="bottom-right"] .yess-consent__floating {
        left: auto;
        right: 16px;
    }
}
