/* Đặt lịch hẹn — adapted from TaiLieu/tamduc_booking */
.hps-booking {
  --bk-blue: #1268a6;
  --bk-orange: #b94e00;
  --bk-ink: #142f45;
  --bk-bg: #f3f7fb;
  background: var(--bk-bg);
  font: 14px/1.55 "Be Vietnam Pro", Arial, sans-serif;
  color: #202a32;
  padding: 0 0 62px;
}

.body-inner:has(.hps-booking) > .gap-40 {
  display: none;
}

.hps-booking,
.hps-booking *,
.hps-booking *::before,
.hps-booking *::after {
  box-sizing: border-box;
}

.hps-booking h1,
.hps-booking h2,
.hps-booking h3,
.hps-booking p {
  font-family: inherit;
  text-transform: none;
}

.hps-booking a {
  color: inherit;
  text-decoration: none;
}

.bk-wrap {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
}

.bk-page {
  padding: 31px 0 0;
}

.bk-intro h1 {
  font-size: 31px;
  line-height: 1.25;
  color: var(--bk-ink);
  margin: 0 0 5px;
  font-weight: 800;
}

.bk-intro p {
  color: #4f5c66;
  margin: 0 0 21px;
}

.bk-steps {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.bk-steps span {
  border: 1px solid #d2dce3;
  background: #fff;
  color: #3f4d57;
  border-radius: 30px;
  padding: 8px 15px;
  font-size: 11px;
  font-weight: 700;
}

.bk-steps span.active {
  background: var(--bk-blue);
  border-color: var(--bk-blue);
  color: #fff;
}

.bk-layout {
  display: grid;
  grid-template-columns: minmax(0, 756px) 260px;
  gap: 24px;
  align-items: start;
}

.bk-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: min(920px, 100%);
  margin: 0 auto;
}

.bk-layout--single .bk-form {
  width: 100%;
}

.bk-success-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 20px;
  align-items: start;
}

.bk-intro-success h1 {
  color: #0d6b3f;
}

.bk-success-lead {
  max-width: 640px;
}

.bk-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.bk-success-actions .bk-submit {
  width: auto;
  min-width: 200px;
  flex: 1 1 220px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bk-btn-outline {
  flex: 1 1 180px;
  min-height: 47px;
  border: 1px solid #d2dce1;
  border-radius: 10px;
  background: #fff;
  color: var(--bk-ink);
  font: 700 14px "Be Vietnam Pro", Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.bk-btn-outline:hover {
  border-color: #6e9fbe;
  background: #f5faff;
}

.bk-form,
.bk-summary,
.bk-notice {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 16px;
}

.bk-form {
  padding: 22px 24px 24px;
  box-shadow: 0 2px 7px #1a3b5105;
}

.bk-section h2,
.bk-summary h2,
.bk-notice h2 {
  font-size: 16px;
  color: var(--bk-ink);
  font-weight: 800;
  margin: 0 0 9px;
}

.bk-specialties {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.bk-specialties button,
.bk-times button {
  height: 42px;
  border: 1px solid #d1dbe1;
  border-radius: 9px;
  background: #fff;
  color: #202a31;
  font: 700 12px "Be Vietnam Pro", Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 3px #1733480a;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-specialties button:hover,
.bk-times button:hover:not(:disabled) {
  border-color: #6e9fbe;
  background: #f5faff;
}

.bk-specialties button.selected,
.bk-times button.selected {
  background: var(--bk-blue);
  border-color: var(--bk-blue);
  color: #fff;
  box-shadow: 0 2px 5px #1268a633;
}

.bk-times button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bk-label {
  display: block;
  font-size: 11px;
  color: #46535d;
  font-weight: 700;
}

.bk-service-select {
  margin: 14px 0 0;
}

.bk-service-select select {
  width: 100%;
  height: 42px;
  border: 1px solid #d2dce1;
  border-radius: 8px;
  background: #fff;
  padding: 0 13px;
  margin-top: 4px;
  font: 400 12px "Be Vietnam Pro", Arial, sans-serif;
  color: #202a31;
  outline: none;
}

.bk-service-select select:focus {
  border-color: #4c91bd;
  box-shadow: 0 0 0 3px #1268a619;
}

.bk-doctor {
  margin: 21px 0 5px;
}

.bk-doctor select,
.bk-fields input,
.bk-fields select,
.bk-fields textarea {
  width: 100%;
  height: 42px;
  border: 1px solid #d2dce1;
  border-radius: 8px;
  background: #fff;
  padding: 0 13px;
  margin-top: 4px;
  font: 400 12px "Be Vietnam Pro", Arial, sans-serif;
  color: #202a31;
  outline: none;
}

.bk-doctor select:disabled {
  background: #f3f6f8;
  color: #6a7780;
}

.bk-doctor select:focus,
.bk-fields input:focus,
.bk-fields select:focus,
.bk-fields textarea:focus,
.bk-date:focus {
  border-color: #4c91bd;
  box-shadow: 0 0 0 3px #1268a619;
}

.bk-date-section {
  margin-top: 21px;
}

.bk-date-field {
  position: relative;
  width: 248px;
  max-width: 100%;
  margin-bottom: 10px;
}

.bk-date {
  display: block;
  width: 100%;
  height: 44px;
  border: 1px solid #d2dce1;
  border-radius: 9px;
  padding: 0 40px 0 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.bk-date-field svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5a6b76;
  pointer-events: none;
}

.bk-times {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bk-times-empty {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #6a7780;
  margin: 4px 0 0;
}

.bk-section .bk-times-empty.bk-loading {
  color: var(--bk-blue);
  font-weight: 600;
}

#toast-container > .toast {
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  font-size: 13px;
}

.bk-step-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e8eef2;
}

.bk-step-hint {
  font-size: 12px;
  color: #6a7780;
  margin: -4px 0 12px;
  line-height: 1.45;
}

.bk-patient {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e8eef2;
}

.bk-patient-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bk-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bk-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.bk-patient-fields .bk-wide {
  width: 100%;
  margin: 0;
}

.bk-patient-fields input::placeholder,
.bk-patient-fields textarea::placeholder {
  color: #8a969e;
  font-weight: 400;
  text-transform: none;
}

.bk-label-date {
  display: flex;
  flex-direction: column;
}

.bk-date-field--inline {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  margin-bottom: 0;
}

.bk-date-inline {
  display: block;
  width: 100%;
  height: 42px;
  border: 1px solid #d2dce1;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: 400 12px "Be Vietnam Pro", Arial, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}

.hps-booking .bk-date-field.date-field .flatpickr-wrapper {
  display: block;
  width: 100%;
}

.hps-booking .bk-fields .flatpickr-wrapper input,
.hps-booking .bk-fields input.bk-date-inline,
.hps-booking .bk-fields input.flatpickr-input,
.hps-booking .bk-patient-fields .flatpickr-wrapper input,
.hps-booking .bk-patient-fields input.bk-date-inline,
.hps-booking .bk-patient-fields input.flatpickr-input,
.hps-booking .bk-patient-fields input,
.hps-booking .bk-patient-fields select {
  height: 42px !important;
  min-height: 42px;
  max-height: 42px;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: normal;
  box-sizing: border-box;
}

.bk-patient-fields input:not([type="checkbox"]),
.bk-patient-fields select,
.bk-patient-fields textarea {
  width: 100%;
  border: 1px solid #d2dce1;
  border-radius: 8px;
  background: #fff;
  padding: 0 13px;
  margin-top: 4px;
  font: 400 12px "Be Vietnam Pro", Arial, sans-serif;
  color: #202a31;
  outline: none;
}

.bk-patient-fields textarea {
  height: auto;
  min-height: 60px;
  padding: 9px 12px;
  resize: vertical;
}

.hps-booking .bk-date-field:has(.flatpickr-calendar.open) {
  position: relative;
  z-index: 40;
}

.hps-booking .bk-date-field .flatpickr-calendar {
  margin-top: 6px;
}

.bk-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 12px;
}

.bk-fields textarea {
  height: auto;
  min-height: 60px;
  padding: 9px 12px;
  resize: vertical;
}

.bk-wide {
  grid-column: 1 / -1;
}

.bk-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0 19px;
  font-size: 11px;
  color: #56616a;
}

.bk-consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--bk-blue);
  flex-shrink: 0;
}

.bk-consent a {
  color: #17638e;
  font-weight: 600;
}

.bk-submit {
  width: 100%;
  height: 47px;
  border: 0;
  border-radius: 10px;
  background: var(--bk-orange);
  color: #fff;
  font: 700 14px "Be Vietnam Pro", Arial, sans-serif;
  cursor: pointer;
}

.bk-submit:hover:not(:disabled) {
  background: #a94400;
}

.bk-submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.bk-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #7a3b12;
  font-style: italic;
  line-height: 1.45;
}

.bk-sidebar {
  display: grid;
  gap: 13px;
}

.bk-summary {
  padding: 18px 19px 15px;
}

.bk-summary h2,
.bk-notice h2 {
  font-size: 14px;
  margin-bottom: 7px;
}

.bk-summary p {
  font-size: 12px;
  color: #4e5b65;
  margin: 4px 0;
}

.bk-summary b {
  color: #27323a;
}

.bk-notice {
  background: #edf5fc;
  border-color: #edf5fc;
  padding: 18px 19px;
}

.bk-notice ul {
  padding: 0 0 0 15px;
  margin: 7px 0 0;
}

.bk-notice li {
  font-size: 11px;
  color: #4c5a64;
  margin: 7px 0;
}

/* Flatpickr inside booking page */
.hps-booking .flatpickr-calendar {
  font-family: "Be Vietnam Pro", Arial, sans-serif;
}

@media (max-width: 900px) {
  .bk-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 16px;
  }

  .bk-form {
    padding: 20px;
  }

  .bk-times {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .bk-success-grid {
    grid-template-columns: 1fr;
  }

  .bk-wrap {
    width: calc(100% - 30px);
  }

  .bk-page {
    padding-top: 25px;
  }

  .bk-intro h1 {
    font-size: 27px;
  }

  .bk-layout {
    grid-template-columns: 1fr;
  }

  .bk-sidebar {
    grid-template-columns: 1fr 1fr;
    order: -1;
  }

  .bk-form {
    padding: 18px;
  }

  .bk-specialties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bk-times {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bk-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .bk-page {
    padding-top: 22px;
  }

  .bk-intro h1 {
    font-size: 25px;
  }

  .bk-intro p {
    font-size: 12px;
  }

  .bk-steps {
    gap: 6px;
  }

  .bk-steps span {
    padding: 7px 10px;
    font-size: 10px;
  }

  .bk-sidebar {
    grid-template-columns: 1fr;
  }

  .bk-form {
    padding: 15px;
  }

  .bk-specialties {
    gap: 7px;
  }

  .bk-specialties button,
  .bk-times button {
    font-size: 11px;
    height: 40px;
  }

  .bk-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bk-fields {
    grid-template-columns: 1fr;
  }

  .bk-row-2,
  .bk-row-3 {
    grid-template-columns: 1fr;
  }


  .bk-wide {
    grid-column: auto;
  }

  .bk-date-field {
    width: 100%;
  }
}
