/* 收據／請款單產生器：版面整套沿用報價單（.qt-* 表單、.qd-* 單據本體、列印規則），這裡只加收據自己的部分 */
@import url('../quote/style.css');
:root { --accent-soft: #e3ebe3; }

.rc-notice { margin: 10px 0 0; padding: 10px 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); font-size: .93rem; line-height: 1.6; }
.rc-notice a { font-weight: 700; color: var(--accent); white-space: nowrap; }
.rc-kind { margin-bottom: 18px; }
.rc-kind .seg label { flex-direction: column; gap: 2px; min-height: 60px; }
.rc-kind .seg label small { font-weight: 500; font-size: .8rem; opacity: .8; }
.seg4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rc-import { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }
.rc-import[hidden] { display: none; }
.rc-link { border: 0; background: none; padding: 0 0 0 4px; color: var(--accent); font: 700 .9rem var(--font-body); text-decoration: underline; cursor: pointer; min-height: 40px; }

/* 收據／請款單各自才有的欄位 */
.qt-grid[data-kind="invoice"] .rc-only-receipt,
.qt-grid[data-kind="receipt"] .rc-only-invoice { display: none; }

/* 單據本體 */
.rc-lead { margin: 14px 0 0; font-size: .95rem; line-height: 1.75; overflow-wrap: anywhere; }
.rc-lead b { font-weight: 800; }
.rc-doc .qd-parties { padding-top: 10px; }
.rc-sign { position: relative; }
.rc-stamp { position: absolute; left: 4px; bottom: calc(100% - 14px); max-height: 72px; max-width: 120px; object-fit: contain; mix-blend-mode: multiply; }
.rc-signbox .qd-line { margin-top: 64px; }
.rc-not { margin: 10px 0 0; font-size: .78rem; color: var(--ink-soft); }

/* 印花稅提醒、請款單轉收據 */
.rc-stamp-note p { margin: 12px 0 0; padding: 10px 12px; background: #fbf6e6; border-radius: var(--radius-sm); font-size: .88rem; line-height: 1.6; }
.rc-stamp-note:empty { display: none; }
.rc-stamp-note a { color: var(--accent); font-weight: 700; }
.rc-convert { width: 100%; margin-top: 10px; }
.rc-convert[hidden] { display: none; }

/* 付費區：印章圖 */
.rc-upload { position: relative; cursor: pointer; }
.rc-stamp-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.rc-stamp-row img { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }

@media print {
  .rc-notice, .rc-kind, .rc-stamp-note, .rc-convert { display: none !important; }
}

/* 支票號碼：選「支票」才出現 */
.rc-cheque { margin-top: 12px; }
fieldset:not(:has(#m-cheque:checked)) > .rc-cheque { display: none; }
/* 手機：「收據不是統一發票」字句一個不刪（合規提醒，FAQ 沒有重寫這句），只把字級與留白收緊，讓表單往上一點（分數表 receipt 第 3 點） */
@media (max-width: 959px) { .rc-notice { font-size: .84rem; line-height: 1.5; padding: 8px 12px; } }
/* 品項列「金額」跟單價框同一條線（分數表第三輪：金額比輸入框中線低約 15px）。
   報價單的 .qt-i-amt 是靠下對齊，而輸入框下面還留了說明／錯誤字的位置，所以金額會掉下去；這裡改靠上、標籤跟欄位標籤同高。只動收據，不動 quote/style.css（dev3 的） */
.qt-i-amt { justify-content: flex-start; }
.qt-i-amt span { display: block; margin-bottom: 4px; line-height: 1.6; }
@media (min-width: 960px) { .kit-hero .rc-notice { max-width: 528px; } }   /* 右緣跟下面的表單卡（x 96–624）對齊（分數表第三輪：原本 x≈708，跟表單卡、插畫都不齊） */

/* UILESS（Atlas 10/18）：左欄上面是萬用輸入，分欄表單收進「核對我聽到的」（kit 的白卡規則只管直屬 grid 的 form，這裡自己給） */
.rc-in { padding-top: 8px; display: grid; gap: var(--s2); }
.rc-check { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.rc-check > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 var(--s3); font-weight: 700; color: var(--band); }
.rc-check > summary::-webkit-details-marker { display: none; }
.rc-check > summary::after { content: "＋"; font-weight: 900; }
.rc-check[open] > summary::after { content: "－"; }
.rc-check .qt-form { padding: var(--s1) var(--s3) var(--s1); }
.rc-check .qt-form .field, .rc-check .qt-form .row2 { margin: 0 0 var(--s3); }
@media (min-width: 960px) { .rc-in { position: sticky; top: 76px; } }
/* 萬用輸入的框是 JS 畫的：畫出來之前先留同高的位置（390＝252px、1280＝264px） */
#rc-un:empty { min-height: 252px; }   /* 例句短、手機上一行就放得下，比 severance 矮 24px（本機量） */
@media (min-width: 960px) { #rc-un:empty { min-height: 264px; } }

/* 萬用輸入站第一屏（hardcheck r4）：手機上範例離輸入框近一點 */
@media (max-width: 959px) { .qt-paper:has(> .kit-example) { padding-top: 12px; } }
