/* Orientation reader: one document surface, compact context and chronological replies.
   Modal viewport containment and scroll locking remain shared with the existing modal. */
.orientation-reader .modal-header { background: var(--card); padding: 20px 24px 16px; }
.orientation-reader .modal-title { font-size: 1.125rem; line-height: 1.35; font-weight: 750; }
.orientation-reader .orientation-view-heading { gap: 6px; flex: 1; }
.orientation-reader__heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.orientation-reader .modal-body > * + * { margin-top: 0; }
.orientation-reader .modal-body { background: var(--card); padding: 20px 24px 24px; }
.orientation-reader .modal-footer { padding: 8px 16px; border-top: 1px solid var(--border); }
.orientation-reader .orientation-view-content > * + * { margin-top: 24px; }
.orientation-reader__status { display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--orientation-status-accent, var(--primary)) 10%, var(--card)); color: var(--heading); font-size: .75rem; }
.orientation-reader__status > i { color: var(--orientation-status-accent, var(--primary)); }
.orientation-reader__summary { display: grid; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.orientation-reader__sender { display: flex; align-items: center; gap: 10px; }
.orientation-reader__avatar, .orientation-reader__reply-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.orientation-reader__identity { min-width: 0; }
.orientation-reader__identity > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.orientation-reader__identity strong { color: var(--heading); font-size: .875rem; overflow-wrap: anywhere; }
.orientation-reader__identity span, .orientation-reader__reply-header span { color: var(--primary); font-size: .7rem; }
.orientation-reader__identity small { color: var(--muted); font-size: .75rem; }
.orientation-reader__metadata { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 10px 20px; }
.orientation-reader__metadata > div { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
.orientation-reader__metadata i { color: var(--muted); font-size: .8rem; }
.orientation-reader__metadata span { display: grid; gap: 2px; min-width: 0; }
.orientation-reader__metadata small { font-size: .7rem; color: var(--muted); }
.orientation-reader__metadata strong { color: var(--text); font-size: .75rem; font-weight: 500; overflow-wrap: anywhere; }
.orientation-reader__status-help { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.orientation-reader__section-title { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--heading); font-size: .875rem; }
.orientation-reader__section-title > i { color: var(--muted); }
.orientation-reader__section-title > span { color: var(--muted); font-size: .75rem; }
.orientation-reader__document, .orientation-reader .orientation-reply-body { font-size: 1rem; line-height: 1.6; max-width: 72ch; margin-inline: auto; overflow-wrap: anywhere; }
.orientation-reader__files { display: grid; gap: 8px; }
.orientation-reader .orientation-view-attachment { padding: 10px 12px; background: var(--card-2); }
.orientation-reader__history, .orientation-reader .orientation-reader__composer { padding-top: 20px; border-top: 1px solid var(--border); }
.orientation-reader__history-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.orientation-reader__history-header h2 { color: var(--heading); font-size: .9375rem; font-weight: 700; margin: 0; }
.orientation-reader__history-header p { color: var(--muted); font-size: .75rem; margin: 4px 0 0; }
.orientation-reader .orientation-reply-list { gap: 20px; padding: 0; border: 0; }
.orientation-reader__reply { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.orientation-reader__reply--mine .orientation-reader__reply-avatar { border-color: var(--primary); }
.orientation-reader__reply-content { min-width: 0; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.orientation-reader__reply:last-child .orientation-reader__reply-content { padding-bottom: 0; border-bottom: 0; }
.orientation-reader__reply-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.orientation-reader__reply-header > div { display: flex; flex: 1 1 200px; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.orientation-reader__reply-header strong { color: var(--heading); font-size: .8125rem; overflow-wrap: anywhere; }
.orientation-reader__reply-header time, .orientation-reader__reply-role { color: var(--muted); font-size: .75rem; }
.orientation-reader__reply-role { flex-basis: 100%; }
.orientation-reader .orientation-reply-empty { justify-content: flex-start; padding: 0; font-size: .8125rem; }
.orientation-reader .orientation-reader__composer { padding-inline: 0; padding-bottom: 0; border-bottom: 0; background: transparent; }
.orientation-reader .orientation-reply-form-heading__icon { width: 28px; height: 28px; flex-basis: 28px; background: transparent; }
.orientation-reader .orientation-reply-form-heading { gap: 8px; margin-bottom: 16px; }
.orientation-reader__editor { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.orientation-reader__editor:focus-within { border-color: var(--primary); }
.orientation-reader__editor .rich-toolbar[data-rich-toolbar] { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--card-2); padding: 4px 8px; flex-direction: row; flex-wrap: wrap; align-items: center; }
.orientation-reader__editor .rich-toolbar__advanced { flex: 1 0 auto; }
.orientation-reader__editor .rich-toolbar__advanced[open] { flex-basis: 100%; }
.orientation-reader__editor .rich-toolbar__advanced summary { min-height: 44px; display: flex; align-items: center; gap: 6px; }
.orientation-reader__editor .rich-editor[data-rich-editor] { min-height: 144px; max-height: 320px; overflow-y: auto; border: 0; border-radius: 0; padding: 14px; }
.orientation-reader .orientation-reply-status-options { padding: 0; border: 0; border-radius: 0; background: transparent; margin-top: 20px; }
.orientation-reader .orientation-reply-status-options > div { gap: 4px; }
.orientation-reader .orientation-reply-status-option { grid-template-columns: 20px 20px minmax(0, 1fr); padding: 8px; border-color: transparent; background: transparent; border-radius: 8px; }
.orientation-reader .orientation-reply-status-option:has(input:checked) { border-color: var(--border); background: var(--primary-soft); box-shadow: none; }
.orientation-reader .orientation-reply-status-option__check { width: 20px; height: 20px; background: transparent; }
.orientation-reader .orientation-view-reactions { padding: 12px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.orientation-reader .orientation-view-feedback:empty { display: none; }
@media (max-width: 600px) {
    .orientation-reader .modal-header { padding: 14px 16px 12px; }
    .orientation-reader .modal-title { font-size: 1rem; }
    .orientation-reader .modal-body { padding: 16px; }
    .orientation-reader__metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
    .orientation-reader__metadata > div:nth-child(2) { grid-column: 1 / -1; order: 1; }
    .orientation-reader__reply { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
    .orientation-reader__reply-avatar { width: 28px; height: 28px; }
    .orientation-reader .orientation-reply-form-heading { grid-template-columns: 28px minmax(0, 1fr); }
    .orientation-reader .orientation-view-reactions { flex-wrap: wrap; gap: 4px 12px; }
}

/* Conversation composition: message, history, compact composer, send action. */
.orientation-reader .modal-header .btn-close {
    flex: 0 0 40px; width: 40px; height: 40px; padding: 0; margin: 0 0 0 12px;
    border: 0; border-radius: 8px; box-shadow: none; background-color: transparent;
    background-size: 12px; opacity: .7;
}
.orientation-reader .modal-header .btn-close:hover { opacity: 1; background-color: var(--card-2); }
.orientation-reader .modal-body { min-height: 0; overscroll-behavior: contain; }
.orientation-reader__summary { border-bottom: 0; padding-bottom: 0; }
.orientation-reader__history { padding-top: 0; border-top: 0; }
.orientation-reader__history-header { margin-bottom: 12px; }
.orientation-reader__history-header p { display: none; }
.orientation-reader .orientation-reply-empty { background: var(--card-2); border: 0; border-radius: 8px; padding: 12px 16px; color: var(--text); }
.orientation-reader .orientation-reader__composer { padding-top: 20px; }
.orientation-reader .orientation-reply-form-heading { margin-bottom: 12px; }
.orientation-reader .orientation-reply-form-heading__icon { display: none; }
.orientation-reader__editor .rich-editor[data-rich-editor] { min-height: 96px; padding: 12px; }
.orientation-reader .orientation-reply-attachment-picker { padding: 4px 8px 8px; background: var(--card-2); }
.orientation-reader .orientation-reply-attachment-actions { gap: 4px; }
.orientation-reader .attachment-label, .orientation-reader .orientation-compose-action { min-height: 40px; border: 0; background: transparent; color: var(--text); border-radius: 6px; }
.orientation-reader .attachment-label:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.orientation-reader .orientation-reply-emoji-panel { padding: 8px; margin: 0; }
.orientation-reader .orientation-reply-status-options { margin-top: 16px; gap: 8px; }
.orientation-reader .orientation-reply-status-options > div { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.orientation-reader .orientation-reply-status-options > legend { font-weight: 600; }
.orientation-reader .orientation-reply-status-options > p { margin: 0; }
.orientation-reader .orientation-reply-status-option { grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px; }
.orientation-reader .orientation-reply-status-option input { width: 16px; height: 16px; margin-top: 2px; }
.orientation-reader .orientation-reply-status-option__check { display: none; }
.orientation-reader .orientation-reply-status-option > span > strong { font-size: .75rem; font-weight: 600; line-height: 1.5; }
.orientation-reader .orientation-reply-status-option > span > small { font-size: .75rem; line-height: 1.5; color: var(--muted); }
.orientation-reader .orientation-reply-status-option:has(input:checked) { border-color: transparent; background: var(--primary-soft); }
.orientation-reader .orientation-reply-form-footer { display: flex; justify-content: flex-end; margin-top: 16px; }
.orientation-reader .orientation-view-reactions { margin-top: 12px; padding: 0; border: 0; gap: 8px 16px; flex-wrap: wrap; }
.orientation-reader .orientation-view-reactions > span { font-size: .75rem; color: var(--muted); }
.orientation-reader .reaction-picker { opacity: 1; gap: 4px; }
.orientation-reader .reaction-btn, .orientation-reader .reaction-chip { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; min-height: 40px; font-size: .9375rem; color: var(--muted); border: 1px solid transparent; border-radius: 8px; background: transparent; }
.orientation-reader .reaction-btn:hover, .orientation-reader .reaction-chip:hover { background: var(--card-2); color: var(--text); }
.orientation-reader [data-reaction-emoji][aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); border-color: var(--border); }
.orientation-reader details.orientation-readers { max-width: 100%; border: 0; border-radius: 0; background: transparent; }
.orientation-reader details.orientation-readers > summary { width: fit-content; gap: 8px; padding: 8px 0; font-size: .8125rem; color: var(--text); }
.orientation-reader .orientation-readers__list { padding-inline: 0; }
.orientation-reader .orientation-reply-form-heading small { color: var(--muted); line-height: 1.5; }
@media (max-width: 600px) {
    .orientation-reader .orientation-reply-status-options > div { grid-template-columns: 1fr; gap: 4px; }
    .orientation-reader .orientation-reply-status-option { min-height: 44px; }
    .orientation-reader .orientation-reply-form-footer .btn { width: 100%; }
    .orientation-reader .orientation-view-content > * + * { margin-top: 20px; }
}
.orientation-reader .orientation-reply-form-heading { display: block; }
.orientation-reader .orientation-reader__composer { border-top-color: var(--border); }
.orientation-reader .orientation-view-reactions { justify-content: flex-start; }
.orientation-reader .orientation-view-reactions .reactions-row { flex: 0 1 auto; }
