/* HubSpot implementation cost calculator (CHK-271). Tokens only (global.css),
   so light and dark themes follow. The email form copies the .geo-form look
   (css/geo.css) so the page does not load all of geo.css. */

.ce-wrap { max-width: 1040px; margin-inline: auto; }
.ce-title { margin-bottom: var(--space-lg); }
.ce-noscript { font-size: 1rem; color: var(--text-secondary); margin-bottom: var(--space-lg); }
.ce-noscript a { color: var(--accent); text-decoration: underline; }
.ce-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
@media (max-width: 860px) { .ce-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Inputs ---------- */
.ce-inputs { display: grid; gap: var(--space-lg); min-width: 0; }
.ce-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.ce-group legend, .ce-label { display: block; font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); margin-bottom: var(--space-sm); padding: 0; }
.ce-options { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.ce-options--stack { flex-direction: column; }
.ce-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.ce-opt:hover { border-color: var(--accent); }
.ce-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-subtle); }
.ce-opt input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.ce-opt input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ce-hint { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.375rem; }
.ce-hint--error { color: #b42318; }
[data-theme="dark"] .ce-hint--error { color: #f97066; }

.ce-input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ce-input--seats { max-width: 10rem; }
.ce-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.ce-input[aria-invalid="true"] { border-color: #b42318; }

/* ---------- Result ---------- */
.ce-side { display: grid; gap: var(--space-lg); min-width: 0; }
.ce-result {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
}
.ce-result__title { font-size: 1.25rem; margin-bottom: var(--space-md); }
.ce-rows { margin: 0; display: grid; gap: var(--space-md); }
.ce-row { display: grid; gap: 0.125rem; padding-bottom: var(--space-md); border-bottom: 1px solid var(--border); }
.ce-row dt { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.ce-row dd { margin: 0; display: grid; gap: 0.125rem; }
.ce-value { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ce-row--lead .ce-value, .ce-row--total .ce-value { font-size: 1.75rem; }
.ce-row--total { border-bottom: 0; padding-bottom: 0; }
.ce-basis { font-size: 0.875rem; line-height: 1.5; color: var(--text-secondary); }
.ce-note { font-size: 0.875rem; line-height: 1.5; color: var(--text-primary); margin-top: var(--space-md); padding-left: var(--space-sm); border-left: 3px solid var(--accent); }
.ce-disclaimer { font-size: 0.8125rem; line-height: 1.5; color: var(--text-muted); margin-top: var(--space-md); }
.ce-print { margin-top: var(--space-md); min-height: 44px; }
/* The inputs, as the visitor chose them: filled just before printing, shown only in print. */
.ce-summary { display: none; }

/* ---------- Email form (as .geo-form) ---------- */
.ce-form {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: var(--space-md);
}
.ce-form__title { font-size: 1.25rem; }
.ce-form__sub { color: var(--text-secondary); font-size: 0.9375rem; margin-top: calc(-1 * var(--space-sm)); }
.ce-form__field { display: grid; gap: 0.375rem; min-width: 0; }
.ce-form__label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
.ce-form__submit { justify-self: start; min-height: 44px; }
.ce-form__submit:disabled { opacity: 0.6; cursor: progress; }
.ce-form__status { font-size: 0.875rem; min-height: 1.25em; }
.ce-form__status[data-state="error"] { color: #b42318; }
.ce-form__status[data-state="success"] { color: var(--accent); font-weight: 500; }
[data-theme="dark"] .ce-form__status[data-state="error"] { color: #f97066; }
.ce-form__privacy-line { font-size: 0.75rem; color: var(--text-muted); }
.ce-form__privacy-line a { color: inherit; text-decoration: underline; }
.ce-form__booklink a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ce-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .ce-form__submit { justify-self: stretch; } }

/* ---------- Scoping-call scheduler (#book, the /geo pattern) ---------- */
#book { scroll-margin-top: var(--nav-height); }
.ce-book {
  max-width: 820px;
  margin-inline: auto;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ce-book__title { margin-bottom: var(--space-sm); }
.ce-book__sub { font-size: 1rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: var(--space-lg); }
.ce-book .meetings-iframe-container { width: 100%; min-height: 720px; }
.ce-book .meetings-iframe-container iframe { width: 100% !important; min-width: 100% !important; min-height: 720px; height: auto; border: 0; display: block; }
@media (max-width: 640px) {
  .ce-book { padding: var(--space-md); }
  .ce-book .meetings-iframe-container,
  .ce-book .meetings-iframe-container iframe { min-height: 1040px; }
}

/* ---------- Print or save as PDF: the inputs summary and the result card only ---------- */
@media print {
  body > *:not(main),
  main > :not(#calculator),
  #calculator .ce-title,
  #calculator noscript,
  #calculator .ce-inputs,
  #calculator .ce-form,
  .ce-print,
  .ce-note[hidden] { display: none !important; }
  #calculator { padding: 0; background: none; }
  .ce-grid { display: block; }
  .ce-result { border: 0; padding: 0; break-inside: avoid; }
  .ce-summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0 0 1rem; font-size: 0.875rem; }
  .ce-summary dt { font-weight: 600; }
  .ce-summary dd { margin: 0; }
}
