:root {
    --yb-cookie-ink: #173b3f;
    --yb-cookie-ink-deep: #102d30;
    --yb-cookie-mint: #dff3e9;
    --yb-cookie-cream: #fffaf0;
    --yb-cookie-coral: #ef765f;
    --yb-cookie-border: #d9e4df;
    --yb-cookie-shadow: 0 24px 70px rgba(10, 35, 38, .28);
}

.yb-cookie-banner,
.yb-cookie-modal {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--yb-cookie-ink);
}

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

.yb-cookie-banner {
    position: fixed;
    z-index: 2147483000;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1120px, calc(100% - 36px));
    margin-inline: auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    background: var(--yb-cookie-ink-deep);
    color: #fff;
    box-shadow: var(--yb-cookie-shadow);
}

.yb-cookie-copy {
    max-width: 650px;
}

.yb-cookie-copy strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 16px;
    line-height: 1.25;
}

.yb-cookie-copy p {
    margin: 0;
    color: #d7e7e4;
    font-size: 13px;
    line-height: 1.6;
}

.yb-cookie-copy a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.yb-cookie-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(135px, 1fr));
    gap: 8px;
    min-width: 340px;
}

.yb-cookie-button {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
}

.yb-cookie-button:hover,
.yb-cookie-button:focus-visible {
    border-color: #fff;
    outline: 3px solid rgba(255, 255, 255, .22);
    outline-offset: 2px;
}

.yb-cookie-button--accept {
    border-color: var(--yb-cookie-coral);
    background: var(--yb-cookie-coral);
}

.yb-cookie-button--reject {
    border-color: #fff;
    background: #fff;
    color: var(--yb-cookie-ink-deep);
}

.yb-cookie-button--manage {
    grid-column: 1 / -1;
    min-height: 36px;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.yb-cookie-modal {
    position: fixed;
    z-index: 2147483001;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 25, 27, .72);
    backdrop-filter: blur(4px);
}

.yb-cookie-dialog {
    width: min(640px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow-y: auto;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--yb-cookie-shadow);
}

.yb-cookie-dialog h2 {
    margin: 0 0 9px;
    color: var(--yb-cookie-ink-deep);
    font-size: clamp(24px, 5vw, 34px);
    line-height: 1.12;
}

.yb-cookie-dialog > p {
    margin: 0 0 20px;
    color: #536b69;
    font-size: 14px;
    line-height: 1.65;
}

.yb-cookie-category {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--yb-cookie-border);
}

.yb-cookie-category h3 {
    margin: 0 0 5px;
    color: var(--yb-cookie-ink);
    font-size: 15px;
}

.yb-cookie-category p {
    margin: 0;
    color: #607472;
    font-size: 12px;
    line-height: 1.55;
}

.yb-cookie-required {
    padding-top: 3px;
    color: #497065;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.yb-cookie-switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 28px;
    flex: 0 0 auto;
}

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

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

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

.yb-cookie-switch input:checked + span {
    background: #287866;
}

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

.yb-cookie-switch input:focus-visible + span {
    outline: 3px solid rgba(40, 120, 102, .25);
    outline-offset: 3px;
}

.yb-cookie-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 20px;
    border-top: 1px solid var(--yb-cookie-border);
}

.yb-cookie-dialog-actions .yb-cookie-button {
    min-width: 150px;
    border-color: var(--yb-cookie-ink);
    color: var(--yb-cookie-ink);
}

.yb-cookie-dialog-actions .yb-cookie-button--accept {
    border-color: var(--yb-cookie-coral);
    color: #fff;
}

.yb-cookie-dialog-links {
    margin-top: 18px;
    color: #607472;
    font-size: 12px;
    line-height: 1.6;
}

.yb-cookie-dialog-links a {
    color: var(--yb-cookie-ink);
    text-underline-offset: 2px;
}

.yb-cookie-settings-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

body.yb-cookie-modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .yb-cookie-banner {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 18px;
        border-radius: 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .yb-cookie-actions {
        width: 100%;
        min-width: 0;
    }

    .yb-cookie-dialog {
        padding: 22px 18px;
        border-radius: 20px;
    }

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

    .yb-cookie-dialog-actions .yb-cookie-button {
        width: 100%;
    }
}

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