/* Practice Potential booking page. Design tokens from the "Dental and Medical" system. */
:root {
  --paper: #f7f5f0;
  --band: #efeae0;
  --ink: #0f1419;
  --ink2: #4a5058;
  --blue: #5271ff;
  --blue-light: #8fa3ff;
  --tint: #e9edff;
  --cell: #f2f0eb;
  --line: rgba(15, 20, 25, 0.12);
  --red: #b23a3a;
  --white: #ffffff;
  --radius: 6px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Newsreader', Georgia, 'Times New Roman', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* Header */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.site-head img {
  display: block;
  max-height: 28px;
  width: auto;
  max-width: 60%;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(30px, 8vw, 44px);
}

h2 {
  font-size: clamp(24px, 6vw, 30px);
}

h3 {
  font-size: 22px;
}

.sub {
  margin: 10px 0 0;
  color: var(--ink2);
  font-size: 17px;
}

.intro {
  margin: 28px 0 0;
}

.intro .sub + .sub {
  margin-top: 4px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

[tabindex='-1']:focus {
  outline: none;
}

/* Picker */
.pp-picker {
  margin-top: 24px;
}

.pp-picker-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.tz {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tz label,
.field label {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

select,
input[type='text'],
input[type='email'],
input[type='url'],
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 12px;
  line-height: 1.4;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a5058' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}

textarea {
  min-height: 60px;
  resize: vertical;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 10px;
}

.cal-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
  margin: 0;
  text-align: center;
  flex: 1;
}

.nav-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.dow,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.dow span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  padding: 4px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.day,
.blank {
  min-height: 48px;
}

.day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.day .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.day:disabled {
  background: var(--cell);
  border-color: transparent;
  color: var(--ink2);
  opacity: 0.55;
  cursor: default;
}

.day:disabled .dot {
  display: none;
}

.day.today {
  font-weight: 700;
}

.day[aria-pressed='true'] {
  background: var(--tint);
  border-color: var(--blue);
  font-weight: 700;
}

.day:not(:disabled):hover {
  border-color: var(--blue-light);
}

.status {
  margin: 12px 0 0;
  color: var(--ink2);
  font-size: 15px;
  min-height: 1.5em;
}

.status.error {
  color: var(--red);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 6px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

/* Slots */
.slots {
  min-width: 0;
}

.slots h3 {
  margin-bottom: 4px;
}

.slots .note {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink2);
}

.slot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.slot {
  width: 100%;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.slot .et {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink2);
}

.slot:hover {
  border-color: var(--blue-light);
}

.slot[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.slot[aria-pressed='true'] .et {
  color: rgba(255, 255, 255, 0.85);
}

/* Form */
.form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}

.chosen {
  margin: 8px 0 10px;
  padding: 8px 14px;
  background: var(--band);
  border-radius: var(--radius);
  font-weight: 600;
}

.chosen small {
  display: block;
  font-weight: 400;
  color: var(--ink2);
  font-size: 14px;
}

/* Tight on purpose: the form sits in a frame on contact.html and should
   need as little scrolling as possible (Mike, 2026-11-10). */
.field {
  margin-bottom: 8px;
}
/* Name + Email and Practice + Practice website share a row once the form is
   wide enough (the contact page card at desktop width); phones stay single
   column. Measured against the form, not the viewport, since the embed
   width is the parent's choice. */
.form {
  container-type: inline-size;
}
@container (min-width: 440px) {
  .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
}

.field label {
  display: block;
  margin-bottom: 2px;
}

.opt {
  font-weight: 400;
  color: var(--ink2);
}

.err {
  margin: 6px 0 0;
  min-height: 0;
  font-size: 14px;
  color: var(--red);
}

.err:empty {
  display: none;
}

input[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--red);
}

.form-error {
  margin: 0 0 14px;
  color: var(--red);
  font-weight: 500;
}

.form-error:empty {
  display: none;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#pp-turnstile {
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #4361ee;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.secondary:hover {
  background: var(--cell);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.form .btn {
  width: 100%;
}

/* Confirmation */
.confirm {
  margin-top: 8px;
  max-width: 560px;
}

.confirm .msg {
  margin: 0;
  font-size: 18px;
}

.confirm .msg:focus {
  outline: none;
}

.details {
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.details div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.details dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  padding-top: 2px;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.details dd small {
  display: block;
  color: var(--ink2);
}

.details a {
  color: var(--ink);
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Wider screens: calendar and slots side by side */
@media (min-width: 760px) {
  .wrap {
    padding: 32px 24px 64px;
  }

  /* Centered: the slot column takes no room while it is hidden, so the
     calendar sits in the middle until a day is picked, then the slots open
     to its right. */
  .pp-picker-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 40px;
    align-items: flex-start;
  }

  /* Full row of its own, with the label and select centered as a 380px block. */
  .tz {
    flex: 0 0 100%;
    align-items: center;
  }

  .tz label,
  .tz select {
    width: 100%;
    max-width: 380px;
  }

  .cal {
    flex: 0 1 380px;
    max-width: 380px;
  }

  .slots {
    flex: 1 1 300px;
  }

  .intro-block {
    text-align: center;
  }

  .form,
  .confirm {
    margin-left: auto;
    margin-right: auto;
  }

  .slot-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form .btn {
    width: auto;
  }
}

/* Embedded in thepracticepotential.com */
html.embed body {
  min-height: 0;
}

html.embed .wrap {
  padding: 0 0 8px;
  max-width: none;
}

html.embed .site-head {
  display: none;
}

/* The embedding page (website-intake.html trial section) carries its own
   heading and lede for the scheduler, so the app's would show twice. */
html.embed .intro-block {
  display: none;
}

/* Room above the time list and the form when they are scrolled to the top.
   Embedded, contact.html shows a 53 px sticky "Schedule a Call" bar once the
   page has scrolled, so the margin clears it (measured 2026-11-10). */
.pp-picker .slots,
.form {
  scroll-margin-top: 16px;
}
html.embed .pp-picker .slots,
html.embed .form {
  scroll-margin-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Manage page */
#pp-manage-app main {
  max-width: 640px;
}

#pp-manage-app .status {
  margin-top: 16px;
}

.msg {
  margin: 16px 0 0;
  font-size: 17px;
}

.msg a {
  color: var(--ink);
  font-weight: 600;
}

.manage-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.manage-panel .btn-row {
  margin-top: 16px;
}

.manage-confirm {
  margin-top: 20px;
}

.counter {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink2);
  text-align: right;
}

.btn.danger {
  background: var(--red);
}

.btn.danger:hover {
  background: #9a2f2f;
}

#pp-manage-app .btn-row .btn {
  flex: 1 1 100%;
}

@media (min-width: 560px) {
  #pp-manage-app .btn-row .btn {
    flex: 0 0 auto;
  }
}

/* In-office training page: practice roster picker, cc chips, address choices. */
.field-roster {
  position: relative;
}

.roster-list {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 2px 0 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15, 20, 25, 0.12);
}

.roster-list[hidden] {
  display: none;
}

.roster-list li {
  padding: 8px 12px;
  cursor: pointer;
}

.roster-list li:hover,
.roster-list li[aria-selected='true'] {
  background: var(--tint);
}

.hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink2);
}

.hint:empty {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chips:empty {
  display: none;
}

.chips .chip {
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--blue-light);
  border-radius: 999px;
  cursor: pointer;
}

.chips .chip:hover {
  border-color: var(--blue);
}

.choices {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.choices label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}

/* Roster picker second line (the doctor), a used staff chip, and the box
   that opens under a choice list's "Other". */
.roster-list li small {
  display: block;
  font-size: 13px;
  color: var(--ink2);
}

.chips .chip:disabled {
  opacity: 0.5;
  cursor: default;
}

.field select + input[type='text'] {
  margin-top: 6px;
}
