/* enji.css — 園児向け団体保険ページ */

/* ===== Radio buttons in forms ===== */
.form-row label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 600;
  padding: 0.4rem 0;
}
.form-row label:has(input[type="radio"]) + .example {
  margin-left: 2.2rem;
  margin-bottom: 0.6rem;
}
.form-row input[type="radio"] {
  width: 1.8rem;
  height: 1.8rem;
  accent-color: #117713;
  cursor: pointer;
}

/* ===== Button color variants ===== */
.btn-primary.btn-primary--blue {
  background: #0057a4;
  color: #fff;
}
.btn-primary.btn-primary--blue:hover,
.btn-primary.btn-primary--blue:focus {
  background: #004080;
}
.btn-primary.btn-primary--orange {
  background: #e67e22;
  color: #fff;
}
.btn-primary.btn-primary--orange:hover,
.btn-primary.btn-primary--orange:focus {
  background: #cf6d17;
}

/* ===== Hero ===== */
.enji-hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 50%, #fff9e5 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.enji-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(17, 119, 19, 0.06);
  pointer-events: none;
}
.enji-hero__title {
  font-size: clamp(2.4rem, 2rem + 1.5vw, 3.4rem);
  color: #1a3a1a;
  margin: 0 0 1rem;
}
.enji-hero__lead {
  font-size: clamp(1.5rem, 1.3rem + 0.5vw, 1.8rem);
  color: #555;
  margin: 0;
}

/* ===== Flow Wizard ===== */
.enji-flow {
  padding: 4rem 0;
  background: #f5f8fa;
}
.flow-step {
  max-width: 100%;
  margin: 0 0 2.4rem;
}
.flow-step[hidden] {
  display: none;
}
.flow-card {
  background: #fff;
  border-radius: 16px;
  padding: 3rem 3.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  animation: flowFadeIn 0.4s ease;
}
@keyframes flowFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flow-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #117713, #0057a4);
}
.flow-card--sub::before {
  background: linear-gradient(90deg, #0057a4, #117713);
}
.flow-card--result::before {
  background: #117713;
}
.flow-card--sorry::before {
  background: #c50000;
}
.flow-step-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0057a4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.8rem;
}
.flow-question {
  font-size: clamp(1.6rem, 1.4rem + 0.5vw, 1.9rem);
  line-height: 1.7;
  margin: 2rem 0 2.4rem;
  color: #333;
}
.flow-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.flow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 1rem 2.4rem;
  border: 2px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.7rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.flow-btn:hover {
  transform: translateY(-2px);
}
.flow-btn--yes {
  background: #117713;
  color: #fff;
  box-shadow: 0 3px 10px rgba(17, 119, 19, 0.25);
}
.flow-btn--yes:hover {
  background: #0e6010;
  box-shadow: 0 5px 16px rgba(17, 119, 19, 0.35);
}
.flow-btn--no {
  background: #fff;
  color: #555;
  border-color: #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.flow-btn--no:hover {
  background: #f5f5f5;
  border-color: #999;
}
.flow-result-ok {
  font-size: 1.8rem;
  font-weight: 700;
  color: #117713;
  margin: 0 0 1rem;
}
.flow-result-sorry {
  font-size: 1.8rem;
  font-weight: 700;
  color: #c50000;
  margin: 0 0 1rem;
}
.flow-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.8rem;
  font-size: 1.7rem;
  text-decoration: none;
}
.flow-restart {
  display: block;
  margin: 1.6rem auto 0;
  padding: 0.6rem 1.2rem;
  background: none;
  border: none;
  color: #0057a4;
  font-size: 1.4rem;
  cursor: pointer;
  text-decoration: underline;
}
.flow-restart:hover {
  color: #003d73;
}

/* Disabled state for answered steps */
.flow-step--answered .flow-card {
  opacity: 0.55;
  pointer-events: none;
}

/* ===== Product Sections ===== */
.enji-product {
  padding: 4rem 0;
}
.enji-product--alt {
  background: #f5f8fa;
}
.enji-product__badge {
  display: block;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  font-size: clamp(1.6rem, 1.4rem + 0.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  background: #0057a4;
  margin-bottom: 1.6rem;
  text-align: center;
}
.enji-product__badge--hoikuen {
  background: #117713;
}
.enji-product__deadline {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  background: #fff9e5;
  border: 1px solid #ffd36b;
  border-radius: 8px;
  font-weight: 700;
  color: #8a6500;
  font-size: 1.4rem;
}

/* Discount badge */
.enji-discount {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
  border: 2px solid #0057a4;
  border-radius: 14px;
  padding: 1.6rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
}
.enji-discount--hoikuen {
  background: linear-gradient(135deg, #fce4ec 0%, #fff0f3 100%);
  border-color: #e91e63;
}
.enji-discount__rate {
  font-size: clamp(1.6rem, 1.4rem + 0.5vw, 2rem);
  font-weight: 700;
  color: #0057a4;
  margin: 0 0 0.6rem;
  line-height: 1.5;
}
.enji-discount--hoikuen .enji-discount__rate {
  color: #c2185b;
}
.enji-discount__num {
  font-size: clamp(3.2rem, 2.8rem + 1vw, 4.4rem);
  font-weight: 900;
  line-height: 1;
}
.enji-discount__pct {
  font-size: clamp(2rem, 1.6rem + 0.8vw, 2.8rem);
  font-weight: 900;
}
.enji-discount__detail {
  font-size: 1.4rem;
  color: #444;
  margin: 0 0 0.4rem;
  line-height: 1.6;
}
.enji-discount__note {
  font-size: 1.3rem;
  color: #888;
  margin: 0;
  line-height: 1.6;
}

/* Product row (discount + text + pamphlet) */
.enji-product__row {
  display: flex;
  gap: 2.4rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.enji-product__row .enji-discount {
  flex-shrink: 0;
  width: 280px;
  margin-bottom: 0;
}
.enji-product__text {
  flex: 1;
}
.enji-product__pamphlet {
  flex-shrink: 0;
}
.enji-product__pamphlet img {
  width: 160px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.enji-product__pamphlet img:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.enji-pamphlet-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: 1.5rem;
  color: #0057a4;
}
.enji-pamphlet-link:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .enji-product__row {
    flex-direction: column;
    align-items: center;
  }
  .enji-product__row .enji-discount {
    width: 100%;
  }
  .enji-product__pamphlet img {
    width: 140px;
  }
}

/* Coverage cards grid */
.enji-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-top: 2rem;
}
.enji-coverage-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #0057a4;
}
.enji-coverage-card__img {
  float: left;
  max-width: 90px;
  height: auto;
  margin: 0 1.2rem 0.6rem 0;
}
.enji-product--alt .enji-coverage-card {
  border-left-color: #117713;
}
.enji-coverage-card h3 {
  font-size: 1.7rem;
  color: #0057a4;
  margin: 0 0 0.8rem;
}
.enji-product--alt .enji-coverage-card h3 {
  color: #117713;
}
.enji-coverage-card .small {
  font-size: 1.3rem;
  font-weight: 400;
  color: #888;
}
.enji-coverage-card p {
  margin: 0 0 0.6rem;
  line-height: 1.7;
}

/* ===== Form Page Styles (shared with school-code-inquiry) ===== */
.form-hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 50%, #f3e5f5 100%);
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.form-hero .page-title {
  border: none;
  padding: 0;
  text-align: center;
  font-size: clamp(2.2rem, 1.8rem + 1.2vw, 3.2rem);
  color: #1a3a1a;
  margin: 0 0 0.8rem;
}
.form-hero .page-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #117713, #0057a4);
  border-radius: 2px;
  margin: 1rem auto 0;
}
.form-hero .note--lead {
  font-size: clamp(1.5rem, 1.3rem + 0.5vw, 1.8rem);
  color: #555;
  margin: 1rem 0 0;
}

.form-section {
  padding: 0 0 3rem;
  background: #f8fafb;
}
.form-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 2rem;
}
.form-fieldset {
  border: none;
  border-radius: 16px;
  padding: 2rem 2.4rem;
  background: #fff;
  font-size: 1.8rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.form-fieldset::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #117713, #0057a4);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.form-fieldset:focus-within {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.form-fieldset:focus-within::before {
  opacity: 1;
}
.form-fieldset > legend {
  font-weight: 700;
  color: #1a3a1a;
  padding: 0;
  font-size: 1.9rem;
  margin: 0 0 0.4rem;
}
.form-row {
  display: grid;
  gap: 0.6rem;
  align-items: center;
}
.form-row + .form-row {
  margin-top: 1rem;
}
.form-section label {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: #444;
}
.form-section input[type="text"],
.form-section input[type="email"],
.form-section textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1.5px solid #d4d8de;
  border-radius: 12px;
  font: inherit;
  color: inherit;
  background: #fafbfc;
  transition: all 0.2s ease;
}
.form-section input:hover,
.form-section textarea:hover {
  border-color: #b0b8c4;
}
.form-section input:focus:not(.is-invalid),
.form-section textarea:focus:not(.is-invalid) {
  background: #fff;
  border-color: #117713;
  box-shadow: 0 0 0 3px rgba(17, 119, 19, 0.12);
  outline: none;
}
.form-section textarea {
  min-height: 100px;
  resize: vertical;
}
.form-section .note {
  color: #666;
  margin: 0.4rem 0 0;
  font-size: 1.5rem;
}
.form-section .note--center {
  text-align: center;
}

/* Validation */
.field-prompt,
.form-error {
  color: #dc2626;
  font-weight: 600;
  font-size: 1.4rem;
  margin-top: 0.4rem;
}
.form-section input.is-invalid,
.form-section textarea.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* Test mail */
.testmail-actions {
  margin-top: 0.8rem;
}
.btn-testmail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #0057a4, #003d73);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 87, 164, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-testmail:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 87, 164, 0.3);
}
.btn-testmail:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-testmail--success {
  background: linear-gradient(135deg, #117713, #0e6010);
}
.testmail-note {
  margin-top: 0.8rem;
  font-size: 1.4rem;
  color: #555;
  line-height: 1.6;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 1rem 1.2rem;
}
.testmail-result {
  margin-top: 0.6rem;
  font-size: 1.5rem;
  line-height: 1.6;
}
.spam-red {
  color: #dc2626;
  font-weight: 700;
}
.spam-blue {
  color: #1d65eb;
  font-weight: 700;
}
.testmail-next-msg__lead {
  color: #1d65eb;
  font-weight: 700;
}

/* Form flow steps */
.form-flow {
  background: #f0faf0;
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  padding: 1.6rem 2rem;
  margin-bottom: 2rem;
}
.form-flow__title {
  font-weight: 700;
  font-size: 1.6rem;
  color: #117713;
  margin: 0 0 1rem;
}
.form-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.form-flow__steps li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 1.5rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  color: #333;
}
.form-flow__steps li:last-child {
  margin-bottom: 0;
}
.form-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #117713;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Name fields (sei/mei) */
.name-fields {
  display: flex;
  gap: 1.2rem;
}
.name-fields > div {
  flex: 1;
}
.name-fields .example {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.3rem;
  color: #888;
}

/* Submit button */
.form-actions {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.2rem 3rem;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #117713 0%, #0e6010 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 119, 19, 0.3), 0 2px 6px rgba(17, 119, 19, 0.15);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.btn-submit:hover::after {
  left: 100%;
}
.btn-submit--xl {
  padding: 1.4rem 3.6rem;
  font-size: 2rem;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 119, 19, 0.35);
}
.btn-submit--alert {
  background: #dc2626 !important;
  color: #fff !important;
}

/* Lock states */
.lock-after-email {
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

/* Legal block */
.legal-block {
  margin-top: 2rem;
}
.legal-title {
  margin-top: 0;
  font-size: 1.8rem;
  color: #1a3a1a;
}
.legal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4d8de, transparent);
  margin: 0.8rem 0;
}
.legal-paragraph {
  font-size: 1.5rem;
  line-height: 1.7;
  color: #555;
}
.note.legal-note.note--center {
  margin: 1.2rem 0;
  font-size: 1.3rem;
  color: #888;
}

/* Overlay/Spinner */
.submit-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.submit-overlay.is-show {
  opacity: 1;
}
.submit-overlay__inner {
  text-align: center;
}
.submit-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: #117713;
  animation: enji-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
.submit-text {
  font-size: 1.6rem;
  color: #333;
  font-weight: 600;
}
@keyframes enji-spin {
  to { transform: rotate(360deg); }
}

/* reCAPTCHA badge */
.grecaptcha-badge { visibility: hidden !important; }

/* ===== Thank you page ===== */
.thankyou-section {
  padding: 4rem 0;
  text-align: center;
}
.thankyou-section .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #117713, #0e6010);
  color: #fff;
  font-size: 4rem;
  margin-bottom: 2rem;
}
.thankyou-section h1 {
  font-size: clamp(2.2rem, 1.8rem + 1.2vw, 3rem);
  color: #1a3a1a;
  margin: 0 0 1.2rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .flow-card {
    padding: 2rem 1.6rem;
    border-radius: 12px;
  }
  .form-fieldset {
    padding: 1.6rem 1.4rem;
    border-radius: 12px;
  }
  .enji-coverage-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .enji-hero {
    padding: 2.5rem 0 2rem;
  }
  .flow-btn {
    min-width: 110px;
    padding: 0.8rem 1.6rem;
    font-size: 1.5rem;
  }
}
