/* My Day (app/myday.js). Uses the brand variables from brand-*.css, like app.css. */

/* Photos | My Day tabs, under the band */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs button {
  border: 0; background: none; padding: 13px 4px 10px; border-bottom: 4px solid transparent; color: var(--muted);
  font: var(--label-style) var(--label-weight) 14px/1.2 var(--font-label); letter-spacing: var(--label-spacing); text-transform: uppercase;
}
.tabs button[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: -3px; }

/* Segmented buttons: Today/Yesterday, time-off type, availability answers */
.md-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.md-seg button {
  min-height: 48px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface); color: var(--text);
  font: var(--label-weight) 15px/1.1 var(--font-label); letter-spacing: .04em; padding: 6px 4px;
}
.md-seg button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.md-seg button:focus-visible, .md-chip:focus-visible, .md-step:focus-visible, .md-open:focus-visible, .md-x:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* The day: one card per job */
.md-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.md-job { position: relative; }
.md-open {
  all: unset; box-sizing: border-box; width: 100%; min-height: 84px; padding: 12px 52px 12px 14px; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline;
  background: var(--surface); border: 2px solid var(--border); border-left-width: 6px; border-radius: var(--radius);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.md-open:active { background: var(--surface-2); }
.md-job.done .md-open { border-left-color: var(--ok); }
.md-job:not(.done):not(.maybe) .md-open { border-left-color: var(--accent); }
.md-job.maybe .md-open { border-style: dashed; border-left-style: solid; }
.md-name { font: var(--label-weight) 17px/1.25 var(--font-label); overflow-wrap: anywhere; }
.md-hrs { font: var(--head-style) var(--head-weight) 22px/1 var(--font-head); white-space: nowrap; }
.md-where { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.md-what { grid-column: 1 / -1; font-size: 15px; overflow-wrap: anywhere; }
.md-job:not(.done):not(.maybe) .md-what { color: var(--accent-strong); font-weight: 600; }
.md-job.maybe .md-what { color: var(--muted); }
.md-x {
  position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none;
  color: var(--muted); font-size: 24px; line-height: 1; border-radius: 50%;
}
.md-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; border-top: 2px solid var(--border); }
.md-total span { font: var(--label-style) var(--label-weight) 14px/1 var(--font-label); letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--muted); }
.md-total b { font: var(--head-style) var(--head-weight) 26px/1 var(--font-head); }
.md-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.md-more .big { font-size: 17px; min-height: 56px; }
.md-picker { display: grid; gap: 10px; padding: 12px; background: var(--surface-2); border: 2px solid var(--border); border-radius: var(--radius); }
.md-row { display: flex; gap: 8px; }
.md-row input { flex: 1; min-width: 0; }
.md-go {
  flex: none; min-height: 52px; padding: 0 18px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink);
  font: var(--head-style) var(--head-weight) 17px/1 var(--font-head); text-transform: uppercase; letter-spacing: var(--head-spacing);
}
.md-other { display: grid; gap: 6px; }

/* One job */
.job-chip .md-back { border: 0; background: none; font-size: 15px; padding-left: 0; margin-left: 0; }
.md-jobtitle { text-transform: none; font-size: 24px; overflow-wrap: anywhere; }
.md-hours { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 10px; }
.md-hours output { text-align: center; font: var(--head-style) var(--head-weight) 40px/1 var(--font-head); }
.md-step {
  height: 64px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface); color: var(--text);
  font: 600 32px/1 var(--font-body);
}
.md-step:active { background: var(--surface-2); }
.md-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.md-chip {
  min-height: 60px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface); color: var(--text);
  font: var(--label-weight) 16px/1.15 var(--font-label); padding: 8px 10px; text-align: center;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.md-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.md-chip[aria-pressed="true"]::before { content: "✓ "; }
.md-input {
  width: 100%; min-height: 56px; padding: 12px 14px; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--surface); color: var(--text); font: 400 18px/1.2 var(--font-body);
}
.md-input:focus { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* Day off and availability */
.md-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md-field { display: grid; gap: 6px; }
.md-types { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.md-list, .md-avail { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; }
.md-status { font-weight: 600; color: var(--muted); white-space: nowrap; }
.md-status.ok { color: var(--ok); }
.md-status.bad { color: var(--danger); }
.md-avail li { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; }
.md-avail li > span { font: var(--label-weight) 15px/1.2 var(--font-label); }
.md-avail li.wk > span { color: var(--muted); }
.md-ans button { min-height: 44px; font-size: 14px; }
@media (max-width: 360px) { .md-avail li { grid-template-columns: 1fr; } }

/* Split and after hours (one job) */
.md-ah { justify-self: start; min-height: 48px; padding: 8px 14px; }
select.md-input { appearance: auto; }

/* Billing (managers) */
.md-bitotals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.md-bitotals div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: grid; gap: 2px; }
.md-bitotals span { font: var(--label-weight) 12px/1.2 var(--font-label); letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--muted); }
.md-bitotals b { font: var(--head-style) var(--head-weight) 22px/1.1 var(--font-head); }
.md-bitotals small { color: var(--muted); font-size: 13px; }
.md-bill { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.md-bjob { background: var(--surface); border: 2px solid var(--border); border-left-width: 6px; border-left-color: var(--ok); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; }
.md-bjob.fixed { border-left-color: var(--muted); }
.md-bhead { display: flex; gap: 10px; align-items: baseline; }
.md-badge { margin-left: auto; font: var(--label-weight) 12px/1 var(--font-label); letter-spacing: var(--label-spacing); text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.md-blines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.md-blines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; }
.md-blines li span:nth-child(2) { color: var(--muted); text-align: right; }
.md-bsum { margin: 0; font-size: 15px; }
.md-flags { list-style: none; margin: 0; padding: 8px 10px; font-size: 14px; color: var(--danger); background: var(--surface-2); border-radius: var(--radius); display: grid; gap: 4px; }

/* Clock in / out card (top of today's My Day) */
.md-clock { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); }
.md-clockstate { display: flex; gap: 12px; align-items: center; }
.md-clockstate div { display: grid; gap: 2px; }
.md-clockstate b { font: var(--label-weight) 18px/1.2 var(--font-label); }
.md-clockstate span { font-size: 14px; color: var(--muted); }
.md-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); flex: none; animation: pulse 2s ease-in-out infinite; }
.md-clock .md-two .big { min-height: 60px; font-size: 18px; }
.md-practice { margin: 0; padding: 8px 10px; font-size: 13px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border); color: var(--muted); }
.md-reason { display: grid; gap: 8px; }
