:root {
    --bobe-cookie-purple: #915ff0;
    --bobe-cookie-ink: #30283f;
    --bobe-cookie-muted: #756b82;
    --bobe-cookie-line: #e7e0f0;
}

#bobe-cookie-banner,
#bobe-cookie-modal {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#bobe-cookie-banner {
    position: fixed;
    z-index: 100000;
    right: 22px;
    bottom: 22px;
    width: min(520px, calc(100% - 44px));
    padding: 22px;
    border: 1px solid var(--bobe-cookie-line);
    border-radius: 20px;
    color: var(--bobe-cookie-ink);
    background: #fff;
    box-shadow: 0 22px 70px rgba(48, 40, 63, .22);
}

#bobe-cookie-banner[hidden],
#bobe-cookie-modal[hidden] {
    display: none !important;
}

.bobe-cookie-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
}

.bobe-cookie-text {
    margin: 0;
    color: var(--bobe-cookie-muted);
    font-size: 14px;
    line-height: 1.55;
}

.bobe-cookie-text a {
    color: var(--bobe-cookie-purple);
    font-weight: 700;
}

.bobe-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.bobe-cookie-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid var(--bobe-cookie-line);
    border-radius: 11px;
    color: var(--bobe-cookie-ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.bobe-cookie-button.primary {
    border-color: var(--bobe-cookie-purple);
    color: #fff;
    background: var(--bobe-cookie-purple);
}

.bobe-cookie-button:hover,
.bobe-cookie-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(71, 44, 109, .13);
}

#bobe-cookie-modal {
    position: fixed;
    z-index: 100001;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(27, 21, 36, .58);
    backdrop-filter: blur(5px);
}

.bobe-cookie-dialog {
    width: min(600px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    padding: 25px;
    border-radius: 22px;
    color: var(--bobe-cookie-ink);
    background: #fff;
    box-shadow: 0 28px 90px rgba(20, 12, 31, .32);
}

.bobe-cookie-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.bobe-cookie-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    color: var(--bobe-cookie-ink);
    background: #f4f0fa;
    font-size: 22px;
    cursor: pointer;
}

.bobe-cookie-category {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    border-top: 1px solid var(--bobe-cookie-line);
}

.bobe-cookie-category h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

.bobe-cookie-category p {
    margin: 0;
    color: var(--bobe-cookie-muted);
    font-size: 13px;
    line-height: 1.5;
}

.bobe-cookie-state {
    flex: 0 0 auto;
    color: #16794b;
    font-size: 12px;
    font-weight: 800;
}

.bobe-cookie-switch {
    position: relative;
    width: 48px;
    height: 27px;
    flex: 0 0 auto;
}

.bobe-cookie-switch input {
    position: absolute;
    opacity: 0;
}

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

.bobe-cookie-switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .18);
    transition: .2s ease;
}

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

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

@media (max-width: 600px) {
    #bobe-cookie-banner {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 18px;
    }

    .bobe-cookie-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .bobe-cookie-button.primary {
        grid-column: 1 / -1;
        order: -1;
    }

    .bobe-cookie-category {
        gap: 12px;
    }
}
