/* Free-trial banner + post-trial modal (js/trial-banner.js).
 * Theme tokens only, so it follows light / dark / OS like the rest of the app.
 * Mounted at the top of the page's content column on every app page. */

.tb {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px 18px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-color-light);
  border-left: 3px solid var(--color-primary);
  background: linear-gradient(110deg, var(--color-primary-subtle), var(--bg-card) 62%);
  color: var(--text-primary);
}
.tb.tb-ask {
  border-left-color: var(--color-warning);
  background: linear-gradient(110deg, var(--color-warning-bg), var(--bg-card) 62%);
}

.tb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}
.tb-ask .tb-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.tb-icon svg { width: 20px; height: 20px; }

.tb-copy { min-width: 0; }
.tb-title { margin: 0 0 3px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.tb-body { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }

.tb-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--text-muted);
}
.tb-step { display: inline-flex; align-items: center; gap: 6px; }
.tb-step + .tb-step::before {
  content: "";
  width: 16px;
  height: 1px;
  margin-right: 4px;
  background: var(--border-color-light);
}
.tb-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}
.tb-step.is-done { color: var(--text-secondary); }
.tb-step.is-done .tb-dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--text-inverse);
}
.tb-step.is-next { color: var(--text-primary); font-weight: 600; }
/* "(done)" for screen readers only; the tick says it visually. */
.tb .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tb-step.is-next .tb-dot { border-color: var(--color-primary); }

.tb-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tb-cta {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none;
}
.tb-cta:hover { filter: brightness(1.05); }
.tb-ask .tb-cta { background: var(--color-warning); }
.tb-secondary { font-size: 12.5px; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 720px) {
  /* One column: the text gets the full width, and a wrapped step strip has
     no stray connector dash at the start of its second line. */
  .tb { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .tb-icon { display: none; }
  .tb-steps { gap: 6px 14px; }
  .tb-step + .tb-step::before { display: none; }
  .tb-actions { grid-column: 1 / -1; align-items: stretch; }
  .tb-cta { text-align: center; }
  .tb-secondary { text-align: center; }
}

/* ── one-time modal after the trial is used ── */
.tb-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.tb-modal-card {
  width: 100%;
  max-width: 440px;
  padding: 26px 24px 22px;
  border-radius: 16px;
  border: 1px solid var(--border-color-light);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}
.tb-modal-card .tb-title { font-size: 19px; margin-bottom: 10px; }
.tb-modal-card .tb-body { font-size: 14.5px; margin-bottom: 22px; }
.tb-modal-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-modal-row .tb-cta { flex: 1 1 auto; text-align: center; padding: 12px 18px; }
.tb-later {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-color-light);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
