:root {
    --popo-cookie-accent: #111111;
    --popo-cookie-button-radius: 6px;
}

.popo-cookie-banner[hidden],
.popo-cookie-modal[hidden],
.popo-cookie-revisit[hidden] {
    display: none !important;
}

.popo-cookie-banner {
    position: fixed;
    z-index: 999999;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    color: #202124;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    font-family: inherit;
}

.popo-cookie-bottom-left,
.popo-cookie-bottom-right {
    max-width: 520px;
    display: block;
}

.popo-cookie-bottom-left {
    right: auto;
}

.popo-cookie-bottom-right {
    left: auto;
}

.popo-cookie-copy {
    flex: 1;
}

.popo-cookie-scroll-indicator {
    display: none;
}

.popo-cookie-copy h2,
.popo-cookie-panel h2 {
    margin: 0 0 8px;
    color: #151515;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.popo-cookie-copy p,
.popo-cookie-modal-body > p,
.popo-cookie-category p {
    margin: 0;
    color: #555b65;
    font-size: 14px;
    line-height: 1.55;
}

.popo-cookie-copy a {
    color: inherit;
    text-decoration: underline;
}

.popo-cookie-modal-body > p a {
    color: inherit;
    text-decoration: underline;
}

.popo-cookie-actions,
.popo-cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.popo-cookie-actions .popo-cookie-button,
.popo-cookie-modal-actions .popo-cookie-button {
    min-width: 132px;
}

.popo-cookie-modal-actions .popo-cookie-button {
    flex: 1 1 0;
}

.popo-cookie-bottom-left .popo-cookie-actions,
.popo-cookie-bottom-right .popo-cookie-actions {
    margin-top: 18px;
    justify-content: stretch;
}

.popo-cookie-button,
.popo-cookie-open-preferences {
    appearance: none;
    border: 1px solid var(--popo-cookie-accent);
    border-radius: var(--popo-cookie-button-radius);
    padding: 11px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.popo-cookie-primary {
    color: #fff;
    background: var(--popo-cookie-accent);
}

.popo-cookie-secondary,
.popo-cookie-open-preferences {
    color: var(--popo-cookie-accent);
    background: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .popo-cookie-primary:hover {
        color: var(--popo-cookie-accent);
        background: #fff;
    }

    .popo-cookie-secondary:hover,
    .popo-cookie-open-preferences:hover {
        color: #fff;
        background: var(--popo-cookie-accent);
    }
}

@media (min-width: 783px) {
    .popo-cookie-bottom {
        display: block;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 12px 12px 0 0;
        box-sizing: border-box;
    }

    .popo-cookie-bottom .popo-cookie-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 22px;
    }

    .popo-cookie-bottom .popo-cookie-button {
        width: 100%;
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="customize"] {
        grid-column: 1;
        grid-row: 1;
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="reject"] {
        grid-column: 2;
        grid-row: 1;
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="accept"] {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (min-width: 1200px) {
    .popo-cookie-bottom .popo-cookie-actions {
        grid-template-columns: minmax(220px, 1fr) minmax(100px, 1.35fr) minmax(220px, 1fr) minmax(220px, 1fr);
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="customize"] {
        grid-column: 1;
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="reject"] {
        grid-column: 3;
    }

    .popo-cookie-bottom .popo-cookie-actions [data-popo-action="accept"] {
        grid-column: 4;
    }
}

.popo-cookie-button:focus-visible,
.popo-cookie-close:focus-visible,
.popo-cookie-revisit:focus-visible,
.popo-cookie-switch input:focus-visible + span {
    outline: 3px solid #4c9ffe;
    outline-offset: 2px;
}

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

.popo-cookie-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.popo-cookie-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.popo-cookie-modal-body {
    min-height: 0;
    overflow-y: auto;
    padding: 28px;
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.popo-cookie-modal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.popo-cookie-modal-scroll-indicator {
    position: fixed;
    z-index: 1000002;
    display: block;
    width: 6px;
    min-height: 36px;
    border-radius: 999px;
    background: rgba(92, 97, 105, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.popo-cookie-modal-scroll-indicator[hidden] {
    display: none;
}

.popo-cookie-panel.popo-cookie-is-scrolling + .popo-cookie-modal-scroll-indicator {
    opacity: 1;
}

.popo-cookie-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 3;
    border: 0;
    padding: 4px 8px;
    color: #333;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.popo-cookie-category-divider {
    margin-top: 24px;
    border-bottom: 1px solid #151515;
}

.popo-cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid #ececec;
}

.popo-cookie-category strong {
    display: block;
    margin-bottom: 4px;
    color: #151515;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.popo-cookie-always-on {
    flex: none;
    color: #238636;
    font-size: 13px;
    font-weight: 600;
}

.popo-cookie-switch {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
}

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

.popo-cookie-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #afb4ba;
    cursor: pointer;
    transition: background 0.2s ease;
}

.popo-cookie-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

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

.popo-cookie-switch input:checked + span::after {
    transform: translateX(20px);
}

.popo-cookie-modal-actions {
    flex: none;
    margin: 0;
    padding: 18px 28px;
    border-top: 1px solid #ececec;
    background: #fff;
}

.popo-cookie-revisit {
    position: fixed;
    z-index: 999998;
    left: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--popo-cookie-accent);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
    font-size: 22px;
    cursor: pointer;
}

.popo-cookie-modal-open {
    overflow: hidden;
}

@media (max-width: 782px) {
	.popo-cookie-modal {
		place-items: end center;
		padding: 0;
	}

    .popo-cookie-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: min(60vh, 560px);
        padding: 18px 18px max(18px, env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 14px 14px 0 0;
        overflow: hidden;
    }

    .popo-cookie-copy {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        margin-right: -18px;
        padding-right: 18px;
        scrollbar-width: none;
    }

    .popo-cookie-copy::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .popo-cookie-scroll-indicator {
        position: absolute;
        z-index: 2;
        right: 4px;
        display: block;
        width: 6px;
        min-height: 36px;
        border-radius: 999px;
        background: rgba(92, 97, 105, 0.72);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .popo-cookie-scroll-indicator[hidden] {
        display: none;
    }

    .popo-cookie-copy.popo-cookie-is-scrolling + .popo-cookie-scroll-indicator {
        opacity: 1;
    }

    .popo-cookie-actions {
        flex: none;
        position: relative;
        margin-top: 16px;
        display: grid;
        grid-template-columns: 1fr;
    }

    .popo-cookie-copy.popo-cookie-has-overflow:not(.popo-cookie-at-scroll-end) ~ .popo-cookie-actions::before {
        content: "";
        position: absolute;
        z-index: 1;
        right: 0;
        bottom: 100%;
        left: 0;
        height: 72px;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 88%);
        pointer-events: none;
    }

    .popo-cookie-actions .popo-cookie-button {
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .popo-cookie-panel {
		width: 100%;
        height: 75vh;
        max-height: 75vh;
		border-radius: 14px 14px 0 0;
    }

    .popo-cookie-modal-body {
		padding: 24px 18px;
    }

    .popo-cookie-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 16px 18px max(16px, env(safe-area-inset-bottom));
    }

    @supports (height: 100dvh) {
        .popo-cookie-panel {
            height: 75dvh;
            max-height: 75dvh;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .popo-cookie-button,
    .popo-cookie-open-preferences,
    .popo-cookie-scroll-indicator,
    .popo-cookie-modal-scroll-indicator,
    .popo-cookie-switch span,
    .popo-cookie-switch span::after {
        transition: none;
    }
}

