:root {
  color-scheme: light;
  --ink: #15181d;
  --muted: #667085;
  --line: #dde3eb;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --tim-gold: #d6a500;
  --blue: #536dfe;
  --blue-dark: #3846cf;
  --green: #5abf84;
  --danger: #a62e25;
  --shadow: 0 24px 60px rgba(23, 33, 43, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto;
}

.page-header {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 34px;
  text-align: center;
}

.page-header img {
  width: 64px;
  height: auto;
}

.page-header p,
.page-header span {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.scheduler {
  display: grid;
  grid-template-columns: 300px minmax(300px, 1fr) 300px;
  overflow: hidden;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.scheduler[hidden],
.thank-you-panel[hidden] {
  display: none;
}

.meeting-details,
.calendar-panel,
.time-panel,
.booking-panel {
  min-width: 0;
  padding: 34px;
}

.meeting-details,
.calendar-panel {
  border-right: 1px solid var(--line);
}

.meeting-details h2,
.panel-header h2,
.info-block h3 {
  margin: 0;
  letter-spacing: 0;
}

.meeting-details h2,
.panel-header h2 {
  font-size: 1.05rem;
}

.meeting-details p,
.muted,
.status-line,
.info-block p,
.info-block li {
  color: var(--muted);
  line-height: 1.5;
}

.meeting-details > p {
  margin: 0 0 28px;
}

fieldset {
  padding: 0;
  border: 0;
  margin: 0 0 28px;
}

legend,
label span,
.panel-header span,
.selected-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.duration-control,
.format-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.duration-control {
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.duration-control input,
.format-control input {
  position: absolute;
  opacity: 0;
}

.duration-control span,
.format-control span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 999px;
  color: var(--ink);
}

.duration-control span {
  min-width: 48px;
}

.format-control span {
  border: 1px solid var(--line);
  padding: 0 14px;
}

.duration-control input:checked + span {
  background: #000000;
  color: #ffffff;
}

.format-control input:checked + span {
  border-color: var(--blue);
  background: #eef1ff;
  color: var(--blue-dark);
}

.info-block {
  margin-top: 24px;
}

.info-block h3 {
  font-size: 0.95rem;
}

.info-block ul {
  padding-left: 18px;
  margin: 8px 0 0;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.month-actions {
  display: inline-flex;
  gap: 8px;
}

.month-actions button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f3fa;
  color: var(--blue);
  font-size: 1.5rem;
  line-height: 1;
}

.month-actions button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.45;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weekday-row {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.calendar-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #98a2b3;
  font-weight: 750;
}

.calendar-grid button.is-available {
  color: var(--ink);
}

.calendar-grid button.is-selected {
  background: var(--blue);
  color: #ffffff;
}

.calendar-grid button:disabled {
  cursor: not-allowed;
}

.time-list {
  display: grid;
  gap: 10px;
}

.time-list button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f1f2fb;
  color: var(--blue);
  font-weight: 850;
}

.time-list button::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
  transform: translateY(-50%);
}

.time-list button.is-selected {
  background: var(--blue);
  color: #ffffff;
}

.time-list button.is-selected::after {
  background: #ffffff;
}

.booking-panel {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.booking-form {
  display: grid;
  gap: 18px;
}

.selected-summary {
  display: grid;
  gap: 2px;
}

.selected-summary strong {
  font-size: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--tim-gold);
  box-shadow: 0 0 0 3px rgba(214, 165, 0, 0.25);
  outline: none;
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 850;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled {
  background: #d0d5dd;
  color: #8b95a1;
  cursor: not-allowed;
}

.status-line {
  min-height: 22px;
  margin: 0;
}

.success {
  color: #1f7a4d;
  font-weight: 800;
}

.warning {
  color: var(--danger);
  font-weight: 800;
}

.thank-you-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.thank-you-panel img {
  width: 84px;
  height: auto;
}

.thank-you-panel h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.thank-you-panel p {
  margin: 0;
  color: var(--muted);
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.thank-you-actions button,
.thank-you-actions a {
  min-width: 180px;
}

@media (max-width: 960px) {
  .scheduler {
    grid-template-columns: 1fr;
  }

  .meeting-details,
  .calendar-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meeting-details,
  .calendar-panel,
  .time-panel,
  .booking-panel {
    padding: 24px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1120px);
    margin-top: 18px;
  }

  .page-header {
    margin-bottom: 22px;
  }

  .panel-header {
    flex-direction: column;
  }

  .weekday-row,
  .calendar-grid {
    gap: 6px;
  }
}
