/* taxreturn.html and the tax return card on reports.html / home.html (change 020, decision 552, Nov 9 2026).
   The approved draft look: chats\Stingray Bookkeeping\designs\pay-to-unlock\pay-to-unlock-v1.png (his "Build it!").
   Every color is a name of the look (portal.css), so the four looks keep working; refund and owe follow the draft in
   Northern lights (teal and gold) and the look's own good / warn colors elsewhere. */

/* (the colors are read where the words stand, so a light panel of Engraved cream uses its own dark green and brown) */

.tr-page { padding-top: 6px; }
.tr-body { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.tr-body > * { margin: 0; }

/* a computer: left AND right (his rule, decision 118: "not everything is in the middle"). Left: the year, the
   title and the numbers (and where to mail it); right: the return itself and its buttons. A phone keeps one column
   in reading order. */
@media (min-width: 900px) {
  .tr-body {
    display: grid;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "years act" "title act" "status act" "nums act" "mail act" "rest act";
    grid-template-rows: auto auto auto auto auto 1fr;
    column-gap: 28px;
    row-gap: 14px;
    align-items: start;
  }
  .tr-body > .tr-years { grid-area: years; }
  .tr-body > .tr-title { grid-area: title; }
  .tr-body > .tr-status { grid-area: status; }
  .tr-body > .tr-nums-card { grid-area: nums; }
  .tr-body > .tr-act-card { grid-area: act; }
  .tr-body > .tr-mail { grid-area: mail; }
}

.tr-title { font-size: clamp(1.9rem, 6.4vw, 2.6rem); margin-top: 4px; }
.tr-status { margin-top: -2px; }
.tr-status .p3-pill { font-size: 1.125rem; padding: 6px 14px; }

/* the years, when there is more than one */
.tr-years { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-year {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 76px; min-height: 48px; padding: 6px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--p3-line-bg); color: var(--ink); text-decoration: none;
  font-family: var(--sans); line-height: 1.15;
}
.tr-year-n { font-weight: 700; font-size: 1.125rem; }
.tr-year-w { font-size: 1.125rem; color: var(--soft); }
.tr-year.on { border-color: var(--p3-gold); box-shadow: inset 0 0 0 1px var(--p3-gold); }
.tr-year:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Your numbers */
.tr-card { padding: 14px 18px 8px; }
.tr-h2 { margin: 0 0 4px; }
.tr-nums { margin: 0; }
.tr-num {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--rule);
  font-size: 1.15rem;
}
.tr-num:first-child { border-top: 0; }
.tr-num dt { color: var(--ink); }
.tr-num dd { margin: 0; text-align: right; font-family: var(--serif); font-weight: 650; }
.tr-amt.refund { color: var(--good); }
.tr-amt.owe { color: var(--warn); }
:is(html[data-theme="aurora"], html:not([data-theme])) .tr-amt.refund { color: var(--on); }
:is(html[data-theme="aurora"], html:not([data-theme])) .tr-amt.owe { color: var(--accent); }
.tr-amt.zero { color: var(--soft); font-family: var(--sans); font-weight: 600; }

/* the drawn page: never the real return */
.tr-doc {
  position: relative; height: 150px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(5, 18, 30, .55);
}
.tr-paper {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  width: 200px; height: 250px; padding: 14px 16px; border-radius: 4px;
  background: #f4f1ea; color: #333; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7);
}
.tr-paper i { display: block; height: 6px; margin: 7px 0; border-radius: 2px; background: #c9c4b8; }
.tr-paper i.t { height: 9px; width: 62%; margin: 0 0 6px; background: #4a4a4a; }
.tr-paper i.s { height: 5px; width: 78%; margin: 0 0 12px; background: #8a8a8a; }
.tr-paper i.h { width: 55%; }
.tr-paper i.m { width: 80%; }
.tr-doc.locked .tr-paper { filter: blur(4px); }
.tr-stamp {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) rotate(-14deg);
  padding: 2px 14px; border-radius: 6px;
  font: 800 34px/1.1 var(--sans); letter-spacing: .18em;
  color: #f0c577; border: 3px solid #f0c577; background: rgba(5, 15, 26, .9);
}
.tr-lock {
  position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0c2233; border: 1.5px solid #f0c577; color: #f0c577;
}
.tr-doc:not(.locked) .tr-lock { border-color: #8fdcd5; color: #8fdcd5; }

/* the buttons and their lines */
.tr-act { display: flex; flex-direction: column; gap: 12px; }
.tr-act > * { margin: 0; }
.tr-act .btn.full { min-height: 54px; font-size: 1.15rem; }
.tr-cap { color: var(--soft); font-size: 1.125rem; }
.tr-small { color: var(--soft); font-size: 1.125rem; text-align: center; }
.tr-wait-note { justify-content: center; }
.tr-said {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--p3-line-bg); color: var(--ink); font-size: 1.125rem;
}
.tr-mail-steps { white-space: pre-line; margin: 0 0 10px; line-height: 1.5; font-size: 1.125rem; }
.tr-act-card { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 16px; }
.tr-act-card > * { margin: 0; }
.tr-own { margin: 2px 0 0; }
.tr-mail .btn { margin: 6px 0 10px; }

/* ---------- the card on reports.html and home.html ---------- */
.tr-card-box { padding: 16px 18px; }
.tr-card-box .p3-h2 { margin: 0 0 6px; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-row + .tr-row { border-top: 1px solid var(--rule); }
.tr-row-link {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 2px;
  color: var(--ink); text-decoration: none;
}
.tr-row-link:hover .tr-row-y { text-decoration: underline; text-underline-offset: 3px; }
.tr-row-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.tr-row-l { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tr-row-y { font-family: var(--serif); font-weight: 650; font-size: 1.125rem; }
.tr-row-n { color: var(--soft); font-size: 1.125rem; }
.tr-row-pill { flex: none; }
.tr-row-link > .icon { flex: none; width: 18px; height: 18px; opacity: .8; }
.tr-card-note { margin: 8px 0 0; }

/* a phone: the year and its number on the first line, the pill under them (never a squeezed word) */
@media (max-width: 560px) {
  .tr-row-link { flex-wrap: wrap; row-gap: 6px; }
  .tr-row-l { flex: 1 1 100%; }
  .tr-row-pill { margin-left: 0; }
  .tr-row-link > .icon { display: none; }
}

@media print {
  .tr-doc, .tr-act, .tr-years { display: none; }
}

/* a small phone (360 wide): a shorter drawn page, so the Pay button comes into sight sooner */
@media (max-width: 380px) {
  .tr-doc { height: 120px; }
  .tr-stamp { font-size: 28px; }
}

/* Home of a tax-only client (tax returns, no report at all; home.js sets html.home-tax-only): no empty "Your month"
   card, unless it shows their QuickBooks month so far (the river) */
.home-tax-only #month-card:not(.has-river) { display: none; }
