.cgr-notes {
    --cgr-note-accent: #168b83;
    --cgr-note-tint: #e7f4f2;
    margin-top: 24px;
    padding: 24px 18px 10px;
    border-top: 1px solid #e5e7e7;
    color: #303a3b;
    text-align: start;
}
.cgr-notes [hidden] { display: none !important; }
.cgr-notes-form { margin: 0; }
.cgr-notes-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.cgr-notes-heading h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}
.cgr-notes .cgr-notes-close { display: none !important; }
.cgr-notes-hint {
    margin: 0 0 16px;
    color: #687374;
    font-size: 13px;
    line-height: 1.6;
}
.cgr-notes-search { display: block; margin: 0 0 14px; }
.cgr-notes-search input[type=search] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #bdc8c7;
    border-radius: 6px;
    background: #fff;
    color: #303a3b;
    font: inherit;
    font-size: 14px;
}
.cgr-notes-search input:focus-visible,
.cgr-notes button:focus-visible,
.cgr-notes a:focus-visible,
.cgr-notes input[type=checkbox]:focus-visible,
.cgr-notes-trigger:focus-visible {
    outline: 2px solid var(--cgr-note-accent, #168b83);
    outline-offset: 3px;
}
.cgr-notes-options {
    min-width: 0;
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    margin: 0;
    padding: 0 3px 0 0;
    border: 0;
}
.cgr-notes-option {
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 0;
    padding: 7px 4px;
    border-radius: 5px;
    color: #303a3b;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}
.cgr-notes-option:hover { background: #f4f7f6; }
.cgr-notes-option input[type=checkbox] {
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--cgr-note-accent);
    cursor: inherit;
}
.cgr-notes-option.is-selected {
    background: var(--cgr-note-tint);
    color: #175b56;
    font-weight: 600;
}
.cgr-notes-option.is-unavailable { color: #899190; cursor: default; }
.cgr-notes-count {
    color: #687374;
    font-size: 13px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}
.cgr-notes-pending { display: flex; flex-wrap: wrap; gap: 6px; }
.cgr-notes-pending:not(:empty) { margin: 0 0 14px; }
.cgr-notes .cgr-notes-pending-chip {
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-radius: 5px;
    background: var(--cgr-note-tint);
    box-shadow: none;
    color: #175b56;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
}
.cgr-notes .cgr-notes-more,
.cgr-notes .cgr-notes-clear {
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--cgr-note-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
}
.cgr-notes .cgr-notes-more { display: block; margin-top: 6px; }
.cgr-notes-empty { margin: 12px 0; color: #687374; font-size: 14px; }
.cgr-notes-footer { padding-top: 16px; text-align: center; }
.cgr-notes .cgr-notes-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 6px;
    background: var(--cgr-note-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.cgr-notes .cgr-notes-apply:hover { background: #11776f; color: #fff; }
.cgr-notes .cgr-notes-clear { color: #596463; text-decoration: underline; }
.cgr-notes-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cgr-notes-active .cgr-sb-chip {
    margin: 0;
    border-color: #c1ded9;
    background: #e7f4f2;
    color: #175b56;
}
.cgr-notes-clear-link { padding: 8px 4px; color: #596463; font-size: 13px; text-decoration: underline; }
.cgr-notes-mobile-toolbar { display: none; }
.cgr-notes-results-anchor { scroll-margin-top: 130px; }
.cgr-notes-dialog:not([open]) { display: none; }
.cgr-notes-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: auto 0 0;
    width: min(100%, 540px);
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto auto 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    color: #303a3b;
    box-shadow: 0 -8px 36px rgb(0 0 0 / 12%);
}
.cgr-notes-dialog::backdrop { background: rgb(18 30 31 / 42%); }
html.cgr-notes-modal-open,
body.cgr-notes-modal-open { overflow: hidden !important; overscroll-behavior: none; }
.cgr-notes-dialog .cgr-notes {
    box-sizing: border-box;
    max-height: 90vh;
    max-height: 90dvh;
    margin: 0;
    padding: 22px 20px 0;
    border: 0;
}
.cgr-notes-dialog .cgr-notes-form {
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 22px);
    max-height: calc(90dvh - 22px);
}
.cgr-notes-dialog .cgr-notes-heading,
.cgr-notes-dialog .cgr-notes-hint,
.cgr-notes-dialog .cgr-notes-search,
.cgr-notes-dialog .cgr-notes-footer { flex-shrink: 0; }
.cgr-notes-dialog .cgr-notes-heading h3 { font-size: 21px; }
.cgr-notes-dialog .cgr-notes-close {
    display: block !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #303a3b;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
}
.cgr-notes-dialog .cgr-notes-search input { font-size: 16px; }
.cgr-notes-dialog .cgr-notes-options { flex: 1 1 auto; min-height: 0; max-height: none; }
.cgr-notes-dialog .cgr-notes-more { display: none; }
.cgr-notes-dialog .cgr-notes-option { min-height: 44px; font-size: 15px; }
.cgr-notes-dialog .cgr-notes-pending { flex-shrink: 0; max-height: 82px; overflow-y: auto; }
.cgr-notes-dialog .cgr-notes-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 14px 0 max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid #edf0ef;
    background: #fff;
}
.cgr-notes-dialog .cgr-notes-footer .cgr-notes-apply { min-width: 0; }
.cgr-notes-dialog .cgr-notes-footer .cgr-notes-apply:only-child { grid-column: 1 / -1; }
@media (max-height: 600px) {
    .cgr-notes-dialog .cgr-notes-hint { display: none; }
    .cgr-notes-dialog .cgr-notes-pending { max-height: 40px; }
}
@media (min-width: 1025px) {
    .cgr-notes[data-ready="1"] .cgr-notes-footer { display: none; }
}
@media (max-width: 1024px) {
    .cgr-notes-mobile-toolbar { display: block; margin: 0 0 18px; }
    .cgr-notes-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 46px;
        padding: 11px 16px;
        border: 1px solid #bdc8c7;
        border-radius: 6px;
        background: #fff;
        color: #303a3b;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
    }
    .cgr-notes-trigger svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
    .cgr-notes-trigger small { padding: 1px 7px; border-radius: 10px; background: #e7f4f2; color: #175b56; }
}
