/* GENERATED from shared/design/components.css - edit there */
/* Shared components. Colours and sizes come from tokens.css only. */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: var(--tap); padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 600 var(--fs-body)/1 var(--font); cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--hairline); }
.btn-quiet { background: transparent; color: var(--text); }
.btn-quiet:hover { background: var(--hairline); }

.segmented {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--track); border-radius: var(--r-sm);
}
.segmented-option {
  min-height: var(--tap); min-width: var(--tap); padding: 0 16px;
  border: 0; border-radius: 10px; background: transparent;
  font: 500 var(--fs-body)/1 var(--font); color: var(--text-2); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.segmented-option[aria-checked="true"] {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 38, 0.18);
}

.switch {
  position: relative; flex: none; width: 52px; height: 32px; padding: 0;
  border: 0; border-radius: 16px; background: var(--track); cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 28px; height: 28px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 38, 0.3);
  transition: transform var(--dur) var(--ease);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch::before { content: ""; position: absolute; inset: -6px -0px; } /* 44px touch target */

.glass-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; box-sizing: border-box; padding: 0 8px 0 20px;
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  background: var(--glass); box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}

.sheet-backdrop { position: fixed; inset: 0; background: rgba(2, 2, 14, 0.62); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet {
  box-sizing: border-box; width: 100%; padding: 12px 20px 36px;
  background: var(--surface); color: var(--text);
  border-top: 1px solid var(--hairline); border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-2);
  max-height: 90vh; overflow-y: auto;
  animation: sheet-in 350ms var(--ease);
}
.sheet-grabber { width: 40px; height: 5px; margin: 0 auto 20px; border-radius: 3px; background: var(--track); }
@media (min-width: 768px) {
  .sheet-backdrop { align-items: center; }
  .sheet { max-width: 520px; padding: 28px 28px 32px; border: 1px solid var(--hairline); border-radius: var(--r-lg); }
  .sheet-grabber { display: none; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.inset-list { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.inset-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; box-sizing: border-box; padding: 10px 20px;
  border-top: 1px solid var(--hairline);
}
.inset-row:first-child { border-top: 0; }
.inset-row .row-label { font-size: var(--fs-body); font-weight: 500; color: var(--text); }
.inset-row .row-sub { font-size: var(--fs-body); font-weight: 400; color: var(--text-2); line-height: 1.3; }

.chip, .label {
  font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: var(--r-pill); background: var(--hairline); color: var(--text);
}
.chip--good { background: var(--good-bg); color: var(--good); }
.chip--muted { background: var(--surface-2); color: var(--text-2); }
.chip--accent { background: var(--accent); color: var(--on-accent); }
.label { color: var(--text-2); }

.card {
  box-sizing: border-box; padding: 18px 20px;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md);
}

.field {
  box-sizing: border-box; min-height: 52px; width: 100%; padding: 0 16px;
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font: 400 var(--fs-body)/1.2 var(--font);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field::placeholder { color: var(--text-2); }
.field:focus { outline: none; border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(248, 147, 31, 0.18); }
.field[aria-invalid="true"] { border-color: var(--danger); }

.ring-progress { /* 452.4 below = 2*pi*72: needs an SVG with viewBox 0 0 168 168 and circles r=72 */ position: relative; display: inline-grid; place-items: center; width: 168px; height: 168px; }
.ring-progress svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-progress .ring-track { fill: none; stroke: var(--track); stroke-width: 12; }
.ring-progress .ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 452.4; stroke-dashoffset: calc(452.4 * (1 - var(--progress, 0)));
  transition: stroke-dashoffset 350ms var(--ease);
}
.ring-progress .ring-value { position: absolute; font-size: var(--fs-h3); font-weight: 700; color: var(--text); }
