/* ============================================================
   CDI Breath Test Timer — Stylesheet
   Scoped under .cdi-breath-timer to avoid theme conflicts
   ============================================================ */

.cdi-breath-timer *,
.cdi-breath-timer *::before,
.cdi-breath-timer *::after {
  box-sizing: border-box;
}

.cdi-breath-timer {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a2e;
  max-width: 700px;
  margin: 0 auto;
}

/* ── Outer wrapper ── */
.cdi-btt-wrap {
  background: #f0f6f9;
  border-radius: 16px;
  padding: 20px 16px 36px;
}

/* ── Header ── */
.cdi-btt-header {
  position: relative;
  background: linear-gradient(135deg, #0b4f6c, #0d6a8f);
  border-radius: 14px;
  padding: 26px 30px 22px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(11, 79, 108, .18);
}

.cdi-btt-header-bg-circle {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(94, 199, 212, .08);
  pointer-events: none;
}

.cdi-btt-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #5ec7d4;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.cdi-btt-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -.3px;
  line-height: 1.2;
}

.cdi-btt-subtitle {
  color: #a8d8e8;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  max-width: 460px;
}

/* ── Step bar ── */
.cdi-btt-steps {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 4px;
}

.cdi-btt-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cdi-btt-step.done {
  cursor: pointer;
}

.cdi-btt-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #c8dee7;
  color: #8aaebf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.cdi-btt-step.active .cdi-btt-step-dot {
  background: #0b4f6c;
  color: #fff;
}

.cdi-btt-step.done .cdi-btt-step-dot {
  background: #5ec7d4;
  color: #fff;
}

.cdi-btt-step-label {
  font-size: 12px;
  font-weight: 400;
  color: #7a9aab;
  white-space: nowrap;
}

.cdi-btt-step.active .cdi-btt-step-label {
  font-weight: 700;
  color: #0b4f6c;
}

.cdi-btt-step.done .cdi-btt-step-label {
  color: #5ec7d4;
}

.cdi-btt-step-line {
  flex: 1;
  height: 2px;
  background: #c8dee7;
  margin: 0 10px;
  border-radius: 2px;
  transition: background .3s;
}

.cdi-btt-step-line.done {
  background: #5ec7d4;
}

/* ── Shared prompt ── */
.cdi-btt-prompt {
  font-size: 13px;
  color: #5b7a8a;
  font-weight: 500;
  margin: 0 0 14px;
}

/* ── Step 1: test grid ── */
.cdi-btt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cdi-btt-card {
  background: #fff;
  border: 2px solid #c8dee7;
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 2px 6px rgba(11, 79, 108, .04);
  width: 100%;
}

.cdi-btt-card:hover {
  border-color: #0b4f6c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 79, 108, .10);
}

.cdi-btt-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #0b4f6c;
  margin-bottom: 6px;
  line-height: 1.3;
}

.cdi-btt-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-kit     { background: #d1e8f0; color: #0b4f6c; }
.badge-samples { background: #eef8fb; color: #0d6a8f; }
.badge-time    { background: #fff4e5; color: #92400e; }

.cdi-btt-card-mixed {
  font-size: 10px;
  color: #b45309;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Step 2: selected bar + time input ── */
.cdi-btt-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #e8f5f8;
  border: 1.5px solid #b8dce8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.cdi-btt-selected-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.cdi-btt-selected-info {
  flex: 1;
}

.cdi-btt-selected-name {
  font-size: 14px;
  font-weight: 700;
  color: #0b4f6c;
}

.cdi-btt-selected-meta {
  font-size: 11px;
  color: #5b7a8a;
  margin-top: 2px;
}

.cdi-btt-change {
  background: transparent;
  border: 1.5px solid #b8dce8;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #0b4f6c;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s;
}

.cdi-btt-change:hover {
  border-color: #0b4f6c;
}

.cdi-btt-time-card {
  background: #fff;
  border: 2px solid #c8dee7;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(11, 79, 108, .05);
}

.cdi-btt-time-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #5b7a8a;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cdi-btt-time-input {
  font-size: 36px;
  font-weight: 700;
  color: #0b4f6c;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  letter-spacing: 1px;
  padding: 0;
}

.cdi-btt-end-preview {
  font-size: 12px;
  color: #8aaebf;
  margin: 8px 0 0;
}

.cdi-btt-end-preview strong {
  color: #0b4f6c;
}

/* ── Shared buttons ── */
.cdi-btt-btn-primary {
  display: block;
  width: 100%;
  background: #0b4f6c;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  font-family: inherit;
}

.cdi-btt-btn-primary:hover,
.cdi-btt-btn-primary:focus {
  background: #0d6088;
}

.cdi-btt-btn-primary.saved {
  background: #16a34a;
}

.cdi-btt-btn-secondary {
  background: #fff;
  color: #0b4f6c;
  border: 2px solid #c8dee7;
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s;
  white-space: nowrap;
  font-family: inherit;
}

.cdi-btt-btn-secondary:hover,
.cdi-btt-btn-secondary:focus {
  border-color: #0b4f6c;
}

/* ── Step 3: summary banner ── */
.cdi-btt-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0b4f6c, #0d6a8f);
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(11, 79, 108, .15);
}

.cdi-btt-summary-kit {
  font-size: 10px;
  font-weight: 800;
  color: #5ec7d4;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.cdi-btt-summary-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.2;
}

.cdi-btt-summary-times {
  font-size: 12px;
  color: #a8d8e8;
}

.cdi-btt-summary-times strong {
  color: #fff;
}

.cdi-btt-summary-right {
  text-align: right;
}

.cdi-btt-summary-count {
  font-size: 28px;
  font-weight: 800;
  color: #5ec7d4;
  line-height: 1;
}

.cdi-btt-summary-meta,
.cdi-btt-summary-duration {
  font-size: 11px;
  color: #a8d8e8;
}

.cdi-btt-summary-duration {
  margin-top: 4px;
}

/* ── Callout / warning bars ── */
.cdi-btt-warning {
  background: #fff8e7;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
}

.cdi-btt-divider {
  background: #fff8e7;
  padding: 6px 14px;
  font-size: 11px;
  color: #92400e;
  font-weight: 600;
  border-bottom: 1px solid #fde68a;
}

/* ── Schedule table ── */
.cdi-btt-col-header {
  display: grid;
  grid-template-columns: 44px 68px 120px 60px 1fr;
  padding: 10px 14px;
  background: #dce9ef;
  border-radius: 12px 12px 0 0;
}

.cdi-btt-col-header span {
  font-size: 10px;
  font-weight: 800;
  color: #0b4f6c;
  letter-spacing: 1.4px;
}

.cdi-btt-table {
  border: 1.5px solid #c8dee7;
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
}

.cdi-btt-row {
  display: grid;
  grid-template-columns: 44px 68px 120px 60px 1fr;
  padding: 11px 14px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #e8eef2;
}

.cdi-btt-row:last-child {
  border-bottom: none;
}

.cdi-btt-row.baseline { background: #eef8fb; }
.cdi-btt-row.even     { background: #fff; }
.cdi-btt-row.odd      { background: #f8fbfc; }

.cdi-btt-tube {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d1e8f0;
  color: #0b4f6c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.cdi-btt-tube.baseline {
  background: #0b4f6c;
  color: #fff;
}

.cdi-btt-min {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.cdi-btt-collect {
  font-size: 20px;
  font-weight: 800;
  color: #0b4f6c;
  letter-spacing: -.5px;
}

.cdi-btt-gap {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.cdi-btt-note {
  font-size: 11px;
  line-height: 1.6;
}

.note-blue  { color: #0d6a8f; font-weight: 600; }
.note-amber { color: #b45309; font-weight: 700; }

/* ── Actions row ── */
.cdi-btt-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.cdi-btt-actions .cdi-btt-btn-primary {
  flex: 1;
}

/* ── Footer disclaimer ── */
.cdi-btt-disclaimer {
  font-size: 11px;
  color: #8aaebf;
  line-height: 1.7;
  text-align: center;
  margin: 0;
}

.cdi-btt-disclaimer strong {
  color: #5b7a8a;
}

/* ── Responsive: stack to single column on small screens ── */
@media (max-width: 480px) {
  .cdi-btt-grid {
    grid-template-columns: 1fr;
  }

  .cdi-btt-col-header,
  .cdi-btt-row {
    grid-template-columns: 36px 60px 100px 50px 1fr;
  }

  .cdi-btt-collect {
    font-size: 16px;
  }

  .cdi-btt-time-input {
    font-size: 28px;
  }
}
