.reoffice-cookie-notice,
.reoffice-cookie-modal {
    --reoffice-cookie-blue: #315efb;
    --reoffice-cookie-blue-hover: #244bd4;
    --reoffice-cookie-text: #1f2937;
    --reoffice-cookie-muted: #667085;
    --reoffice-cookie-border: #d9dee8;
    font-family: inherit;
    color: var(--reoffice-cookie-text);
}

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

.reoffice-cookie-notice {
    position: fixed;
    z-index: 99998;
    right: 20px;
    bottom: 20px;
    left: 20px;
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 20px;
    border: 1px solid var(--reoffice-cookie-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.reoffice-cookie-notice__inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.reoffice-cookie-notice__text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.reoffice-cookie-notice a,
.reoffice-cookie-modal a {
    color: var(--reoffice-cookie-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reoffice-cookie-notice__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.reoffice-cookie-button {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid var(--reoffice-cookie-blue);
    border-radius: 7px;
    background: var(--reoffice-cookie-blue);
    color: #fff;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.reoffice-cookie-button:hover,
.reoffice-cookie-button:focus-visible {
    border-color: var(--reoffice-cookie-blue-hover);
    background: var(--reoffice-cookie-blue-hover);
}

.reoffice-cookie-button--secondary {
    background: #fff;
    color: var(--reoffice-cookie-blue);
}

.reoffice-cookie-button--secondary:hover,
.reoffice-cookie-button--secondary:focus-visible {
    background: #eef3ff;
    color: var(--reoffice-cookie-blue-hover);
}

.reoffice-cookie-settings-link {
    display: inline-block;
    margin: 8px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.reoffice-cookie-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
}

.reoffice-cookie-modal__dialog {
    width: min(100%, 580px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
}

.reoffice-cookie-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.reoffice-cookie-modal__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.25;
}

.reoffice-cookie-modal__description {
    margin: 0 0 18px;
    color: var(--reoffice-cookie-muted);
    font-size: 14px;
    line-height: 1.5;
}

.reoffice-cookie-modal__close {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    box-sizing: border-box;
    background: #f2f4f7;
    color: var(--reoffice-cookie-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.reoffice-cookie-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 0;
    border-top: 1px solid var(--reoffice-cookie-border);
}

.reoffice-cookie-category__name {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.reoffice-cookie-category__description {
    margin: 0;
    color: var(--reoffice-cookie-muted);
    font-size: 13px;
    line-height: 1.45;
}

.reoffice-cookie-category__status {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--reoffice-cookie-muted);
    font-size: 13px;
    white-space: nowrap;
}

.reoffice-cookie-modal__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

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

@media (max-width: 680px) {
    .reoffice-cookie-notice {
        right: 10px;
        bottom: 10px;
        left: 10px;
        padding: 16px;
    }

    .reoffice-cookie-notice__inner,
    .reoffice-cookie-notice__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .reoffice-cookie-notice__actions {
        width: 100%;
        gap: 8px;
    }

    .reoffice-cookie-button {
        width: 100%;
    }

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

    .reoffice-cookie-modal__dialog {
        max-height: calc(100vh - 20px);
        padding: 20px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reoffice-cookie-notice,
    .reoffice-cookie-modal {
        scroll-behavior: auto;
    }
}
