/* MotoPress appointment form — St. George Medical child theme. */
.appointment-form-shortcode {
  --stg-action: #07538d;
  --stg-action-hover: #063d6a;
  --stg-panel-text: #ffffff;
  --stg-panel-line: rgba(255, 255, 255, .42);
  color: var(--stg-panel-text);
}

.appointment-form-shortcode .mpa-booking-step,
.appointment-form-shortcode .mpa-shortcode-title,
.appointment-form-shortcode label,
.appointment-form-shortcode .mpa-message,
.appointment-form-shortcode .mpa-required-tip,
.appointment-form-shortcode .mpa-cart,
.appointment-form-shortcode .mpa-cart .cell,
.appointment-form-shortcode .mpa-cart .cell-title,
.appointment-form-shortcode .mpa-cart .cell-value,
.appointment-form-shortcode .mpa-booking-details,
.appointment-form-shortcode .mpa-booking-details .cell,
.appointment-form-shortcode .mpa-booking-details .value {
  color: var(--stg-panel-text);
}

/* Step 1: occupy the entire booking panel. */
.appointment-form-shortcode .mpa-booking-step-service-form {
  width: 100% !important;
  max-width: none !important;
}

.appointment-form-shortcode .mpa-shortcode-title {
  margin: 0 0 22px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.appointment-form-shortcode .mpa-input-wrapper {
  margin: 0 0 20px;
}

/* The reservation always uses an internal consultation service. Patients only
   choose their specialty and doctor; the actual procedure is decided on site. */
.appointment-form-shortcode .mpa-service-wrapper { display: none !important; }

.appointment-form-shortcode label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.45;
}

.appointment-form-shortcode select,
.appointment-form-shortcode input[type="text"],
.appointment-form-shortcode input[type="email"],
.appointment-form-shortcode input[type="tel"],
.appointment-form-shortcode textarea {
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  color: #17324d;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: none;
}

.appointment-form-shortcode textarea { min-height: 130px; resize: vertical; }
.appointment-form-shortcode select:focus,
.appointment-form-shortcode input:focus,
.appointment-form-shortcode textarea:focus { outline: 3px solid rgba(255,255,255,.55); outline-offset: 2px; border-color: #fff; }

/* International telephone input: it opens on a white surface, so keep every label legible. */
.appointment-form-shortcode .iti--separate-dial-code .iti__selected-dial-code,
.appointment-form-shortcode .iti__country-list,
.appointment-form-shortcode .iti__country-list .iti__country-name,
.appointment-form-shortcode .iti__country-list .iti__dial-code {
  color: #172b3d;
}
.appointment-form-shortcode .iti__country-list .iti__country:hover,
.appointment-form-shortcode .iti__country-list .iti__country.iti__highlight {
  color: #172b3d;
  background-color: #dcecf8;
}

.appointment-form-shortcode .mpa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.appointment-form-shortcode .mpa-actions .button,
.appointment-form-shortcode .mpa-button-edit-or-remove {
  min-height: 46px;
  padding: 12px 22px;
  color: #fff;
  background: var(--stg-action);
  border: 1px solid var(--stg-action);
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.2;
}

.appointment-form-shortcode .mpa-actions .button:hover,
.appointment-form-shortcode .mpa-button-edit-or-remove:hover { color: #fff; background: var(--stg-action-hover); border-color: var(--stg-action-hover); }
.appointment-form-shortcode .mpa-actions .button:focus-visible,
.appointment-form-shortcode .mpa-button-edit-or-remove:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.appointment-form-shortcode .mpa-actions .button:disabled { color: rgba(255,255,255,.78); background: #4f88b7; border-color: #4f88b7; opacity: 1; }

/* Step 2: calendar and times stack vertically; both use the full inner width. */
.appointment-form-shortcode .mpa-booking-step-period .mpa-input-container {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  margin: 0 !important;
}

.appointment-form-shortcode .mpa-booking-step-period .mpa-input-container .mpa-input-wrapper,
.appointment-form-shortcode .mpa-booking-step-period .mpa-date-wrapper,
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.appointment-form-shortcode .mpa-booking-step-period .mpa-date-wrapper { margin: 0 0 28px !important; }
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-calendar {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 8px 10px 12px;
  background: #fff;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
}

/* Keep the month and year fully visible between the previous/next arrows. */
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-months,
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-month {
  height: 52px;
}
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  left: 0 !important;
  width: 100% !important;
  height: 52px;
  padding: 0 48px !important;
}
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-current-month .cur-month {
  margin: 0 !important;
  font-size: 1rem;
  line-height: 1.3;
}
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-current-month .numInputWrapper {
  width: 4.2em;
}

.appointment-form-shortcode .mpa-booking-step-period .flatpickr-rContainer,
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-days,
.appointment-form-shortcode .mpa-booking-step-period .dayContainer { width: 100% !important; min-width: 100% !important; max-width: 100% !important; }
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-weekdays,
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-weekdaycontainer,
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-days { display: flex; width: 100%; }
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-weekdaycontainer,
.appointment-form-shortcode .mpa-booking-step-period .dayContainer { justify-content: space-around; }
.appointment-form-shortcode .mpa-booking-step-period .flatpickr-day { max-width: none; flex: 0 0 14.2857%; }

.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper { display: block !important; margin-top: 0 !important; }
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times-container { position: static !important; width: 100% !important; height: auto !important; }
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times {
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100% !important;
  max-height: 310px !important;
  padding: 4px 2px 4px 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #79acd2 #d9eaf6;
  scrollbar-width: thin;
}

.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times::-webkit-scrollbar { width: 10px; }
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times::-webkit-scrollbar-track { background: #d9eaf6; border-radius: 999px; }
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times::-webkit-scrollbar-thumb { background: #79acd2; border: 2px solid #d9eaf6; border-radius: 999px; }
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times::-webkit-scrollbar-thumb:hover { background: #4f8fbe; }

.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-time-period {
  width: auto !important;
  min-height: 46px;
  margin: 0 !important;
  padding: 10px 6px;
  color: #fff;
  background: var(--stg-action);
  border: 1px solid var(--stg-action);
  border-radius: 3px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-time-period:hover,
.appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-time-period:focus { color: #fff; background: var(--stg-action-hover); border-color: #fff; }

/* Summary and completion state. */
.appointment-form-shortcode .mpa-booking-step .mpa-cart .mpa-cart-item { margin: 0; border-color: var(--stg-panel-line); }
.appointment-form-shortcode .mpa-booking-step .mpa-cart .item-header,
.appointment-form-shortcode .mpa-booking-step .mpa-cart .item-body,
.appointment-form-shortcode .mpa-booking-step .mpa-cart .item-footer { padding: 18px 0; border-color: var(--stg-panel-line); }
.appointment-form-shortcode .mpa-booking-step .mpa-cart .cell { padding: 4px 18px; }

/* Calendar links are compact, aligned buttons rather than overlapping inline text. */
.appointment-form-shortcode .reservation-calendar-links { align-items: flex-start; }
.appointment-form-shortcode .reservation-calendar-links .cell.value {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  color: transparent;
  font-size: 0;
  line-height: 0;
  background: rgba(255, 255, 255, .08);
  border-radius: 3px;
}
.appointment-form-shortcode .reservation-calendar-links .mpa-add-to-calendar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  color: #fff;
  background: var(--stg-action);
  border: 1px solid var(--stg-action);
  border-radius: 3px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}
.appointment-form-shortcode .reservation-calendar-links .mpa-add-to-calendar-link { color: #fff; }
.appointment-form-shortcode .reservation-calendar-links .mpa-add-to-calendar-link::before { content: "🗓"; font-size: .9rem; line-height: 1; }
.appointment-form-shortcode .reservation-calendar-links .mpa-add-to-calendar-link:hover { color: #fff; background: var(--stg-action-hover); border-color: var(--stg-action-hover); }

/* Appointment requests are not checkout orders. */
.appointment-form-shortcode .cell-price,
.appointment-form-shortcode .mpa-cart-total,
.appointment-form-shortcode .mpa-booking-step-checkout .mpa-order-details { display: none !important; }

@media (max-width: 600px) {
  .appointment-form-shortcode .mpa-booking-step-period .mpa-time-wrapper .mpa-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appointment-form-shortcode .mpa-actions .button { flex: 1 1 auto; }
  .appointment-form-shortcode .reservation-calendar-links .cell.value { flex-direction: column; }
  .appointment-form-shortcode .reservation-calendar-links .mpa-add-to-calendar-link { width: 100%; justify-content: center; }
}
