.reader-copy-layer { position: absolute; inset: 0; z-index: 4; direction: ltr; pointer-events: none; }
.reader-copy-layer[hidden] { display: none; }
.book-reader.is-copying-text .reader-copy-layer { pointer-events: auto; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.reader-copy-selection { position: absolute; display: block; border: 1px dashed #597450; border-radius: 2px; background: #8daa7826; pointer-events: none; }
.reader-copy-selection[hidden] { display: none; }
.book-reader .reader-view-controls .reader-copy-button { width: auto; min-width: 90px; height: 44px; padding: 8px 10px; gap: 6px; border: 1px solid var(--border, #dfdfd2); background: var(--card, #faf8f2); font-size: 12px; white-space: nowrap; }
.book-reader .reader-copy-button[aria-pressed=true] { background: #dfecda; border-color: #91b185; color: #2a4a2d; }
.book-reader .reader-copy-help { padding: 7px 28px; border-top: 1px solid var(--border, #dfdfd2); color: var(--ink, #26392e); font-size: 11px; line-height: 1.8; }
.book-reader .reader-copy-help[hidden] { display: none; }
.reader-copy-editor { position: fixed; z-index: 36; display: flex; flex-direction: column; direction: rtl; gap: 9px; width: 430px; padding: 14px; border: 1px solid var(--border, #dfdfd2); border-radius: 9px; background: var(--card, #faf8f2); color: var(--ink, #26392e); box-shadow: 0 5px 22px #26392e25; overflow: auto; overscroll-behavior: contain; font-family: 'Noto Sans Arabic', sans-serif; user-select: text; -webkit-user-select: text; }
.reader-copy-editor:focus { outline: none; }
.reader-copy-editor label { color: inherit; font-size: 13px; line-height: 1.8; }
.reader-copy-description { margin: 0; color: var(--muted, #7a7c70); font-size: 11px; line-height: 1.9; }
.book-reader .reader-copy-editor textarea { display: block; box-sizing: border-box; width: 100%; min-height: 110px; max-height: 240px; resize: vertical; padding: 10px; border: 1px solid var(--border, #dfdfd2); border-radius: 6px; background: var(--paper, #f7f4ec); color: inherit; font: inherit; font-size: 16px; line-height: 1.9; user-select: text; -webkit-user-select: text; touch-action: auto; }
.reader-copy-editor textarea:disabled { opacity: .7; }
.reader-copy-editor textarea:focus-visible { outline: 2px solid var(--reader-accent, #596342); outline-offset: 1px; }
.reader-copy-status, .reader-copy-error { font-size: 11px; line-height: 1.8; }
.reader-copy-status { color: var(--muted, #7a7c70); }
.reader-copy-error { color: var(--ink, #26392e); }
.reader-copy-status:empty, .reader-copy-error:empty { display: none; }
.reader-copy-editor-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.book-reader .reader-copy-editor-actions button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--border, #dfdfd2); border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 12px; }
.book-reader .reader-copy-editor-actions button[hidden] { display: none; }
.book-reader .reader-copy-editor-actions .reader-copy-confirm { background: #dfecda; border-color: #91b185; color: #2a4a2d; }
.book-reader.is-drawing-copy .reader-stage { scroll-behavior: auto; }
html[data-theme=dark] .book-reader .reader-copy-button[aria-pressed=true], html[data-theme=dark] .book-reader .reader-copy-editor-actions .reader-copy-confirm { background: #344d33; border-color: #6e9864; color: #e2f0dd; }
html[data-theme=dark] .reader-copy-selection { border-color: #83ad72; background: #91b18533; }
@media (max-width: 640px), (max-width: 999px) and (max-height: 500px) and (orientation: landscape) {
  .book-reader .reader-view-controls .reader-copy-button { flex: 0 0 44px; min-width: 44px; max-width: 44px; width: 44px; padding: 10px; }
  .book-reader .reader-copy-button span { display: none; }
  .book-reader .reader-copy-help { padding: 4px 12px; font-size: 10px; }
}
