.hc-appointment {
  --hc-navy: #17345c;
  --hc-border: #b9cddd;
  --hc-salmon: #f6aa98;
  --hc-burgundy: #800020;
  --hc-focus: #205e95;
  max-width: 1280px;
  margin: 3rem auto 5rem;
  padding-top: 2rem;
  color: var(--hc-navy);
}

.hc-appointment__form {
  padding-bottom: 3rem;
}

.hc-appointment__same-day-card {
  padding: 1rem 1.25rem;
  border: 2px solid var(--hc-burgundy);
  border-radius: .8rem;
  background: #fff8f6;
}

.hc-appointment__same-day-card:has(input:checked) {
  background: #fff2ee;
}

.hc-appointment__same-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hc-appointment__same-day-submit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3rem;
  padding: .55rem 1rem;
  border: 1px solid var(--hc-burgundy);
  border-radius: .55rem;
  background: var(--hc-salmon);
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.hc-appointment__same-day-submit[hidden] {
  display: none;
}

.hc-appointment__same-day-submit svg {
  width: 1.2rem;
  height: 1.2rem;
}

.hc-appointment__same-day-submit:hover:not(:disabled) {
  background: #f29a86;
}

.hc-appointment__same-day-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.hc-appointment__same-day-submit:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 3px;
}

.hc-appointment__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, .9fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
}

.hc-appointment__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hc-appointment__availability {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 7rem;
}

.hc-appointment__same-day {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--hc-burgundy);
  font-size: 1.25rem;
  font-weight: 700;
}

.hc-appointment__same-day span {
  font-weight: 700;
}

.hc-appointment__same-day input {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
}

.hc-appointment__calendar-panel {
  padding: clamp(.9rem, 1.8vw, 1.5rem);
  border: 1px solid var(--hc-border);
  border-radius: .8rem;
  background: #fffefd;
  box-shadow: 0 .5rem 1.5rem rgba(23, 52, 92, .07);
  transition: opacity .2s ease;
}

.hc-appointment__calendar-panel--disabled {
  opacity: .38;
  filter: grayscale(.45);
}

.hc-appointment__calendar-panel h2,
.hc-appointment__calendar-panel h3 {
  margin: 0;
  color: var(--hc-navy);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.hc-appointment__same-day-note {
  margin: .8rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid #e8bdb7;
  color: var(--hc-navy);
  font-size: 1rem;
  line-height: 1.5;
}

.hc-appointment__calendar-status {
  margin: .75rem 0 0;
  color: #a23143;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.45;
}

.hc-appointment__month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: .75rem 0 .85rem;
  font-size: 1.12rem;
}

.hc-appointment__month-header button {
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--hc-border);
  border-radius: .45rem;
  background: #fff;
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
  font-size: 1.7rem;
}

.hc-appointment__month-header button:disabled {
  opacity: .4;
  cursor: default;
}

.hc-appointment__month-weekdays,
.hc-appointment__month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .3rem;
  text-align: center;
}

.hc-appointment__month-weekdays {
  margin-bottom: .4rem;
  color: #617991;
  font-size: .78rem;
  font-weight: 700;
}

.hc-appointment__month-days button {
  width: 100%;
  aspect-ratio: 1.04;
  min-height: 2.7rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: #f3f7fa;
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .hc-appointment__month-days button:not([aria-pressed="true"]):hover:not(:disabled),
  .hc-appointment__time-slots button:not([aria-pressed="true"]):hover:not(:disabled) {
    border-color: var(--hc-focus);
    background: #e8f1f7;
  }
}

.hc-appointment__month-days button[aria-pressed="true"],
.hc-appointment__time-slots button[aria-pressed="true"] {
  border-color: var(--hc-focus);
  background: var(--hc-navy);
}

.hc-appointment__month-days button[aria-pressed="true"] {
  color: #fff;
}

.hc-appointment__time-slots button[aria-pressed="true"] {
  color: var(--hc-salmon);
}

.hc-appointment__month-days button[aria-current="date"] {
  box-shadow: inset 0 0 0 2px var(--hc-salmon);
}

.hc-appointment__month-days button:disabled,
.hc-appointment__time-slots button:disabled {
  background: #f3f3f3;
  color: #a1abb4;
  cursor: not-allowed;
}

.hc-appointment__time-selection {
  margin-top: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid #dbe5ed;
}

.hc-appointment__time-selection[hidden] {
  display: none;
}

.hc-appointment__time-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.hc-appointment__time-slots button {
  min-height: 2.8rem;
  padding: .35rem;
  border: 1px solid var(--hc-border);
  border-radius: .45rem;
  background: #fff;
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.hc-appointment__locations {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.hc-appointment__locations legend {
  margin-bottom: .45rem;
  font-weight: 650;
  line-height: 1.35;
}

.hc-appointment__location-list {
  display: grid;
  gap: .75rem;
}

.hc-appointment__location-selector {
  position: relative;
}

.hc-appointment__location-selector summary {
  box-sizing: border-box;
  display: flex;
  min-height: 3.25rem;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .75rem .9rem;
  border: 1px solid var(--hc-border);
  border-radius: .55rem;
  background: #fffefd;
  color: var(--hc-navy);
  cursor: pointer;
  list-style: none;
}

.hc-appointment__location-selector summary::-webkit-details-marker {
  display: none;
}

.hc-appointment__location-selector summary:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-appointment__location-selector summary[aria-invalid="true"] {
  border-color: #a23143;
}

.hc-appointment__field-error {
  margin: .45rem 0 0;
  color: #a23143;
  font-size: .9rem;
}

.hc-appointment__location-selector[open] summary {
  border-color: var(--hc-focus);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hc-appointment__selected-location strong,
.hc-appointment__selected-location small {
  display: block;
}

.hc-appointment__selected-location small {
  margin-top: .2rem;
  color: #53677c;
  font-size: .86rem;
}

.hc-appointment__location-selector .hc-appointment__location-list {
  position: absolute;
  z-index: 10;
  top: 100%;
  right: 0;
  left: 0;
  max-height: 24rem;
  overflow-y: auto;
  padding: .65rem;
  border: 1px solid var(--hc-focus);
  border-top: 0;
  border-radius: 0 0 .55rem .55rem;
  background: #fffefd;
  box-shadow: 0 .9rem 1.6rem rgba(23, 52, 92, .13);
}

.hc-appointment__location-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 1px solid var(--hc-border);
  border-radius: .55rem;
  background: #fffefd;
  cursor: pointer;
}

.hc-appointment__location-card:has(input:checked) {
  border-color: var(--hc-focus);
  background: #f0f6fa;
  box-shadow: inset 0 0 0 1px var(--hc-focus);
}

.hc-appointment__location-card input {
  flex: 0 0 auto;
  margin: .2rem 0 0;
  accent-color: var(--hc-focus);
}

.hc-appointment__location-card strong,
.hc-appointment__location-card small {
  display: block;
}

.hc-appointment__location-card small {
  margin-top: .2rem;
  color: #53677c;
  font-size: .86rem;
  line-height: 1.4;
}

.hc-appointment__month-header button:focus-visible,
.hc-appointment__month-days button:focus-visible,
.hc-appointment__time-slots button:focus-visible,
.hc-appointment__location-card input:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-appointment__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1rem;
}

.hc-appointment__field--wide {
  grid-column: 1 / -1;
}

.hc-appointment__field--disabled {
  opacity: .5;
}

.hc-appointment__schedule-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: .45rem;
  line-height: 1.35;
}

.hc-appointment__field .hc-appointment__schedule-heading > label {
  margin: 0;
}

.hc-appointment__field .hc-appointment__schedule-heading > label[hidden] {
  display: none;
}

.hc-appointment__field .hc-appointment__checkbox {
  display: inline-flex;
  margin: 0;
  color: var(--hc-burgundy);
  font-weight: 400;
}

.hc-appointment__field .hc-appointment__checkbox input {
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  padding: 0;
  margin: 0;
}

.hc-appointment__checkbox {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--hc-burgundy);
  cursor: pointer;
  font-weight: 400;
}

.hc-appointment__checkbox input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--hc-salmon);
}

.hc-appointment__checkbox input:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 3px;
}

.hc-appointment__schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.hc-appointment__field label {
  display: block;
  margin-bottom: .45rem;
  font-weight: 650;
  line-height: 1.35;
}

.hc-appointment__optional {
  font-size: .875em;
  font-weight: 400;
}

.hc-appointment__field input,
.hc-appointment__field select,
.hc-appointment__field textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: .75rem .9rem;
  border: 1px solid var(--hc-border);
  border-radius: .55rem;
  background: #fffefd;
  color: var(--hc-navy);
  font: inherit;
  line-height: 1.35;
}

.hc-appointment__field textarea {
  min-height: 8rem;
  resize: vertical;
}

.hc-appointment__field select#hc_appointment_surgeon {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2317345c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  background-size: 1rem;
}

.hc-appointment__date-control {
  position: relative;
}

.hc-appointment__date-control > input {
  padding-right: 3.3rem;
}

.hc-appointment__calendar-trigger {
  position: absolute;
  top: .37rem;
  right: .4rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: .48rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--hc-navy);
  cursor: pointer;
}

.hc-appointment__calendar-trigger:hover,
.hc-appointment__calendar-arrow:hover:not(:disabled),
.hc-appointment__calendar-days button:hover:not(:disabled) {
  background: #eef4f8;
}

.hc-appointment__calendar-trigger svg {
  width: 1.3rem;
  height: 1.3rem;
}

.hc-appointment__calendar {
  position: absolute;
  z-index: 20;
  top: calc(100% + .4rem);
  left: 0;
  box-sizing: border-box;
  width: min(21rem, calc(100vw - 2rem));
  padding: .9rem;
  border: 1px solid var(--hc-border);
  border-radius: .65rem;
  background: #fffefd;
  box-shadow: 0 .8rem 2rem rgba(23, 52, 92, .14);
}

.hc-appointment__calendar[hidden] {
  display: none;
}

.hc-appointment__calendar-header {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 5.4rem 2rem;
  gap: .3rem;
  align-items: center;
  margin-bottom: .75rem;
}

.hc-appointment__calendar-header--dob {
  grid-template-columns: 1.7rem minmax(0, 1fr) 3.4rem 4.5rem 1.7rem;
  gap: .2rem;
}

.hc-appointment__calendar-header--dob .hc-appointment__calendar-arrow {
  width: 1.7rem;
}

.hc-appointment__calendar select {
  min-height: 2.35rem;
  padding: .25rem .35rem;
  border-radius: .35rem;
  font-size: .9rem;
  font-weight: 600;
}

.hc-appointment__calendar-arrow,
.hc-appointment__calendar-days button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
}

.hc-appointment__calendar-arrow {
  width: 2rem;
  height: 2.35rem;
  font-size: 1.75rem;
  line-height: 1;
}

.hc-appointment__calendar-weekdays,
.hc-appointment__calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .2rem;
  text-align: center;
}

.hc-appointment__calendar-weekdays {
  margin-bottom: .25rem;
  color: #617991;
  font-size: .75rem;
  font-weight: 650;
}

.hc-appointment__calendar-days button {
  min-height: 2.35rem;
  font-size: .9rem;
}

.hc-appointment__calendar-days button[aria-pressed="true"] {
  background: var(--hc-salmon);
  font-weight: 700;
}

.hc-appointment__calendar-days button[aria-current="date"] {
  box-shadow: inset 0 0 0 1px var(--hc-focus);
}

.hc-appointment__calendar-arrow:disabled,
.hc-appointment__calendar-days button:disabled {
  color: #aab5bf;
  cursor: not-allowed;
}

.hc-appointment__calendar-trigger:focus-visible,
.hc-appointment__calendar button:focus-visible,
.hc-appointment__calendar select:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-appointment__field input:focus-visible,
.hc-appointment__field select:focus-visible,
.hc-appointment__field textarea:focus-visible,
.hc-appointment__submit:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 2px;
}

.hc-appointment__submit {
  min-height: 3.5rem;
  align-self: flex-start;
  margin-top: auto;
  padding: .75rem 1.7rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: var(--hc-salmon);
  color: var(--hc-navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background-color .18s ease-out, transform .18s ease-out;
}

.hc-appointment__submit[hidden] {
  display: none;
}

.hc-appointment__submit:hover {
  background: #f29a86;
  transform: translateY(-1px);
}

.hc-appointment__submit:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.hc-appointment__notice {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #af6b5d;
  border-radius: .55rem;
  background: #fff3ef;
  line-height: 1.5;
}

.hc-appointment--sent {
  max-width: 880px;
  min-height: 12rem;
  padding-bottom: 2.5rem;
}

.hc-appointment__confirmation {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  padding: 1.75rem 2rem;
  border: 1px solid #8caf9b;
  border-radius: .75rem;
  background: #eef7f1;
  color: var(--hc-navy);
}

.hc-appointment__confirmation-icon {
  flex: 0 0 2.75rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #d5eadc;
  color: #216245;
}

.hc-appointment__confirmation-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.hc-appointment__confirmation h2 {
  margin: 0 0 .45rem;
  color: var(--hc-navy);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.25;
}

.hc-appointment__confirmation p {
  max-width: 56ch;
  margin: 0;
  line-height: 1.55;
}

.hc-appointment__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 960px) {
  .hc-appointment__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hc-appointment__availability {
    position: static;
  }

  .hc-appointment__submit {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .hc-appointment {
    margin: 2rem 0 3rem;
    padding-top: 1.5rem;
  }

  .hc-appointment__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hc-appointment__same-day-card {
    padding: .9rem;
  }

  .hc-appointment__same-day {
    font-size: 1.1rem;
  }

  .hc-appointment__same-day-submit {
    padding: .55rem .75rem;
  }

  .hc-appointment__month-days button {
    min-height: 2.45rem;
  }

  .hc-appointment__schedule-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.35rem;
  }

  .hc-appointment__field--wide {
    grid-column: auto;
  }

  .hc-appointment__submit {
    width: 100%;
  }

  .hc-appointment__confirmation {
    gap: .85rem;
    padding: 1.25rem;
  }

  .hc-appointment__confirmation-icon {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (pointer: coarse) {
  .hc-appointment__calendar-trigger {
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    padding-right: .9rem;
    border-radius: .55rem;
  }

  .hc-appointment__calendar {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    width: min(21rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    transform: translate(-50%, -50%);
  }
}
