/* break.css -- the Break reminders sheet + the top-bar driving-clock pill +
 * the in-list break alert card. */

/* ---------- sheet ---------- */
.bk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.45);
}

.bk-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  overflow-y: auto;
  background: var(--surface, #ffffff);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: var(--shadow-2, 0 8px 30px rgba(20, 24, 29, 0.18));
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.bk-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}

.bk-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 40px;
}

.bk-clock {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim, #5b6470);
}

.bk-field { margin-bottom: 14px; }
.bk-field--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bk-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint, #8a93a0);
  margin-bottom: 8px;
}
.bk-field--row .bk-label { margin-bottom: 0; }

.bk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill, 999px);
  font-weight: 700;
  background: var(--surface-2, #f0f2f5);
  color: var(--text-dim, #5b6470);
}
.bk-chip.is-active {
  background: var(--brand, #2f6df0);
  color: var(--brand-ink, #ffffff);
}

/* toggle */
.bk-toggle {
  position: relative;
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: var(--border-strong, #cdd3dc);
  transition: background 0.15s ease;
}
.bk-toggle.is-on { background: var(--brand, #2f6df0); }
.bk-toggle:disabled { opacity: 0.5; }
/* A switch should look like a switch, so the track stays 58x34 -- a transparent
   overlay carries the 44px hit area instead. Width is already past 44. */
.bk-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 44px;
  transform: translateY(-50%);
}
.bk-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: left 0.15s ease;
}
.bk-toggle.is-on .bk-knob { left: 27px; }

.bk-hint {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ps-tier-ok, #d97706);
  margin-bottom: 10px;
}

.bk-note {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-dim, #5b6470);
  margin-bottom: 14px;
}

.bk-actions { display: flex; flex-direction: column; gap: 10px; }
.bk-reset {
  min-height: var(--tap, 48px);
  border-radius: var(--radius-pill, 999px);
  font-weight: 700;
  background: var(--surface-2, #f0f2f5);
  color: var(--text, #15181d);
}
.bk-done {
  min-height: var(--tap, 48px);
  border-radius: var(--radius-pill, 999px);
  font-weight: 800;
  background: var(--brand, #2f6df0);
  color: var(--brand-ink, #ffffff);
}

/* ---------- top-bar driving-clock pill ---------- */
.tb-clock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 12px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--surface-2, #f0f2f5);
  color: var(--text-dim, #5b6470);
  white-space: nowrap;
}
/* The pill reads as a quiet 32px clock next to the trip label; the transparent
   overlay gives the thumb 44px without swelling the status row. */
.tb-clock::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 44px;
  transform: translateY(-50%);
}
.tb-clock[data-mood="soon"] {
  background: var(--ps-tier-ok-bg, rgba(217, 119, 6, 0.12));
  color: var(--ps-tier-ok, #d97706);
}
.tb-clock[data-mood="due"] {
  background: var(--ps-tier-poor-bg, rgba(220, 38, 38, 0.12));
  color: var(--ps-tier-poor, #dc2626);
}

/* ---------- in-list break alert card ---------- */
.ps-break {
  flex: none;
  margin: 0 12px 10px;
  padding: 10px 14px 12px;
  border-radius: var(--radius, 14px);
  background: var(--ps-tier-ok-bg, rgba(217, 119, 6, 0.12));
  border: 1px solid var(--ps-tier-ok, #d97706);
}
.ps-break[data-level="due"] {
  background: var(--ps-tier-poor-bg, rgba(220, 38, 38, 0.12));
  border-color: var(--ps-tier-poor, #dc2626);
}

.ps-break-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ps-break-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ps-tier-ok, #d97706);
}
.ps-break[data-level="due"] .ps-break-title { color: var(--ps-tier-poor, #dc2626); }
.ps-break-x {
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0; /* bigger hit area without inflating the card */
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--text-dim, #5b6470);
}

.ps-break-body { margin-top: 4px; cursor: pointer; }
.ps-break-name { font-weight: 700; font-size: 1rem; display: block; }
.ps-break-meta {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--text-dim, #5b6470);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-break-actions { display: flex; gap: 8px; margin-top: 10px; }
.ps-break-btn {
  flex: 1 1 auto;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface, #ffffff);
  color: var(--text-dim, #5b6470);
}
.ps-break-btn--took {
  background: var(--brand, #2f6df0);
  color: var(--brand-ink, #ffffff);
}
