/* «Нашли ошибку? Ctrl+Enter»: подсказка под текстом и окно сообщения (assets/js/report-error.js).
   Цвета — только токены theme.css, поэтому светлая/тёмная/контрастная темы работают сами. 29.09.2026. */

.cd-report-hint {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    max-width: 45rem;
    margin: 1rem 0 .5rem;
    padding: .625rem .875rem;
    border: 1px dashed var(--ln);
    border-radius: var(--r-md);
    background: var(--sf);
    color: var(--mu);
    font-size: .8125rem;
    line-height: 1.5;
}
.cd-report-hint__ico { flex: 0 0 auto; margin-top: .125rem; color: var(--am); }
.cd-report-hint kbd {
    display: inline-block;
    padding: 0 .3125rem;
    border: 1px solid var(--bd);
    border-bottom-width: 2px;
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--tx);
    font-family: var(--ff-mono);
    font-size: .75rem;
    line-height: 1.4;
}
/* На телефоне Ctrl+Enter нет — подсказка там только сбивает с толку */
@media (hover: none) and (pointer: coarse) {
    .cd-report-hint { display: none; }
}

/* ---------- Окно ---------- */
.cd-rerr {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--ove);
}
.cd-rerr[hidden] { display: none; }
html.cd-rerr-open { overflow: hidden; }
.cd-rerr__dlg {
    position: relative;
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid var(--ln);
    border-radius: var(--r-lg);
    background: var(--bg);
    color: var(--tx);
    box-shadow: var(--shadow-pop);
}
.cd-rerr__title { font-size: 1.125rem; margin: 0 2rem .75rem 0; }
.cd-rerr__x {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: var(--tap-sm);
    height: var(--tap-sm);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mu);
    font-size: 1.5rem;
    line-height: 1;
}
.cd-rerr__x:hover, .cd-rerr__x:focus-visible { background: var(--sf); color: var(--tx); }
.cd-rerr__lead, .cd-rerr__label { display: block; margin: 0 0 .375rem; font-size: .8125rem; color: var(--mu); }
.cd-rerr__frag {
    margin: 0 0 .875rem;
    padding: .5rem .75rem;
    border-left: 3px solid var(--am-fill);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    background: var(--sf);
    font-size: .9375rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 10rem;
    overflow: auto;
}
.cd-rerr__note {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 4.5rem;
    padding: .5rem .75rem;
    border: 1px solid var(--bd);
    border-radius: var(--r-sm);
    background: var(--bg);
    resize: vertical;
}
.cd-rerr__note:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; }
.cd-rerr__status { min-height: 1.25rem; margin: .5rem 0; font-size: .875rem; }
.cd-rerr__row { display: flex; flex-wrap: wrap; gap: .5rem; }
.cd-rerr__send, .cd-rerr__cancel {
    min-height: var(--tap);
    padding: 0 1.125rem;
    border: 1px solid var(--bd);
    border-radius: var(--r-md);
    font-weight: 600;
}
.cd-rerr__send[disabled] { opacity: .65; cursor: progress; }
.cd-rerr__cancel { background: transparent; color: var(--tx); }
.cd-rerr__cancel:hover, .cd-rerr__cancel:focus-visible { background: var(--sf); }
