/* Note editor details and the "check your notes" review dialog. */
.note-title-field { margin-bottom: 1.1rem; }
.note-title-field input { width: 100%; }
.note-title-field .field-hint { margin-top: .4rem; }
.note-grid .field-label { margin-bottom: .45rem; }
.note-editor-hint { font-size: .88rem; color: var(--ink-3); margin: .6rem 0 0; }
.nav-item { font: inherit; text-align: left; width: 100%; background: transparent; border: 0; }
.price-screen { white-space: normal; }
.price-screen.is-error { color: #A8261A; }
#statusMsg { white-space: pre-line; overflow-wrap: anywhere; }
.footer-controls .input-stack { min-width: 0; width: 100%; }

.review-dialog {
    width: min(960px, calc(100% - 2rem));
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    border: 1.5px solid var(--ink);
    border-radius: 24px;
    color: var(--ink-2);
    background: var(--card, #fff);
    box-shadow: 10px 10px 0 var(--ink), 0 40px 90px -30px rgba(14, 18, 30, .6);
}
.review-dialog[open] { display: flex; flex-direction: column; overflow: hidden; animation: review-in .3s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes review-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.review-dialog::backdrop { background: rgba(14, 18, 30, .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.review-dialog button { min-height: 44px; }

.review-heading, .review-footer { flex-shrink: 0; padding: 1.3rem 1.6rem; background: var(--card, #fff); }
.review-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--rule); }
.review-heading h2 { margin: 0; font-size: 1.6rem; }
.review-heading p { font-size: .95rem; margin: .45rem 0 0; color: var(--ink-3); max-width: 60ch; }

.review-contents { padding: 0 1.6rem; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.review-summary {
    margin-top: 1.1rem; padding: .8rem 1rem;
    background: var(--hi-soft); color: #3F3500;
    border-radius: 12px; font-size: .95rem; font-weight: 650;
}
.review-summary::first-letter { text-transform: uppercase; }
.review-card { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }
.review-card:last-child { border-bottom: 0; }
.review-card h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.review-card h4 { margin: 1rem 0 .45rem; font-size: .92rem; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.review-card p, .review-card li, .review-card summary { font-size: .95rem; }
.review-card ul { margin: .5rem 0 0 1.2rem; display: grid; gap: .25rem; }
.review-card summary { cursor: pointer; color: var(--pen); font-weight: 600; }
.review-card details { margin: .6rem 0; }
.review-note-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.review-note-heading h3 { overflow-wrap: anywhere; min-width: 0; }
.review-note-heading button { flex-shrink: 0; }
.review-warning { color: var(--bad); font-weight: 650; background: var(--bad-soft); border-radius: 10px; padding: .55rem .8rem; margin-top: .6rem; }
.review-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.review-comparison > div { min-width: 0; }
.converted-text {
    white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
    font: 1.12rem/1.25 var(--font-pixel);
    background: var(--lcd); color: var(--lcd-ink);
    border: 7px solid #0E1218; border-radius: 12px;
    padding: .7rem .85rem; max-height: 22rem; overflow: auto;
}
.converted-text.original-text { font: .92rem/1.6 var(--font-mono); background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--rule); border-radius: 12px; }
.converted-text:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }

.review-footer { border-top: 1px solid var(--rule); }
.review-footer .checkbox-row { margin-bottom: 1rem; }
.review-footer [hidden] { display: none; }
.review-footer .field-hint { margin: 0 0 .8rem; }
.review-footer-actions { display: flex; gap: .7rem; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 600px) {
    .review-dialog { width: calc(100% - 1rem); max-height: 94dvh; box-shadow: 0 30px 70px -20px rgba(14, 18, 30, .6); }
    .review-heading, .review-footer { padding: 1rem; }
    .review-contents { padding: 0 1rem; }
    .review-heading { position: relative; padding-right: 4.3rem; }
    .review-heading h2 { font-size: 1.3rem; line-height: 1.25; }
    .review-heading p { display: none; }
    .review-heading #closeReview { position: absolute; right: .75rem; top: .75rem; width: 44px; padding: 0; font-size: 0; }
    .review-heading #closeReview::after { content: '×'; font-size: 26px; }
    .review-comparison { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .review-footer .checkbox-row { font-size: .85rem; margin-bottom: .6rem; }
    .converted-text { max-height: 14rem; }
    .review-note-heading h3 { font-size: 1rem; }
    .review-footer-actions .btn { width: 100%; }
}
