html.relaxe-cookie-overlay-open,
html.relaxe-cookie-modal-open {
    overflow: hidden;
}

.relaxe-cookie-page-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147482998;
    background: rgba(35, 35, 35, .42);
    opacity: 0;
    pointer-events: none;
}

html.relaxe-cookie-overlay-open .relaxe-cookie-page-overlay {
    opacity: 1;
    pointer-events: auto;
}

.relaxe-cookie-banner,
.relaxe-cookie-modal {
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.relaxe-cookie-banner *,
.relaxe-cookie-modal * {
    box-sizing: border-box;
}

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

/* Intro — desktop size matched to relaxe.md source */
.relaxe-cookie-banner {
    position: fixed;
    z-index: 2147483000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    color: #303030;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.relaxe-cookie-banner__inner {
    padding: 30px;
}

.relaxe-cookie-banner__copy strong {
    display: block;
    margin: 0 44px 12px 0;
    color: #111;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
}

.relaxe-cookie-banner__copy p {
    margin: 0 0 22px;
    color: #666;
    font-size: 15px;
    line-height: 1.55;
}

.relaxe-cookie-banner a,
.relaxe-cookie-modal a {
    color: #4aa357;
    text-decoration: underline;
}

.relaxe-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.relaxe-cookie-btn {
    flex: 1 1 150px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #5cb569;
    border-radius: 10px;
    background: #fff;
    color: #43894e;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
}

.relaxe-cookie-btn--primary {
    border-color: #5cb569;
    background: #5cb569;
    color: #fff;
}

.relaxe-cookie-btn--outline {
    border-color: #5cb569;
    background: #fff;
    color: #43894e;
}

/* Preferences — desktop size matched to relaxe.md source */
.relaxe-cookie-modal {
    position: fixed;
    z-index: 2147483001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.relaxe-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.relaxe-cookie-modal__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    color: #303030;
}

.relaxe-cookie-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    color: #555;
    font-size: 28px;
    line-height: 34px;
    cursor: pointer;
}

.relaxe-cookie-modal__header {
    padding: 0;
    border: 0;
}

.relaxe-cookie-modal__header strong {
    display: block;
    margin: 0 44px 12px 0;
    color: #303030;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.relaxe-cookie-modal__header p {
    margin: 0 0 22px;
    color: #666;
    font-size: 15px;
    line-height: 1.55;
}

.relaxe-cookie-category {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 0;
    border-top: 1px solid #e8e8e8;
    border-bottom: 0;
}

.relaxe-cookie-category__copy {
    min-width: 0;
    padding: 0;
}

.relaxe-cookie-category strong {
    display: block;
    margin: 0;
    color: #303030;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.relaxe-cookie-category p {
    margin: 4px 0 0;
    color: #707070;
    font-size: 14px;
    line-height: 1.4;
}

.relaxe-cookie-switch {
    position: relative;
    flex: 0 0 52px;
    width: 52px;
    height: 30px;
    margin-top: 2px;
}

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

.relaxe-cookie-switch span {
    display: block;
    position: relative;
    width: 52px;
    height: 30px;
    border-radius: 30px;
    background: #d7d7d7;
    transition: background .18s ease;
    cursor: pointer;
}

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

.relaxe-cookie-switch input:checked + span {
    background: #5cb569;
}

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

.relaxe-cookie-switch input:disabled + span {
    opacity: .75;
    cursor: default;
}

.relaxe-cookie-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 0;
}

.relaxe-cookie-modal__footer .relaxe-cookie-btn {
    flex: 1 1 150px;
    min-height: 46px;
}

/* Footer settings link */
.relaxe-cookie-footer-settings {
    margin: 0;
}

.relaxe-cookie-footer-settings a {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* Mobile behavior from the source: bottom card, compact typography */
@media (max-width: 575px) {
    .relaxe-cookie-banner {
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 10px;
        transform: none;
        width: auto;
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .relaxe-cookie-banner__inner {
        padding: 18px 14px calc(14px + env(safe-area-inset-bottom));
    }

    .relaxe-cookie-banner__copy strong {
        margin: 0 0 8px;
        font-size: 18px;
    }

    .relaxe-cookie-banner__copy p {
        margin-bottom: 14px;
        font-size: 13px;
        line-height: 1.4;
    }

    .relaxe-cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .relaxe-cookie-banner__actions .relaxe-cookie-btn--accept {
        grid-column: 1 / -1;
    }

    .relaxe-cookie-btn {
        width: 100%;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .relaxe-cookie-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .relaxe-cookie-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 18px 14px calc(14px + env(safe-area-inset-bottom));
        border-radius: 16px;
    }

    .relaxe-cookie-modal__header strong {
        margin-bottom: 8px;
        font-size: 18px;
    }

    .relaxe-cookie-modal__header p {
        margin-bottom: 14px;
        font-size: 13px;
        line-height: 1.4;
    }

    .relaxe-cookie-modal__close {
        top: 12px;
        right: 12px;
    }

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

    .relaxe-cookie-category strong,
    .relaxe-cookie-category p {
        font-size: 13px;
    }

    .relaxe-cookie-modal__footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .relaxe-cookie-modal__footer .relaxe-cookie-btn:first-child {
        grid-column: 1 / -1;
    }
}
