/* ==========================================================================
   Ask the Doctor / Doktora Sor — CF7 #4545
   Modern 2026 medical-grade form UI
   Brand: #7761DF (primary) · gradient #7761DF -> #5b46c0 · accent #10b981
   --------------------------------------------------------------------------
   JS hooks preserved: gynolifeIVF_*, wpcf7-submit, #gynolifeCF7_Submitter,
   .js-enabled, .show, .active, .hidden
   ========================================================================== */

/* ---------- Design tokens (scoped) ---------- */
#gynolifeIVF_formContainer{
  --atd-primary: #7761DF;
  --atd-primary-600: #6a55d0;
  --atd-primary-700: #5b46c0;
  --atd-primary-50: #f3f0ff;
  --atd-primary-100: #e8e3fb;
  --atd-grad: linear-gradient(135deg, #7761DF 0%, #5b46c0 100%);
  --atd-grad-soft: linear-gradient(135deg, rgba(119,97,223,.08) 0%, rgba(91,70,192,.04) 100%);
  --atd-accent: #10b981;
  --atd-accent-50: #ecfdf5;
  --atd-ink: #0f172a;
  --atd-ink-2: #334155;
  --atd-muted: #64748b;
  --atd-muted-2: #94a3b8;
  --atd-line: #e5e7eb;
  --atd-line-2: #eef0f4;
  --atd-bg: #ffffff;
  --atd-bg-soft: #fafbff;
  --atd-danger: #ef4444;
  --atd-radius: 16px;
  --atd-radius-lg: 22px;
  --atd-radius-sm: 10px;
  --atd-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --atd-shadow-md: 0 10px 30px -12px rgba(91,70,192,.18), 0 4px 10px -6px rgba(15,23,42,.06);
  --atd-shadow-lg: 0 30px 60px -20px rgba(91,70,192,.28), 0 14px 30px -16px rgba(15,23,42,.10);
  --atd-focus: 0 0 0 4px rgba(119,97,223,.18);
  --atd-ease: cubic-bezier(.22,.61,.36,1);
  --atd-font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- CF7 plumbing ---------- */
.wpcf7-response-output { display: none; }
.wpcf7-form.sent .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output { display: block !important; }

/* Hidden submit: off-stage but clickable */
.gynolifeIVF_hiddenSubmit,
.wpcf7 form .gynolifeIVF_hiddenSubmit {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: auto;
}

/* Some themes hide submit; keep it active */
.wpcf7 form .wpcf7-submit { display: inline-block; }

/* CF7 wrapper should not break layout */
#gynolifeIVF_formContainer .wpcf7-form { display: contents; }
#gynolifeIVF_formContainer .wpcf7-form > p { margin: 0; }

/* CF7 native validation tip styling */
#gynolifeIVF_formContainer .wpcf7-not-valid-tip{
  color: var(--atd-danger);
  font-size: 13px;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}
#gynolifeIVF_formContainer .wpcf7-response-output{
  margin: 18px 0 0 !important;
  padding: 14px 16px !important;
  border: 1px solid var(--atd-line) !important;
  border-radius: var(--atd-radius-sm) !important;
  background: var(--atd-bg-soft) !important;
  font-size: 14px;
  color: var(--atd-ink-2);
}
.wpcf7-form.failed #gynolifeIVF_formContainer .wpcf7-response-output{
  border-color: rgba(239,68,68,.3) !important;
  background: rgba(239,68,68,.04) !important;
  color: var(--atd-danger);
}

/* ==========================================================================
   Container / Card
   ========================================================================== */
#gynolifeIVF_formContainer{
  max-width: 680px;
  margin: 48px auto;
  padding: 44px 44px 28px;
  font-family: var(--atd-font);
  background: var(--atd-bg);
  border: 1px solid var(--atd-line-2);
  border-radius: var(--atd-radius-lg);
  box-shadow: var(--atd-shadow-lg);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  color: var(--atd-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle decorative gradient orbs (medical, calm) */
#gynolifeIVF_formContainer::before{
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at center, rgba(119,97,223,.18), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
#gynolifeIVF_formContainer::after{
  content: '';
  position: absolute;
  bottom: -160px;
  left: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(16,185,129,.10), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* All children above the orbs */
#gynolifeIVF_formContainer > * { position: relative; z-index: 1; }

/* Legacy duplicate wrapper (kept for backward compat) */
#gynolifeIVF_formWrapper{
  background: var(--atd-bg);
  border: 1px solid var(--atd-line-2);
  border-radius: var(--atd-radius-lg);
  padding: 44px 44px 28px;
  box-shadow: var(--atd-shadow-md);
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 680px;
}
#gynolifeIVF_formWrapper::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--atd-grad);
}

/* Hidden state (after success popup close) */
#gynolifeIVF_formContainer.hidden{ display: none; }

/* ==========================================================================
   Hero header
   ========================================================================== */
.gynolifeIVF_header{
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--atd-line-2);
}

.gynolifeIVF_doctorAvatar{
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--atd-grad);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  position: relative;
  box-shadow: 0 14px 30px -10px rgba(119,97,223,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
/* "Online" pulse dot on avatar */
.gynolifeIVF_doctorAvatar::after{
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  background: var(--atd-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: atd-pulse 2.2s var(--atd-ease) infinite;
}

@keyframes atd-pulse{
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70%  { box-shadow: 0 0 0 12px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.gynolifeIVF_title{
  color: var(--atd-ink);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.gynolifeIVF_subtitle{
  color: var(--atd-muted);
  font-size: 15px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.gynolifeIVF_brandName{
  color: var(--atd-primary-700);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.gynolifeIVF_speciality{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--atd-accent);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 4px 10px;
  background: var(--atd-accent-50);
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.gynolifeIVF_speciality::before{
  content: '';
  width: 6px;
  height: 6px;
  background: var(--atd-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16,185,129,.5);
  animation: atd-pulse 2.2s var(--atd-ease) infinite;
}

/* ==========================================================================
   Progress
   ========================================================================== */
.gynolifeIVF_progressBar{
  width: 100%;
  height: 8px;
  background: var(--atd-line-2);
  border-radius: 999px;
  margin: 22px 0 10px;
  overflow: hidden;
  position: relative;
}
.gynolifeIVF_progress{
  height: 100%;
  background: var(--atd-grad);
  width: 25%;
  transition: width .55s var(--atd-ease);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.gynolifeIVF_progress::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: atd-shine 2.4s linear infinite;
}
@keyframes atd-shine{
  to { transform: translateX(100%); }
}

.gynolifeIVF_stepInfo{
  text-align: center;
  margin: 4px 0 26px;
  color: var(--atd-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   Steps (slide-in transitions)
   ========================================================================== */
.gynolifeIVF_step{
  display: none;
  margin-bottom: 8px;
}
.gynolifeIVF_step.active{
  display: block;
  animation: atd-slideIn .5s var(--atd-ease) both;
}
@keyframes atd-slideIn{
  0%   { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(2px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Doctor cards (when a doctor selection step exists)
   Works with generic markup containing .gynolifeIVF_doctorCard / radio inputs
   ========================================================================== */
.gynolifeIVF_doctorGrid,
.gynolifeIVF_doctors{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 8px 0 6px;
}
.gynolifeIVF_doctorCard{
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--atd-line);
  border-radius: var(--atd-radius);
  cursor: pointer;
  transition: transform .25s var(--atd-ease),
              border-color .2s var(--atd-ease),
              box-shadow .25s var(--atd-ease),
              background .2s var(--atd-ease);
}
.gynolifeIVF_doctorCard:hover{
  transform: translateY(-2px);
  border-color: var(--atd-primary);
  box-shadow: var(--atd-shadow-md);
}
.gynolifeIVF_doctorCard input[type="radio"],
.gynolifeIVF_doctorCard input[type="checkbox"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gynolifeIVF_doctorCard:has(input:checked){
  border-color: var(--atd-primary);
  background: var(--atd-primary-50);
  box-shadow: var(--atd-shadow-md), inset 0 0 0 1px var(--atd-primary);
}
.gynolifeIVF_doctorCard:has(input:checked)::after{
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--atd-grad);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

/* Doctor avatar circle */
.gynolifeIVF_doctorCard__avatar,
.gynolifeIVF_doctorPhoto{
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--atd-grad);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(119,97,223,.5);
  position: relative;
}
.gynolifeIVF_doctorCard__avatar::after,
.gynolifeIVF_doctorPhoto::after{
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  background: var(--atd-accent);
  border: 2px solid #fff;
  border-radius: 50%;
  animation: atd-pulse 2.2s var(--atd-ease) infinite;
}
.gynolifeIVF_doctorCard__body{ min-width: 0; flex: 1; }
.gynolifeIVF_doctorCard__name,
.gynolifeIVF_doctorName{
  font-weight: 700;
  font-size: 15px;
  color: var(--atd-ink);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.gynolifeIVF_doctorCard__role,
.gynolifeIVF_doctorSpecialty{
  font-size: 12.5px;
  color: var(--atd-muted);
  margin: 0 0 6px;
  line-height: 1.35;
}
.gynolifeIVF_doctorCard__badge,
.gynolifeIVF_onlineBadge{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--atd-accent);
  background: var(--atd-accent-50);
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gynolifeIVF_doctorCard__badge::before,
.gynolifeIVF_onlineBadge::before{
  content: '';
  width: 5px;
  height: 5px;
  background: var(--atd-accent);
  border-radius: 50%;
  animation: atd-pulse 2.2s var(--atd-ease) infinite;
}

/* ==========================================================================
   Question / Help boxes
   ========================================================================== */
.gynolifeIVF_question{
  background: var(--atd-grad-soft);
  padding: 18px 20px;
  border-radius: var(--atd-radius);
  margin-bottom: 24px;
  border: 1px solid var(--atd-primary-100);
  border-left: 3px solid var(--atd-primary);
  position: relative;
}
.gynolifeIVF_questionText{
  font-size: 17px;
  color: var(--atd-ink);
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.gynolifeIVF_helpText{
  font-size: 13.5px;
  color: var(--atd-muted);
  margin: 8px 0 0;
  line-height: 1.5;
  font-style: normal;
}

/* ==========================================================================
   Inputs / Labels (floating-label style)
   ========================================================================== */
.gynolifeIVF_inputGroup{
  margin-bottom: 22px;
  position: relative;
}

.gynolifeIVF_inputLabel{
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--atd-ink-2);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.gynolifeIVF_inputLabel.required::after{
  content: " *";
  color: var(--atd-danger);
  font-weight: 700;
}

#gynolifeIVF_formContainer .gynolifeIVF_input,
#gynolifeIVF_formContainer .gynolifeIVF_ageSelector,
#gynolifeIVF_formContainer .gynolifeIVF_textarea,
#gynolifeIVF_formContainer input[type="text"],
#gynolifeIVF_formContainer input[type="email"],
#gynolifeIVF_formContainer input[type="tel"],
#gynolifeIVF_formContainer input[type="number"],
#gynolifeIVF_formContainer select,
#gynolifeIVF_formContainer textarea{
  width: 100%;
  padding: 16px 16px;
  border: 1.5px solid var(--atd-line);
  border-radius: var(--atd-radius-sm);
  font-size: 15px;
  font-family: var(--atd-font);
  transition: border-color .2s var(--atd-ease),
              box-shadow .2s var(--atd-ease),
              background .2s var(--atd-ease);
  background: var(--atd-bg);
  color: var(--atd-ink);
  line-height: 1.5;
  min-height: 52px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#gynolifeIVF_formContainer .gynolifeIVF_input::placeholder,
#gynolifeIVF_formContainer .gynolifeIVF_textarea::placeholder,
#gynolifeIVF_formContainer textarea::placeholder,
#gynolifeIVF_formContainer input::placeholder{
  color: var(--atd-muted-2);
  opacity: 1;
}

#gynolifeIVF_formContainer .gynolifeIVF_input:hover,
#gynolifeIVF_formContainer .gynolifeIVF_ageSelector:hover,
#gynolifeIVF_formContainer .gynolifeIVF_textarea:hover,
#gynolifeIVF_formContainer input:hover,
#gynolifeIVF_formContainer select:hover,
#gynolifeIVF_formContainer textarea:hover{
  border-color: #cbd0db;
}

#gynolifeIVF_formContainer .gynolifeIVF_input:focus,
#gynolifeIVF_formContainer .gynolifeIVF_ageSelector:focus,
#gynolifeIVF_formContainer .gynolifeIVF_textarea:focus,
#gynolifeIVF_formContainer input:focus,
#gynolifeIVF_formContainer select:focus,
#gynolifeIVF_formContainer textarea:focus{
  outline: none;
  border-color: var(--atd-primary);
  box-shadow: var(--atd-focus);
  background: #fff;
}

/* Invalid */
#gynolifeIVF_formContainer .wpcf7-not-valid{
  border-color: var(--atd-danger) !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,.10) !important;
}

/* Select chevron */
#gynolifeIVF_formContainer .gynolifeIVF_ageSelector,
#gynolifeIVF_formContainer select{
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%237761DF" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
  padding-right: 46px;
}

/* Textarea — readable, slightly mono-ish for question feel */
#gynolifeIVF_formContainer .gynolifeIVF_textarea,
#gynolifeIVF_formContainer textarea{
  min-height: 170px;
  resize: vertical;
  line-height: 1.65;
  font-family: 'Manrope', ui-sans-serif, -apple-system, sans-serif;
  letter-spacing: -0.005em;
}
#gynolifeIVF_formContainer .gynolifeIVF_textarea.large{ min-height: 200px; }

/* Char counter (optional element rendered by JS) */
.gynolifeIVF_charCounter,
.gynolifeIVF_inputGroup .char-counter{
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--atd-muted-2);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.gynolifeIVF_charCounter.is-warning{ color: #d97706; }
.gynolifeIVF_charCounter.is-danger{ color: var(--atd-danger); }

/* Radio / Checkbox tweaks */
#gynolifeIVF_formContainer input[type="radio"],
#gynolifeIVF_formContainer input[type="checkbox"]{
  accent-color: var(--atd-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* CF7 native field wrap normalization */
#gynolifeIVF_formContainer .wpcf7-form-control-wrap{ display: block; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.gynolifeIVF_buttonRow{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--atd-line-2);
  clear: both;
}
.gynolifeIVF_buttonRow br,
.gynolifeIVF_backButton br,
.gynolifeIVF_nextButton br { display: none; }

/* Back button — ghost */
.gynolifeIVF_backButton{
  background: #fff;
  border: 1.5px solid var(--atd-line);
  color: var(--atd-muted);
  padding: 0 22px;
  border-radius: var(--atd-radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--atd-font);
  cursor: pointer;
  transition: transform .2s var(--atd-ease),
              border-color .2s var(--atd-ease),
              color .2s var(--atd-ease),
              background .2s var(--atd-ease);
  min-width: 110px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  letter-spacing: -0.005em;
}
.gynolifeIVF_backButton.show{
  opacity: 1;
  visibility: visible;
}
.gynolifeIVF_backButton::before{
  content: '←';
  font-size: 16px;
  transition: transform .2s var(--atd-ease);
}
.gynolifeIVF_backButton:hover{
  border-color: var(--atd-primary);
  color: var(--atd-primary-700);
  background: var(--atd-primary-50);
}
.gynolifeIVF_backButton:hover::before{ transform: translateX(-3px); }
.gynolifeIVF_backButton:focus-visible{
  outline: none;
  box-shadow: var(--atd-focus);
}

/* Next / Submit — primary */
.gynolifeIVF_nextButton{
  background: var(--atd-grad) !important;
  background-image: var(--atd-grad) !important;
  border: none;
  color: #fff !important;
  padding: 0 28px;
  border-radius: var(--atd-radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--atd-font);
  cursor: pointer;
  transition: transform .2s var(--atd-ease),
              box-shadow .25s var(--atd-ease),
              filter .2s var(--atd-ease);
  min-width: 150px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.005em;
  box-shadow: 0 8px 20px -8px rgba(119,97,223,.55);
}
.gynolifeIVF_nextButton::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--atd-ease);
  pointer-events: none;
}
.gynolifeIVF_nextButton:not(:disabled):hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(119,97,223,.65);
  filter: brightness(1.04);
}
.gynolifeIVF_nextButton:not(:disabled):hover::after{
  transform: translateX(120%);
}
.gynolifeIVF_nextButton:not(:disabled):active{
  transform: translateY(0);
  filter: brightness(.97);
}
.gynolifeIVF_nextButton:focus-visible{
  outline: none;
  box-shadow: var(--atd-focus), 0 14px 28px -10px rgba(119,97,223,.55);
}
.gynolifeIVF_nextButton:disabled{
  background: #cbd0db !important;
  background-image: none !important;
  cursor: not-allowed;
  box-shadow: none;
  color: #fff !important;
  filter: none;
}
.gynolifeIVF_nextButton:disabled::after{ display: none; }

/* CF7 native submit (mirrors next button look) */
.wpcf7 form .wpcf7-submit{
  background: var(--atd-grad) !important;
  border: none !important;
  color: #fff !important;
  padding: 0 28px !important;
  border-radius: var(--atd-radius-sm) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: var(--atd-font) !important;
  cursor: pointer !important;
  height: 48px !important;
  min-width: 150px !important;
  transition: transform .2s var(--atd-ease), box-shadow .25s var(--atd-ease), filter .2s var(--atd-ease) !important;
  box-shadow: 0 8px 20px -8px rgba(119,97,223,.55) !important;
}
.wpcf7 form .wpcf7-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px -10px rgba(119,97,223,.65) !important;
}

/* CF7 spinner styling */
.wpcf7-spinner{
  background-color: var(--atd-primary) !important;
  vertical-align: middle;
  margin-left: 10px;
}
.wpcf7-form.submitting .gynolifeIVF_nextButton,
.wpcf7-form.submitting .wpcf7-submit{
  pointer-events: none;
  opacity: .85;
}
.wpcf7-form.submitting .gynolifeIVF_nextButton::before{
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: atd-spin .7s linear infinite;
  display: inline-block;
}
@keyframes atd-spin{ to { transform: rotate(360deg); } }

/* ==========================================================================
   Trust footer (renders if you add .gynolifeIVF_trustBadges or appears as a
   pseudo-element fallback on the container)
   ========================================================================== */
.gynolifeIVF_trustBadges{
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--atd-line-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--atd-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.gynolifeIVF_trustBadges span{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gynolifeIVF_trustBadges span::before{
  content: '';
  width: 14px;
  height: 14px;
  background: var(--atd-accent-50);
  border: 1.5px solid var(--atd-accent);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

/* Fallback footer line if no trust element added */
#gynolifeIVF_formContainer.js-enabled::after{ z-index: 0; }
#gynolifeIVF_formContainer .gynolifeIVF_trustLine{
  text-align: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--atd-line-2);
  font-size: 12.5px;
  color: var(--atd-muted);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Success popup
   ========================================================================== */
.gynolifeIVF_popup{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  animation: atd-fadeIn .3s var(--atd-ease);
}
@keyframes atd-fadeIn{ from{opacity:0;} to{opacity:1;} }

.gynolifeIVF_popupContent{
  background: #fff;
  padding: 44px 36px 36px;
  border-radius: var(--atd-radius-lg);
  text-align: center;
  max-width: 460px;
  width: 100%;
  animation: atd-popupScale .5s var(--atd-ease);
  box-shadow: 0 30px 70px -20px rgba(15,23,42,.4);
  border: 1px solid var(--atd-line-2);
  position: relative;
  overflow: hidden;
  font-family: var(--atd-font);
}
.gynolifeIVF_popupContent::before{
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(16,185,129,.18), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.gynolifeIVF_popupContent > *{ position: relative; z-index: 1; }

@keyframes atd-popupScale{
  0%   { transform: scale(.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.gynolifeIVF_popupIcon{
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  box-shadow: 0 16px 32px -10px rgba(16,185,129,.5);
  animation: atd-popIn .55s var(--atd-ease) .15s both;
}
@keyframes atd-popIn{
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

#gynolifeIVF_checkIcon{
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  display: inline-block;
  transform: scale(1.15);
}

.gynolifeIVF_popupTitle{
  color: var(--atd-ink);
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.gynolifeIVF_popupText{
  color: var(--atd-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
}

#gynolifeIVF_successPopup .gynolifeIVF_popupButton{
  background: var(--atd-grad);
  border: none;
  color: #fff;
  padding: 0 32px;
  height: 48px;
  border-radius: var(--atd-radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--atd-font);
  cursor: pointer;
  transition: transform .2s var(--atd-ease), box-shadow .25s var(--atd-ease), filter .2s var(--atd-ease);
  box-shadow: 0 8px 20px -8px rgba(119,97,223,.55);
  min-width: 140px;
  letter-spacing: -0.005em;
}
#gynolifeIVF_successPopup .gynolifeIVF_popupButton:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px -10px rgba(119,97,223,.65);
}
#gynolifeIVF_successPopup .gynolifeIVF_popupButton:focus-visible{
  outline: none;
  box-shadow: var(--atd-focus), 0 14px 28px -10px rgba(119,97,223,.55);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px){
  #gynolifeIVF_formContainer{
    margin: 20px 12px;
    padding: 28px 20px 20px;
    border-radius: 18px;
  }
  #gynolifeIVF_formWrapper{
    padding: 28px 20px 20px;
    border-radius: 18px;
  }
  #gynolifeIVF_formContainer::before{ width: 200px; height: 200px; top: -80px; right: -80px; }
  #gynolifeIVF_formContainer::after{ width: 220px; height: 220px; bottom: -120px; left: -90px; }

  .gynolifeIVF_header{ margin-bottom: 22px; padding-bottom: 20px; }
  .gynolifeIVF_doctorAvatar{
    width: 76px; height: 76px;
    font-size: 28px;
    margin-bottom: 14px;
  }
  .gynolifeIVF_title{ font-size: 22px; }
  .gynolifeIVF_subtitle{ font-size: 14px; }

  .gynolifeIVF_progressBar{ margin: 18px 0 8px; height: 7px; }
  .gynolifeIVF_stepInfo{ font-size: 12px; margin-bottom: 22px; }

  .gynolifeIVF_question{ padding: 16px; }
  .gynolifeIVF_questionText{ font-size: 16px; }

  #gynolifeIVF_formContainer .gynolifeIVF_input,
  #gynolifeIVF_formContainer .gynolifeIVF_ageSelector,
  #gynolifeIVF_formContainer .gynolifeIVF_textarea,
  #gynolifeIVF_formContainer input[type="text"],
  #gynolifeIVF_formContainer input[type="email"],
  #gynolifeIVF_formContainer input[type="tel"],
  #gynolifeIVF_formContainer input[type="number"],
  #gynolifeIVF_formContainer select,
  #gynolifeIVF_formContainer textarea{
    font-size: 16px; /* prevent iOS zoom */
    min-height: 50px;
    padding: 14px 14px;
  }
  #gynolifeIVF_formContainer .gynolifeIVF_textarea,
  #gynolifeIVF_formContainer textarea{ min-height: 150px; }
  #gynolifeIVF_formContainer .gynolifeIVF_textarea.large{ min-height: 170px; }

  .gynolifeIVF_doctorGrid,
  .gynolifeIVF_doctors{ grid-template-columns: 1fr; }

  .gynolifeIVF_buttonRow{
    flex-direction: column-reverse;
    gap: 10px;
    text-align: center;
  }
  .gynolifeIVF_backButton,
  .gynolifeIVF_nextButton,
  .wpcf7 form .wpcf7-submit{
    width: 100% !important;
    margin: 0 !important;
    height: 50px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    min-height: 44px;
  }

  .gynolifeIVF_popupContent{
    padding: 36px 24px 28px;
  }
  .gynolifeIVF_popupIcon{ width: 72px; height: 72px; font-size: 30px; }
  .gynolifeIVF_popupTitle{ font-size: 20px; }
  .gynolifeIVF_popupText{ font-size: 14px; }
}

@media (max-width: 420px){
  #gynolifeIVF_formContainer{ padding: 24px 16px 18px; }
  .gynolifeIVF_title{ font-size: 20px; }
  .gynolifeIVF_doctorAvatar{ width: 68px; height: 68px; font-size: 24px; }
}

/* ==========================================================================
   Accessibility — reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .gynolifeIVF_progress::after,
  .gynolifeIVF_doctorAvatar::after,
  .gynolifeIVF_speciality::before,
  .gynolifeIVF_doctorCard__badge::before,
  .gynolifeIVF_onlineBadge::before{
    animation: none !important;
  }
}

/* ==========================================================================
   High contrast / dark mode preference (subtle adjustments)
   ========================================================================== */
@media (prefers-contrast: more){
  #gynolifeIVF_formContainer{
    border-color: #94a3b8;
  }
  #gynolifeIVF_formContainer .gynolifeIVF_input,
  #gynolifeIVF_formContainer .gynolifeIVF_ageSelector,
  #gynolifeIVF_formContainer .gynolifeIVF_textarea,
  #gynolifeIVF_formContainer input,
  #gynolifeIVF_formContainer select,
  #gynolifeIVF_formContainer textarea{
    border-color: #64748b;
    border-width: 2px;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print{
  #gynolifeIVF_formContainer{ box-shadow: none; border: 1px solid #ccc; }
  .gynolifeIVF_buttonRow,
  .gynolifeIVF_progressBar,
  .gynolifeIVF_stepInfo{ display: none !important; }
  .gynolifeIVF_step{ display: block !important; page-break-inside: avoid; }
}
