/*
 * employee-travel.css — the Employee Travel Request pages (v0.54.0, Flagler edition), over app.css, rm.css, accident.css and fleet.css
 * (the sub-navigation, the cards, the admin tabs and the request page's sections are the Accident / Injury Report's; the status pill is
 * White Fleet's). NO TENANT COLOUR OR NAME IS WRITTEN HERE. [I20] Brand colours come from the custom properties app.css sets from
 * /api/config. Green is approved, amber is waiting, red is denied, grey is archived; colour is never the only signal: every pill says
 * what it means in words.
 */

/* ---------------------------------------------------------------- the dashboard */
.et-tabs { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.et-sub { font-size: 0.8rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.et-id { font-size: 0.74rem; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.et-table { width: 100%; border-collapse: collapse; }
.et-table th { text-align: left; white-space: nowrap; }
.et-sorthead { appearance: none; background: transparent; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
.et-sorthead:hover { text-decoration: underline; }
.et-sorthead:focus-visible { outline: 3px solid var(--info-line); outline-offset: 2px; }
.et-table td { vertical-align: top; }
.et-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.et-actions .btn { min-height: 2.5rem; display: inline-flex; align-items: center; text-decoration: none; }

.et-row.is-focus { background: var(--info-bg); }

/* ---------------------------------------------------------------- the form */
.etf-sec { background: var(--card); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }
.etf-sec[hidden], .etf-field[hidden], .etf-row[hidden] { display: none !important; }
.etf-legend { margin: 0; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.etf-row { display: flex; gap: 1rem; align-items: flex-start; }
.etf-row > .etf-field { flex: 1 1 0; min-width: 0; }
.etf-field { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.etf-field .acc-lbl { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.etf-req { color: var(--stop); font-weight: 700; }
.etf-sec input[type="text"], .etf-sec input[type="tel"], .etf-sec input[type="date"], .etf-sec input[type="email"], .etf-sec select, .etf-sec textarea, .et-sign input[type="text"], .et-sign textarea {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.75rem; font: inherit; font-size: 1rem; border-radius: 0.5rem; border: 1px solid #b8bec4; background: #fff; color: var(--ink);
}
.etf-sec textarea, .et-sign textarea { min-height: 5rem; line-height: 1.5; resize: vertical; }
.etf-sec input[readonly] { background: var(--bg); color: var(--ink-soft); }
.etf-sec input:focus-visible, .etf-sec select:focus-visible, .etf-sec textarea:focus-visible, .et-sign input:focus-visible, .et-sign textarea:focus-visible { outline: 3px solid var(--info-line); outline-offset: 1px; }
/* Two calendar inputs, From and To (a blank To is a single day). */
.etf-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; }
.etf-range__leg { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 9.5rem; min-width: 0; }
.etf-range__cap { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.etf-range__opt { font-weight: 400; }
.etf-range__sep { align-self: center; color: var(--ink-soft); padding-top: 1.2rem; }
.etf-range.is-invalid input, .etf-range-err { color: var(--stop); }
.etf-range-err { flex: 1 1 100%; margin: 0; font-size: 0.82rem; font-weight: 600; }
.etf-range-err[hidden] { display: none; }
.etf-sec input.is-auto { background: var(--bg); color: var(--ink-soft); }
.etf-ack { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.9rem 1rem; border: 1.5px solid #b8bec4; border-radius: 0.6rem; background: var(--bg); font-size: 0.92rem; line-height: 1.5; }
.etf-ack:has(input:checked) { background: var(--ok-bg); border-color: var(--ok-line); }
.etf-err { margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--stop); }
.etf-err[hidden] { display: none; }
.etf-file { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }
.etf-drop { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; border: 2px dashed #b8bec4; border-radius: 0.75rem; background: var(--bg); cursor: pointer; }
.etf-drop:hover, .etf-drop.is-hover { border-color: var(--primary); background: var(--info-bg); }
.etf-file:focus-visible + .etf-drop { outline: 3px solid var(--info-line); outline-offset: 2px; }
.etf-drop-ic { font-size: 1.5rem; line-height: 1; font-weight: 700; }
.etf-drop small { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: var(--ink-soft); }
.etf-files { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.etf-files:empty { display: none; }
.etf-files li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-size: 0.85rem; }
.etf-files li.is-pending { background: var(--bg); color: var(--ink-soft); }
.etf-files li.is-err { border-color: var(--stop-line); background: var(--stop-bg); color: #7d1f1f; }
.etf-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.etf-file-size { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.etf-file-rm { flex: 0 0 auto; padding: 0.2rem 0.65rem; min-height: 2rem; background: #fff; border: 1px solid #b8bec4; border-radius: 0.4rem; font: inherit; font-size: 0.78rem; cursor: pointer; }

/* ---------------------------------------------------------------- one request */
.et-head--ok { --sev: var(--ok-line); }
.et-head--warn { --sev: var(--warn-line); }
.et-head--stop { --sev: var(--stop-line); }
.et-head--archived { --sev: #b8bec4; }
.et-step { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.et-denial { margin: 0; }
.et-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; counter-reset: stchain; }
.et-link { position: relative; counter-increment: stchain; padding: 0.6rem 0.8rem 0.6rem 2.6rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--bg); }
.et-link::before { content: counter(stchain); position: absolute; left: 0.7rem; top: 0.6rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; background: #fff; border: 2px solid #b8bec4; }
.et-link.is-done::before { background: #1d5330; border-color: #1d5330; color: #fff; }
.et-link.is-now { background: var(--warn-bg); border-color: var(--warn-line); }
.et-link.is-now::before { border-color: #7a4b00; }
.et-link__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; }
.et-link__state { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.et-sig { margin-top: 0.4rem; }
.et-sig img { display: block; max-width: 100%; width: 16rem; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 0.4rem; }
.et-chain--plain { counter-reset: stchain; }
.et-chain--plain li { counter-increment: stchain; padding: 0.35rem 0.6rem 0.35rem 2.2rem; position: relative; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--bg); }
.et-chain--plain li::before { content: counter(stchain); position: absolute; left: 0.6rem; font-weight: 700; color: var(--ink-soft); }
.et-sign .rm-pad { height: 200px; }
.et-sign { display: flex; flex-direction: column; gap: 0.8rem; }
.et-sign .etf-field { display: flex; flex-direction: column; gap: 0.35rem; }

/* ---------------------------------------------------------------- phone width */
@media (max-width: 640px) {
  .et-table thead { display: none; }
  .et-table, .et-table tbody, .et-table tr, .et-table td { display: block; width: 100%; }
  .et-table tr { margin: 0 0 0.6rem; padding: 0.5rem 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; }
  .et-table td { padding: 0.25rem 0; border: 0; }
  .et-table td[data-l]:not([data-l=""])::before { content: attr(data-l) ": "; font-weight: 700; color: var(--ink-soft); font-size: 0.75rem; }
  .et-table td:empty { display: none; }
  .et-actions .btn { flex: 1 1 6rem; justify-content: center; }
  .etf-row { flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .etf-sec { padding: 0.9rem 0.9rem 1rem; border-radius: 0.6rem; }
  .etf-range__sep { display: none; }
  .et-sig img { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .etf-drop { transition: none; } }
@media print { .et-actions, .et-sign { display: none !important; } }
.acc-ui-body input[type="email"], .acc-ui-body input[type="text"] { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.65rem; font: inherit; border: 1px solid #b8bec4; border-radius: 0.5rem; }

/* The header's facts: a wider minimum so an address ("Waiting on") is not split mid-word at desktop width. */
.et-head .rp-facts { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
