/* Reader feedback page, floating button, feedback desk and screenshot editor. */
#feedbackView { --fb-ink: var(--v4-ink, #183b39); --fb-copper: var(--v4-copper, #ad692f); --fb-muted: #5f584c; --fb-line: #e6dcc8; --fb-paper: #fffdf8; }
#feedbackView .fb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
#feedbackView .fb-tabs button { min-height: 44px; padding: 0 18px; border: 1.5px solid #cfc3ac; border-radius: 999px; background: #fff; color: var(--fb-ink); font: inherit; font-weight: 600; cursor: pointer; }
#feedbackView .fb-tabs button[aria-selected="true"] { background: var(--fb-ink); border-color: var(--fb-ink); color: #fbf7ed; }
#feedbackView .fb-layout { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
#feedbackView .fb-card { background: #fff; border: 1px solid var(--fb-line); border-radius: 16px; padding: 22px; box-sizing: border-box; color: var(--fb-ink); }
#feedbackView .fb-form, #feedbackView .fb-detail { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
#feedbackView .fb-aside { flex: 1 1 280px; min-width: 0; background: #fffaf2; border-color: #ecd9bf; font-size: .95rem; }
#feedbackView .fb-aside h3 { margin: 0 0 8px; font-size: 1rem; }
#feedbackView .fb-aside dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; }
#feedbackView .fb-aside dt, #feedbackView .fb-hint, #feedbackView .fb-note, #feedbackView .fb-meta, #feedbackView small { color: var(--fb-muted); }
#feedbackView .fb-aside ol { margin: 0; padding-left: 20px; }
#feedbackView fieldset { border: 0; margin: 0; padding: 0; }
#feedbackView legend, #feedbackView .fb-field > span { display: block; font-weight: 700; margin-bottom: 8px; }
#feedbackView .fb-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#feedbackView .fb-kinds button { min-height: 64px; padding: 8px 10px; border: 1.5px solid #cfc3ac; border-radius: 12px; background: #fff; color: var(--fb-ink); text-align: left; font: inherit; cursor: pointer; }
#feedbackView .fb-kinds button b { display: block; font-size: 1.1rem; }
#feedbackView .fb-kinds button[aria-pressed="true"] { background: var(--fb-ink); border-color: var(--fb-ink); color: #fbf7ed; }
#feedbackView .fb-kinds button[aria-pressed="true"] small { color: #e8efe9; }
#feedbackView .fb-hint { margin: 8px 0 0; font-size: .92rem; }
#feedbackView .fb-field { display: flex; flex-direction: column; }
#feedbackView .fb-field input, #feedbackView .fb-field textarea, #feedbackView .fb-field select { min-height: 46px; padding: 10px 12px; border: 1.5px solid #cfc3ac; border-radius: 10px; background: var(--fb-paper); color: var(--fb-ink); font: inherit; box-sizing: border-box; width: 100%; }
#feedbackView .fb-shots { display: flex; flex-wrap: wrap; gap: 12px; }
#feedbackView .fb-shot { width: 260px; margin: 0; border: 1.5px solid #cfc3ac; border-radius: 12px; overflow: hidden; background: var(--fb-paper); display: block; }
#feedbackView .fb-shot img { display: block; width: 100%; height: 150px; object-fit: cover; object-position: top; background: #f4efe3; }
#feedbackView .fb-shot figcaption { padding: 8px 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 2px; }
#feedbackView .fb-shot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#feedbackView .fb-shot-actions button, #feedbackView .fb-add button, #feedbackView .fb-upload, #feedbackView .fb-row button:not(.fb-primary) { min-height: 40px; padding: 0 12px; border: 1.5px solid #cfc3ac; border-radius: 10px; background: #fff; color: var(--fb-ink); font: inherit; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; }
#feedbackView .fb-add { width: 220px; min-height: 150px; border: 1.5px dashed #cfc3ac; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; box-sizing: border-box; text-align: center; }
#feedbackView .fb-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#feedbackView .fb-submit { justify-content: space-between; padding-top: 10px; border-top: 1px solid #efe6d4; }
#feedbackView .fb-primary { min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--fb-ink); color: #fbf7ed; font: inherit; font-weight: 700; cursor: pointer; }
#feedbackView .fb-primary[disabled] { opacity: .6; cursor: progress; }
#feedbackView .fb-sent { max-width: 720px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
#feedbackView .fb-sent h3 { margin: 0; font-size: 1.8rem; }
#feedbackView .fb-list { list-style: none; margin: 0; padding: 0; flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#feedbackView .fb-list button { width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--fb-line); border-radius: 14px; background: var(--fb-paper); color: var(--fb-ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
#feedbackView .fb-list button[aria-pressed="true"] { background: #fff; border: 2px solid var(--fb-ink); }
#feedbackView .fb-detail h3 { margin: 0; font-size: 1.35rem; }
#feedbackView .fb-body { white-space: pre-wrap; margin: 0; }
#feedbackView .fb-timeline { list-style: none; margin: 0; padding: 0; }
#feedbackView .fb-timeline li { position: relative; padding: 0 0 16px 30px; display: flex; flex-direction: column; color: #6f685b; }
#feedbackView .fb-timeline li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cfc3ac; background: #fff; }
#feedbackView .fb-timeline li::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: #e0d6c3; }
#feedbackView .fb-timeline li:last-child::after { display: none; }
#feedbackView .fb-timeline li.done { color: var(--fb-ink); }
#feedbackView .fb-timeline li.done::before { background: var(--fb-ink); border-color: var(--fb-ink); }
#feedbackView .fb-timeline li.done::after { background: var(--fb-ink); }
#feedbackView .fb-timeline li.current::before { background: var(--fb-copper); border-color: #f3d9bd; }
#feedbackView .fb-reply { background: #f6f1e4; border-radius: 12px; padding: 12px 14px; }
#feedbackView .fb-reply p { margin: 4px 0 0; white-space: pre-wrap; }
.fb-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #f1ece2; color: #4a4336; }
.fb-stage-received { background: #e7eefb; color: #1e3a8a; }
.fb-stage-in_progress { background: #fdf0d9; color: #7a4510; }
.fb-stage-fixed { background: #183b39; color: #fbf7ed; }
.fb-stage-answered { background: #e3f1ee; color: #0f5132; }
.fb-fab { position: fixed; right: 20px; bottom: 20px; z-index: 900; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--v4-copper, #ad692f); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 6px 18px rgba(24, 59, 57, .25); cursor: pointer; }
.fb-fab[hidden], .fb-top-btn[hidden] { display: none; }
.fb-top-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px 0 16px; border: 1px solid var(--top-line, #d9c9a8); border-radius: 999px; background: var(--top-fill, #fffaf0); color: var(--top-ink, #1e5551); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.fb-top-btn::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v6a1.5 1.5 0 0 1-1.5 1.5H6.5L3 14v-3h.5A1.5 1.5 0 0 1 2 9.5z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v6a1.5 1.5 0 0 1-1.5 1.5H6.5L3 14v-3h.5A1.5 1.5 0 0 1 2 9.5z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.fb-top-btn:hover { background: var(--top-hover, #f3ead8); }
/* English name on hover and keyboard focus. */
.fb-top-btn { position: relative; }
.fb-top-btn[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 1000; padding: 5px 10px; border-radius: 8px; background: #183b39; color: #fbf7ed; font: 600 13px/1.3 'Noto Serif Telugu', sans-serif; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.fb-top-btn[data-tip]:is(:hover, :focus-visible)::after { opacity: 1; }
@media (hover: none) { .fb-top-btn[data-tip]::after { display: none; } }
.fb-top-btn:focus-visible { outline: 3px solid #f3d9bd; outline-offset: 2px; }
.fb-top-btn[disabled] { opacity: .7; cursor: progress; }
.fb-fab:focus-visible, #feedbackView button:focus-visible, #feedbackView input:focus-visible, #feedbackView textarea:focus-visible, #feedbackView select:focus-visible { outline: 3px solid var(--v4-copper, #ad692f); outline-offset: 2px; }
.fb-annotate { width: min(1100px, 94vw); max-height: 92vh; border: 0; border-radius: 16px; padding: 18px; color: #183b39; }
.fb-annotate::backdrop { background: rgba(10, 20, 20, .6); }
.fb-annotate header, .fb-annotate footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.fb-annotate .fb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-annotate button { min-height: 42px; padding: 0 14px; border: 1.5px solid #cfc3ac; border-radius: 10px; background: #fff; color: #183b39; font: inherit; cursor: pointer; }
.fb-annotate button[aria-pressed="true"], .fb-annotate .fb-primary { background: #183b39; border-color: #183b39; color: #fbf7ed; }
.fb-annotate .fb-canvas-wrap { margin: 12px 0 6px; max-height: 66vh; overflow: auto; }
.fb-annotate canvas { display: block; max-width: 100%; height: auto; cursor: crosshair; touch-action: none; }
@media (max-width: 720px) {
  #feedbackView .fb-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #feedbackView .fb-shot, #feedbackView .fb-add { width: 100%; }
  .fb-fab { right: 12px; bottom: 84px; }
}
.fb-capture-bar[hidden], .fb-selector[hidden] { display: none; }
.fb-selector { position: fixed; inset: 0; z-index: 1002; cursor: crosshair; background: rgba(24, 59, 57, .12); touch-action: none; }
.fb-selector-hint { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: #183b39; color: #fbf7ed; font-weight: 600; pointer-events: none; }
.fb-selector-box { position: fixed; border: 2px dashed var(--v4-copper, #ad692f); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 9999px rgba(10, 20, 20, .35); pointer-events: none; }
body.fb-capturing .fb-fab { visibility: hidden; }
.fb-capture-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1001; width: min(560px, calc(100vw - 24px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 12px 18px; border-radius: 16px; background: #fffdf8; color: #183b39; border: 1px solid #e6dcc8; box-shadow: 0 12px 32px rgba(10, 20, 20, .22); font-size: 15px; line-height: 1.4; }
.fb-capture-head { display: flex; align-items: flex-start; gap: 12px; }
.fb-capture-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding-top: 2px; }
.fb-capture-text b { font-size: 1.05rem; }
.fb-capture-text small { color: #5f584c; font-size: .85rem; }
.fb-capture-close { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #5f584c; cursor: pointer; }
.fb-capture-close:hover { background: #f1ece2; color: #183b39; }
.fb-capture-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-capture-actions button { min-height: 48px; padding: 4px 18px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; border: 1.5px solid #cfc3ac; border-radius: 12px; background: #fff; color: #183b39; font: inherit; font-weight: 600; cursor: pointer; }
.fb-capture-actions button small { font-size: .75rem; font-weight: 500; opacity: .8; }
.fb-capture-actions .fb-primary, .fb-capture-actions .fb-primary:hover { background: #183b39; border-color: #183b39; color: #fbf7ed; }
.fb-capture-actions button:hover { border-color: #183b39; }
.fb-capture-bar button:focus-visible { outline: 3px solid #ad692f; outline-offset: 2px; }
.fb-bar-thumb { width: 88px; height: 56px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid #e6dcc8; background: #fbf7ed; flex: none; }
@media (max-width: 520px) {
  .fb-capture-actions button { flex: 1 1 0; padding: 4px 10px; }
}
