:root {
  --appointment-ink: #102a43;
  --appointment-muted: #62778a;
  --appointment-line: #d8e4ec;
  --appointment-paper: #ffffff;
  --appointment-wash: #f4f8fb;
  --appointment-blue: #147da8;
  --appointment-blue-dark: #0d648a;
  --appointment-teal: #18a7a0;
  --appointment-danger: #b42318;
  --appointment-success: #087f5b;
}

body.g1-appointment-locked {
  overflow: hidden;
}

.g1-appointment-modal[hidden] {
  display: none !important;
}

.g1-appointment-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--appointment-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.g1-appointment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 25, 42, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.g1-appointment-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(216, 228, 236, 0.9);
  border-radius: 22px;
  background: var(--appointment-paper);
  box-shadow: 0 30px 90px rgba(7, 35, 54, 0.3);
  overscroll-behavior: contain;
}

.g1-appointment-head {
  position: relative;
  padding: 32px 72px 25px 34px;
  border-bottom: 1px solid var(--appointment-line);
  background:
    linear-gradient(105deg, rgba(20, 125, 168, 0.08), transparent 48%),
    var(--appointment-paper);
}

.g1-appointment-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--appointment-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.g1-appointment-head h2 {
  margin: 0;
  color: var(--appointment-ink);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.g1-appointment-head p {
  margin: 10px 0 0;
  color: var(--appointment-muted);
  font-size: 15px;
  line-height: 1.7;
}

.g1-appointment-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--appointment-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--appointment-ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.g1-appointment-close:hover {
  border-color: var(--appointment-blue);
  background: var(--appointment-wash);
  transform: rotate(5deg);
}

.g1-appointment-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 14px 34px;
  border-bottom: 1px solid var(--appointment-line);
  background: var(--appointment-wash);
  list-style: none;
}

.g1-appointment-path li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--appointment-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.g1-appointment-path li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: calc(100% - 108px);
  height: 1px;
  background: var(--appointment-line);
}

.g1-appointment-path span {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--appointment-paper);
  color: var(--appointment-blue);
  box-shadow: inset 0 0 0 1px var(--appointment-line);
  font-size: 11px;
}

.g1-appointment-form {
  padding: 28px 34px 32px;
}

.g1-appointment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.g1-appointment-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

fieldset.g1-appointment-field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.g1-appointment-field-full {
  grid-column: 1 / -1;
}

.g1-appointment-label,
.g1-appointment-legend {
  margin: 0;
  color: var(--appointment-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.g1-appointment-required {
  color: var(--appointment-blue);
}

.g1-appointment-field input,
.g1-appointment-field select,
.g1-appointment-field textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #c8d7e1;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--appointment-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.g1-appointment-field textarea {
  min-height: 92px;
  resize: vertical;
}

.g1-appointment-field input::placeholder,
.g1-appointment-field textarea::placeholder {
  color: #91a2af;
}

.g1-appointment-field input:focus,
.g1-appointment-field select:focus,
.g1-appointment-field textarea:focus {
  border-color: var(--appointment-blue);
  box-shadow: 0 0 0 3px rgba(20, 125, 168, 0.12);
}

.g1-appointment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.g1-appointment-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.g1-appointment-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.g1-appointment-option span {
  display: block;
  padding: 8px 12px;
  border: 1px solid #c8d7e1;
  border-radius: 999px;
  background: #fff;
  color: #486274;
  font-size: 13px;
  line-height: 1.2;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.g1-appointment-option input:checked + span {
  border-color: rgba(20, 125, 168, 0.45);
  background: rgba(20, 125, 168, 0.09);
  color: var(--appointment-blue-dark);
}

.g1-appointment-option input:focus-visible + span {
  outline: 3px solid rgba(20, 125, 168, 0.2);
  outline-offset: 2px;
}

.g1-appointment-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.g1-appointment-error {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--appointment-danger);
  font-size: 13px;
  line-height: 1.5;
}

.g1-appointment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
}

.g1-appointment-note {
  margin: 0;
  color: var(--appointment-muted);
  font-size: 12px;
  line-height: 1.55;
}

.g1-appointment-submit {
  min-width: 154px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--appointment-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 125, 168, 0.2);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.g1-appointment-submit:hover {
  background: var(--appointment-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(20, 125, 168, 0.26);
}

.g1-appointment-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.g1-appointment-success {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 48px 34px;
  text-align: center;
}

.g1-appointment-success[hidden] {
  display: none;
}

.g1-appointment-success-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 127, 91, 0.1);
  color: var(--appointment-success);
  font-size: 26px;
}

.g1-appointment-success h3 {
  margin: 0;
  color: var(--appointment-ink);
  font-size: 28px;
}

.g1-appointment-success p {
  max-width: 430px;
  margin: 12px auto 24px;
  color: var(--appointment-muted);
  font-size: 14px;
  line-height: 1.75;
}

.g1-appointment-done {
  min-width: 126px;
  min-height: 42px;
  border: 1px solid var(--appointment-line);
  border-radius: 999px;
  background: var(--appointment-paper);
  color: var(--appointment-ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

@media (max-width: 700px) {
  .g1-appointment-modal {
    align-items: end;
    padding: 0;
  }

  .g1-appointment-dialog {
    width: 100%;
    max-height: 94vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .g1-appointment-head {
    padding: 25px 60px 20px 22px;
  }

  .g1-appointment-close {
    top: 17px;
    right: 16px;
  }

  .g1-appointment-path {
    padding: 12px 22px;
  }

  .g1-appointment-path li {
    gap: 6px;
    font-size: 11px;
  }

  .g1-appointment-path li:not(:last-child)::after {
    display: none;
  }

  .g1-appointment-path span {
    width: 21px;
    height: 21px;
  }

  .g1-appointment-form {
    padding: 22px 22px 28px;
  }

  .g1-appointment-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .g1-appointment-field-full {
    grid-column: auto;
  }

  .g1-appointment-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .g1-appointment-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g1-appointment-close,
  .g1-appointment-option span,
  .g1-appointment-submit {
    transition: none;
  }
}
