/* renewal.css — hokenkikaku ご継続意向確認 */

.renewal-lead {
  text-align: center;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 2.4rem;
}

.renewal-note {
  color: #64748b;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

/* ── Renewal choice cards ── */
.renewal-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 0.8rem;
}

.renewal-choice {
  display: flex;
  cursor: pointer;
  margin: 0;
}

.renewal-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.renewal-choice__card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.6rem 1.8rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.08s ease;
  flex: 1;
}

.renewal-choice__card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.renewal-choice input[type="radio"]:checked + .renewal-choice__card--continue {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15), 0 4px 14px rgba(0,0,0,0.08);
}

.renewal-choice input[type="radio"]:checked + .renewal-choice__card--discontinue {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15), 0 4px 14px rgba(0,0,0,0.08);
}

.renewal-choice input[type="radio"]:focus-visible + .renewal-choice__card {
  outline: 3px solid rgba(45,138,98,0.4);
  outline-offset: 2px;
}

.renewal-choice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 2.2rem;
  transition: background 0.2s, transform 0.15s ease;
}

.renewal-choice__card--continue .renewal-choice__icon {
  background: #d1fae5;
}
.renewal-choice__card--continue .renewal-choice__icon::after {
  content: "\2713";
  color: #059669;
  font-weight: 700;
}
.renewal-choice input[type="radio"]:checked + .renewal-choice__card--continue .renewal-choice__icon {
  background: #10b981;
  transform: scale(1.05);
}
.renewal-choice input[type="radio"]:checked + .renewal-choice__card--continue .renewal-choice__icon::after {
  color: #fff;
}

.renewal-choice__card--discontinue .renewal-choice__icon {
  background: #fef3c7;
}
.renewal-choice__card--discontinue .renewal-choice__icon::after {
  content: "\2715";
  color: #d97706;
  font-weight: 700;
}
.renewal-choice input[type="radio"]:checked + .renewal-choice__card--discontinue .renewal-choice__icon {
  background: #f59e0b;
  transform: scale(1.05);
}
.renewal-choice input[type="radio"]:checked + .renewal-choice__card--discontinue .renewal-choice__icon::after {
  color: #fff;
}

.renewal-choice__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.renewal-choice__label {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.renewal-choice__desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

/* ── Privacy section ── */
.renewal-privacy {
  margin-top: 2rem;
  padding: 1.6rem 2rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.renewal-privacy p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}
.renewal-privacy p + p {
  margin-top: 0.6rem;
}

/* ── Submit area ── */
.form-submit-area {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 2.4rem;
}

.btn-submit-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 3.2rem;
  border: 0;
  border-radius: 999px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #2d8a62, #1e6b4a);
  color: #fff;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(45,138,98,0.3);
  transition: transform 0.08s ease, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-submit-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45,138,98,0.35);
}

.btn-submit-large:active {
  transform: translateY(0);
  opacity: 0.9;
}

.btn-submit-large:focus-visible {
  outline: 3px solid rgba(45,138,98,0.5);
  outline-offset: 3px;
}

.form-note-small {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}
.form-note-small a {
  color: #2d8a62;
  text-decoration: underline;
}

.form-error-msg {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

.is-invalid {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* ── Submit overlay ── */
.submit-overlay[hidden] { display: none !important; }
.submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
}
.submit-overlay__inner {
  text-align: center;
}
.submit-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #2d8a62;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit-text {
  font-size: 1.1rem;
  color: #334155;
  font-weight: 600;
}

/* Testmail section */
.testmail-section {
  margin-top: 1.2rem;
  padding: 1.2rem 1.6rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.testmail-section__inner {}

.testmail-section__lead {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 0.8rem;
}

.testmail-section__actions {
  margin-bottom: 0.6rem;
}

.btn-testmail {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.6rem;
  border: 2px solid #2d8a62;
  border-radius: 999px;
  background: transparent;
  color: #2d8a62;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-testmail:hover {
  background: #2d8a62;
  color: #fff;
}

.btn-testmail:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-testmail--success {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.testmail-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.testmail-result {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.text-blue { color: #2563eb; }
.text-warning { color: #dc2626; }

.after-testmail {
  transition: opacity 0.3s ease;
}

.btn-submit-large--alert {
  background: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.btn-submit-large--alert:hover {
  transform: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .renewal-choices {
    grid-template-columns: 1fr;
  }
  .renewal-choice__card {
    padding: 1.2rem 1.4rem;
  }
  .renewal-choice__icon {
    width: 4rem;
    height: 4rem;
    font-size: 1.8rem;
  }
  .renewal-privacy {
    padding: 1.2rem 1.4rem;
  }
}

@media (max-width: 480px) {
  .btn-submit-large {
    width: 100%;
  }
}
