/* Consultation overlay and bottom bar, matched to the supplied reference. */
body {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

dialog.consult-modal {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(88vw, 320px);
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px 22px 22px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  isolation: isolate;
  border: 0;
  border-radius: 28px;
  background: #111613;
  color: #fff;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .45);
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

dialog.consult-modal:not([open]) {
  display: none;
}

dialog.consult-modal[open] {
  animation: consult-card-in .28s cubic-bezier(.34, 1.4, .64, 1) both;
}

dialog.consult-modal::backdrop {
  background: rgba(8, 28, 32, .58);
}

dialog.consult-modal::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -40px;
  top: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #07c160;
  opacity: .18;
  pointer-events: none;
}

.consult-modal .consult-close {
  box-sizing: border-box;
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.consult-modal .consult-close::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.consult-modal .consult-close svg {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.consult-modal .consult-close:hover::before {
  background: rgba(255, 255, 255, .16);
}

.consult-modal .consult-close:focus-visible {
  outline: 2px solid #9be7b8;
  outline-offset: -5px;
}

.consult-modal .consult-online {
  position: relative;
  margin: 0;
  padding: 0;
  color: #07c160;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .12em;
}

.consult-modal h2#consult-title {
  position: relative;
  margin: 10px 0 0;
  padding: 0;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .04em;
}

.consult-modal .consult-time {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
  margin: 18px 0 0;
  padding: 0;
  color: #fff;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

.consult-modal .consult-time strong {
  color: #fff;
  font-family: inherit;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

.consult-modal .consult-time span {
  color: #9be7b8;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.consult-modal .consult-caption {
  position: relative;
  margin: 8px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
}

.consult-modal .consult-action {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  margin: 26px auto 0;
  padding: 15px 20px;
  border: 0;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 193, 96, .35);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: normal;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.consult-modal .consult-action svg,
.consult-bar .consult-bar-action svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: inherit;
  pointer-events: none;
}

.consult-modal .consult-action:hover,
.consult-bar .consult-bar-action:hover {
  background: #06ad56;
  color: #fff;
  text-decoration: none;
}

.consult-modal .consult-action:focus-visible,
.consult-bar .consult-bar-action:focus-visible {
  outline: 3px solid #9be7b8;
  outline-offset: 4px;
}

.consult-modal .consult-action:active,
.consult-bar .consult-bar-action:active {
  background: #079b4f;
}

.consult-bar {
  box-sizing: border-box;
  position: fixed;
  z-index: 9990;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(15, 159, 143, .18);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 24px rgba(8, 40, 44, .08);
}

.consult-bar .consult-bar-action {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  min-height: 50px;
  margin: 0 auto;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s ease;
}

@keyframes consult-card-in {
  from { opacity: 0; transform: scale(.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 340px) {
  dialog.consult-modal { padding-inline: 18px; }
  .consult-modal h2#consult-title { font-size: 21px; }
  .consult-modal .consult-caption { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  dialog.consult-modal[open] { animation: none; }
  .consult-modal .consult-action,
  .consult-bar .consult-bar-action { transition: none; }
}
