/* =========================================================
   清晨教育 - 试听 / 规划 / VIP 共享预约页
   三个页面共用同一套布局与表单
   ========================================================= */

.trial-page {
  --trial-blue: #0b63e5;
  --trial-blue-dark: #0952c2;
  --trial-navy: #102a4c;
  --trial-text: #536579;
  --trial-muted: #8795a6;
  --trial-border: #dce6f1;
  --trial-surface: #fff;
  --trial-page: #f4f8fd;

  background: var(--trial-page);
  color: var(--trial-navy);
}

.trial-page .trial-main {
  display: block;
}

.trial-page .booking-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.trial-page .booking-title {
  margin: 0;
  color: var(--trial-navy);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.trial-page .booking-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--trial-text);
  font-size: 15px;
  line-height: 1.7;
}

.trial-page .booking-features span + span::before {
  margin-right: 10px;
  color: #b4c0ce;
  content: "|";
}

.trial-page .booking-content {
  padding: 46px 0 64px;
  background: var(--trial-page);
}

.trial-page .booking-layout {
  display: grid;
  grid-template-areas:
    "intro form"
    "visual form";
  grid-template-columns: minmax(0, 1fr) 440px;
  column-gap: 48px;
  row-gap: 26px;
  align-items: start;
}

.trial-page .booking-intro {
  grid-area: intro;
  min-width: 0;
}

.trial-page .booking-visual {
  grid-area: visual;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--trial-border);
  border-radius: 8px;
  background: var(--trial-surface);
  box-shadow: 0 8px 24px rgba(32, 67, 108, 0.08);
}

.trial-page .booking-visual img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.trial-page .booking-form-card {
  position: relative;
  grid-area: form;
  overflow: hidden;
  border: 1px solid var(--trial-border);
  border-radius: 8px;
  background: var(--trial-surface);
  box-shadow: 0 8px 24px rgba(32, 67, 108, 0.08);
}

.trial-page .booking-form-card::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(
    90deg,
    #0b63e5 0 76%,
    #f1a63b 76% 82%,
    #0a203c 82% 100%
  );
  content: "";
  pointer-events: none;
}

.trial-page .booking-form-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e6edf5;
}

.trial-page .booking-form-head h2 {
  margin: 0;
  color: var(--trial-navy);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

.trial-page .trial-form-body {
  padding: 22px 24px 24px;
}

.trial-page .trial-field {
  min-width: 0;
  margin: 0;
}

.trial-page .trial-field + .trial-field {
  margin-top: 18px;
}

.trial-page .trial-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.trial-page .trial-field-row .trial-field {
  margin-top: 0;
}

.trial-page .trial-field--spaced {
  margin-top: 18px;
}

.trial-page .trial-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0 0 7px;
  color: #354b65;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.trial-page .trial-required {
  color: #d64b3f;
  font-weight: 700;
}

.trial-page .trial-input {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid #cdd9e6;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: var(--trial-navy);
  font-family: inherit;
  font-size: 14px;
  line-height: 46px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.trial-page .trial-input::placeholder {
  color: #9ba8b7;
}

.trial-page .trial-input:hover {
  border-color: #aebfd0;
}

.trial-page .trial-input:focus {
  border-color: var(--trial-blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 229, 0.1);
}

.trial-page .trial-intent {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.trial-page .trial-intent legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: #354b65;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.trial-page .trial-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trial-page .trial-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d9e2ec;
  border-radius: 5px;
  background: #fff;
  color: #4d6278;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.trial-page .trial-option:hover {
  border-color: #9db8d6;
}

.trial-page .trial-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.trial-page .trial-option__check {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #a8b7c8;
  border-radius: 3px;
  background: #fff;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.trial-page .trial-option__check::after {
  position: absolute;
  top: 1px;
  left: 5px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.trial-page .trial-option:has(input:checked) {
  border-color: var(--trial-blue);
  background: #f1f7ff;
  color: #174b86;
}

.trial-page .trial-option:has(input:checked) .trial-option__check {
  border-color: var(--trial-blue);
  background: var(--trial-blue);
}

.trial-page .trial-option:has(input:checked) .trial-option__check::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.trial-page .trial-option:has(input:focus-visible) {
  outline: 2px solid var(--trial-blue);
  outline-offset: 2px;
}

.trial-page .trial-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 24px 0 0;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  background: var(--trial-blue);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.trial-page .trial-submit:hover {
  background: var(--trial-blue-dark);
}

.trial-page .trial-submit:focus-visible {
  outline: 3px solid rgba(11, 99, 229, 0.26);
  outline-offset: 2px;
}

.trial-page .trial-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* ---------- 成功弹窗 ---------- */
.trial-page .success-modal-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 28, 52, 0.58);
}

.trial-page .success-modal-overlay.is-visible {
  display: flex;
}

.trial-page .success-modal-box {
  position: relative;
  width: min(100%, 390px);
  padding: 30px 28px 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(6, 22, 42, 0.25);
  text-align: center;
  animation: trial-modal-in 0.2s ease-out;
}

.trial-page .modal-close-btn {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8391a2;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.trial-page .modal-close-btn:hover {
  background: #f2f5f8;
  color: var(--trial-blue);
}

.trial-page .modal-close-btn:focus-visible {
  outline: 2px solid var(--trial-blue);
  outline-offset: 1px;
}

.trial-page .modal-title {
  margin: 2px 0 9px;
  color: var(--trial-navy);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.trial-page .modal-desc {
  margin: 0 auto 20px;
  color: var(--trial-text);
  font-size: 13px;
  line-height: 1.7;
}

.trial-page .modal-qrcode {
  width: fit-content;
  margin: 0 auto 14px;
  padding: 7px;
  border: 1px solid #dde6ef;
  border-radius: 6px;
  background: #fff;
}

.trial-page .modal-qrcode img {
  width: 178px;
  height: 178px;
  border-radius: 3px;
  object-fit: contain;
}

.trial-page .modal-footer {
  color: var(--trial-muted);
  font-size: 12px;
}

.trial-page .modal-footer a {
  color: var(--trial-blue);
}

.trial-page .modal-footer a:hover {
  text-decoration: underline;
}

/* 本页已有预约表单，不再重复页脚上方的预约 CTA */
.trial-page .qx-footer-cta {
  display: none;
}

@keyframes trial-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .trial-page .booking-layout {
    grid-template-areas:
      "intro"
      "form"
      "visual";
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
    max-width: 680px;
    margin: 0 auto;
  }

  .trial-page .booking-intro,
  .trial-page .booking-form-card,
  .trial-page .booking-visual {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .trial-page .booking-container {
    padding: 0 16px;
  }

  .trial-page .booking-content {
    padding: 30px 0 48px;
  }

  .trial-page .booking-title {
    font-size: 32px;
    letter-spacing: -0.02em;
  }

  .trial-page .booking-features {
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
  }

  .trial-page .booking-features span + span::before {
    margin-right: 6px;
  }

  .trial-page .booking-layout {
    row-gap: 22px;
  }

  .trial-page .booking-form-head {
    padding: 18px 18px 15px;
  }

  .trial-page .booking-form-head h2 {
    font-size: 19px;
  }

  .trial-page .trial-form-body {
    padding: 18px;
  }

  .trial-page .trial-field-row,
  .trial-page .trial-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .trial-page .trial-field-row {
    gap: 18px;
  }

  .trial-page .trial-option {
    min-height: 44px;
    font-size: 13px;
  }

  .trial-page .trial-input {
    height: 48px;
    font-size: 16px;
  }

  .trial-page .success-modal-box {
    padding: 28px 20px 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-page .trial-input,
  .trial-page .trial-option,
  .trial-page .trial-option__check,
  .trial-page .trial-option__check::after,
  .trial-page .trial-submit {
    transition: none;
  }

  .trial-page .success-modal-box {
    animation: none;
  }
}
