/*
 * WorthIt — page styles.
 *
 * The design system (assets/sxd/sxd.css) owns tokens and every .sxd-* component. This file
 * is the artboard's own layout — the inline styles from docs/design/_bundle/Job
 * Comparator.dc.html turned into classes, values as written there — plus one small-screen
 * rule the artboard does not have (noted at the bottom).
 */

.wi-app {
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
}

/* ---- Header ------------------------------------------------------------- */
.wi-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-6);
  height: 60px;
  background: var(--primary-900);
  color: #ffffff;
}
.wi-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary-500);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.wi-wordmark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wi-strap {
  font-size: var(--fs-13);
  color: #c3d0e2;
}
.wi-spacer {
  flex: 1;
}
.wi-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e9f0fb;
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

/* ---- Main --------------------------------------------------------------- */
.wi-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-6);
}
.wi-count {
  font-size: var(--fs-14);
  color: var(--fg-secondary);
}

/* Empty state */
.wi-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: 72px var(--sp-6);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  text-align: center;
}
.wi-empty__title {
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
}
.wi-empty__desc {
  font-size: var(--fs-14);
  color: var(--fg-secondary);
  max-width: 44ch;
}
.wi-empty__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
}

/* Table */
.wi-th--num {
  text-align: right;
}
.wi-th--kebab {
  width: 48px;
}
.wi-row {
  cursor: pointer;
}
.wi-name {
  font-weight: var(--fw-medium);
}
.wi-hl {
  padding: 3px 8px;
  border-radius: 6px;
  background: transparent;
}
.wi-hl--best {
  background: var(--status-completed-bg);
}
.wi-net {
  font-weight: var(--fw-semibold);
  color: var(--fg-link);
}
.wi-foot {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-13);
  color: var(--fg-tertiary);
  max-width: 110ch;
  line-height: var(--lh-normal);
}

/* ---- Drawer contents ---------------------------------------------------- */
.wi-intro {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-14);
  color: var(--fg-secondary);
}
.wi-section {
  margin-bottom: var(--sp-6);
}
.wi-eyebrow {
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  margin-bottom: var(--sp-3);
}
.wi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.wi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wi-field--span2 {
  grid-column: span 2;
}
.wi-help {
  font-size: var(--fs-13);
  color: var(--fg-secondary);
}
.wi-seg {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Breakdown card */
.wi-breakdown {
  padding: var(--sp-4) var(--sp-5);
}
.wi-breakdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}
.wi-breakdown__head .wi-eyebrow {
  margin-bottom: 0;
}
.wi-breakdown__row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-14);
}
.wi-breakdown__label {
  color: var(--fg-secondary);
}
.wi-breakdown__val {
  font-weight: var(--fw-regular);
  color: var(--fg-primary);
  white-space: nowrap;
}
.wi-breakdown__val--strong {
  font-weight: var(--fw-semibold);
}
.wi-breakdown__val--info {
  color: var(--fg-secondary);
}

/* Footer */
.wi-delete {
  color: var(--status-failed);
  margin-right: auto;
}

/* ---- Small screens (not in the artboard) -------------------------------- */
/* On a phone the drawer is 92vw, so two columns of inputs get too narrow to read;
 * fall back to one. Everything else is the DS's own responsive behaviour. */
@media (max-width: 560px) {
  .wi-header {
    padding: 0 var(--sp-4);
  }
  .wi-strap {
    display: none;
  }
  .wi-main {
    padding: var(--sp-4);
  }
  .wi-grid {
    grid-template-columns: 1fr;
  }
  .wi-field--span2 {
    grid-column: auto;
  }
}

/* ---- Drawer height on phones (def-001) ------------------------------------ */
/* The DS drawer is height: 100vh. On mobile browsers that is the viewport with the URL bar
 * hidden, so the footer (Cancel / Add job / Done) fell below the visible edge while the page was
 * scroll-locked. Pinning both edges sizes it to what is actually visible; dvh does the same on
 * browsers that have it. The body keeps flex: 1 + overflow-y: auto, so the form scrolls above a
 * footer that is always on screen. */
.sxd-drawer {
  top: 0;
  bottom: 0;
  height: auto;
}
@supports (height: 100dvh) {
  .sxd-drawer {
    height: 100dvh;
    bottom: auto;
  }
}
