/* =========================
   ROOT VARIABLES
========================= */
:root {
  --green-main: #2f7d5b;
  --green-dark: #256a4c;
  --green-soft: #e6f3ee;
  --green-ultra-soft: #f6fbf8;
  --accent-soft: #fff1cc;

  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e3ebe6;
  --white: #ffffff;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
  --shadow-lift: 0 18px 40px rgba(0,0,0,0.12);
}

/* =========================
   BASE RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--green-ultra-soft);
  overflow-x: hidden;
}

/* animated background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(47,125,91,0.12), transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(255,183,3,0.10), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(47,125,91,0.08), transparent 50%);
  animation: floatBg 18s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes floatBg {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}

/* =========================
   HERO
========================= */
.register-hero {
  background: linear-gradient(180deg, var(--green-soft), var(--green-ultra-soft));
  padding: 72px 24px 56px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.pill {
  display: inline-block;
  background: var(--green-main);
  /*color: white;*/
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.register-hero h1 {
  font-size: 38px;
  margin: 18px 0 10px;
}

.hero-subtext {
  color: var(--muted);
  font-size: 16px;
}

/* =========================
   FORM WRAPPER
========================= */
.form-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 120px;
}

/* =========================
   FORM CARDS
========================= */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 48px 0;
  box-shadow: var(--shadow-soft);
  border: 1px solid transparent;

  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    box-shadow 0.4s ease,
    border 0.4s ease;
}

.form-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.form-card:hover {
  box-shadow: 0 18px 40px rgba(47,125,91,0.15);
  border: 1px solid rgba(47,125,91,0.25);
}

.form-card.soft {
  background:
    linear-gradient(180deg, var(--green-ultra-soft), #ffffff),
    repeating-linear-gradient(
      45deg,
      rgba(47,125,91,0.03),
      rgba(47,125,91,0.03) 2px,
      transparent 2px,
      transparent 10px
    );
}
.form-card h2 {
  cursor: pointer;
}
.form-card h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 24px;
  position: relative;
  padding-left: 12px;
}

.form-card h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  height: 70%;
  width: 5px;
  background: linear-gradient(
    to bottom,
    var(--green-main),
    var(--accent-soft)
  );
  border-radius: 4px;
}

/* =========================
   FIELDS
========================= */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--green-main);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--green-main);
  background: var(--green-ultra-soft);
  box-shadow: 0 0 0 2px rgba(47,125,91,0.15);
  transform: translateY(-1px);
}

/* =========================
   GRID
========================= */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* =========================
   CONDITIONAL
========================= */
.hidden {
  display: none;
}

/* =========================
   CHECKBOX GROUP (CAMP WEEKS)
========================= */
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.checkbox-group label:hover {
  background: var(--green-ultra-soft);
  transform: translateX(4px);
}

.checkbox-group input {
  accent-color: var(--green-main);
}

/* =========================
   INLINE CHECKBOX
========================= */
.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
}

.inline-link {
  color: var(--green-main);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.inline-link:hover {
  color: var(--green-dark);
}

/* =========================
   SUBMIT
========================= */
.submit-card {
  text-align: center;
  margin-top: 72px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn.primary {
  background: var(--green-main);
  color: white;
  box-shadow: 0 10px 24px rgba(47,125,91,0.35);
}

.btn.primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97);
}

.btn.large {
  font-size: 18px;
  padding: 16px 34px;
}

.tiny-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* =========================
   MODAL
========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 51, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: calc(100% - 32px);
  position: relative;
  box-shadow: var(--shadow-lift);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .register-hero h1 {
    font-size: 30px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 28px 22px;
    margin: 36px 0;
  }

  .submit-card {
    margin-top: 48px;
  }

  .btn.large {
    width: 100%;
  }
}
/* =========================
   COLLAPSIBLE FORM SECTIONS
========================= */
.form-card {
  cursor: default;
}

.form-card.collapsed {
  padding-bottom: 20px;
}

.form-card.collapsed .field,
.form-card.collapsed .field-grid,
.form-card.collapsed textarea,
.form-card.collapsed .checkbox-group {
  display: none;
}

.form-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-card h2::after {
  content: "+";
  font-size: 22px;
  color: var(--green-main);
  transition: transform 0.3s ease;
}

.form-card.active h2::after {
  content: "-";
}
.form-error {
  background: #fff3f3;
  color: #b42318;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.hidden {
  display: none;
}

.field-error {
  border: 2px solid #e63946 !important;
  background: #fffafa;
}
#missingFieldsModal ul {
  margin-top: 12px;
  padding-left: 18px;
}

#missingFieldsModal li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}
/* Hide all modals by default */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Show modal when active */
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
#missingFieldsModal .modal-close {
  display: none;
}
.time-options {
  margin-left: 28px;
  margin-top: 8px;
  margin-bottom: 12px;
  display: none;
}

.time-options label {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
}
