/* ════════════════════════════════════════════════
   ACE Summer Winter Camp Enrollment Form  ·  form.css
   Palette: Deep Navy #003366 · Gold #c8b400 · Sky #e8f4fd
════════════════════════════════════════════════ */

:root {
  --ace-navy:      #003366;
  --ace-navy-mid:  #005599;
  --ace-gold:      #c8b400;
  --ace-gold-lt:   #f0e87a;
  --ace-sky:       #e8f4fd;
  --ace-border:    #d0dce8;
  --ace-text:      #1a2a3a;
  --ace-muted:     #607080;
  --ace-white:     #ffffff;
  --ace-radius:    10px;
  --ace-shadow:    0 4px 24px rgba(0,51,102,.10);
}

/* ── Wrapper ── */
.ace-sw-wrap {
  max-width: 720px;
  margin: 0 auto 40px;
  background: var(--ace-white);
  border-radius: var(--ace-radius);
  box-shadow: var(--ace-shadow);
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Header ── */
.ace-sw-header {
  background: linear-gradient(135deg, var(--ace-navy) 0%, var(--ace-navy-mid) 60%, #006688 100%);
  padding: 32px 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ace-sw-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 32px;
  background: var(--ace-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.ace-sw-title {
  margin: 0 0 4px;
  color: var(--ace-white);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.ace-sw-subtitle {
  margin: 0;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 400;
}

/* ── Animated sun decoration ── */
.ace-sw-sun {
  display: inline-block;
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}
.ace-sw-sun-core {
  display: block;
  width: 28px; height: 28px;
  background: var(--ace-gold-lt);
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  box-shadow: 0 0 16px 4px rgba(200,180,0,.5);
  animation: ace-pulse 2.4s ease-in-out infinite;
}
.ace-sw-ray {
  display: block;
  position: absolute;
  width: 4px; height: 12px;
  background: var(--ace-gold-lt);
  border-radius: 2px;
  top: 50%; left: 50%;
  transform-origin: 50% 100%;
  opacity: .85;
  transform: rotate(var(--r)) translateY(-22px) translateX(-50%);
  animation: ace-spin 8s linear infinite;
}
@keyframes ace-pulse {
  0%,100% { transform: translate(-50%,-50%) scale(1);   opacity:1; }
  50%      { transform: translate(-50%,-50%) scale(1.12); opacity:.85; }
}
@keyframes ace-spin {
  from { transform: rotate(var(--r)) translateY(-22px) translateX(-50%); }
  to   { transform: rotate(calc(var(--r) + 360deg)) translateY(-22px) translateX(-50%); }
}

/* ── Body ── */
.ace-sw-body {
  padding: 28px 36px 36px;
}

/* ── Messages ── */
.ace-sw-messages {
  display: none;
  padding: 13px 16px;
  border-radius: 7px;
  margin-bottom: 20px;
  font-size: .92em;
  font-weight: 500;
  line-height: 1.5;
}
.ace-sw-messages:not(:empty) { display: block; }
.ace-sw-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}
.ace-sw-error {
  background: #fce4ec;
  color: #880e4f;
  border: 1px solid #f48fb1;
}

/* ── Section labels ── */
.ace-sw-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ace-navy);
  border-bottom: 2px solid var(--ace-gold);
  padding-bottom: 5px;
  margin: 22px 0 16px;
}
.ace-sw-section-label:first-of-type { margin-top: 0; }

/* ── Rows ── */
.ace-sw-row { margin-bottom: 14px; }
.ace-sw-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .ace-sw-row--2 { grid-template-columns: 1fr; }
  .ace-sw-body   { padding: 20px 18px 28px; }
  .ace-sw-header { padding: 24px 18px 22px; }
}

/* ── Fields ── */
.ace-sw-field label {
  display: block;
  font-size: .84em;
  font-weight: 600;
  color: var(--ace-text);
  margin-bottom: 5px;
}
.ace-req { color: #c0392b; }

.ace-sw-field input,
.ace-sw-field select,
.ace-sw-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1.5px solid var(--ace-border);
  border-radius: 7px;
  font-size: .94em;
  color: var(--ace-text);
  background: #fafdff;
  transition: border-color .18s, box-shadow .18s;
  font-family: inherit;
}
.ace-sw-field input:focus,
.ace-sw-field select:focus,
.ace-sw-field textarea:focus {
  outline: none;
  border-color: var(--ace-navy-mid);
  box-shadow: 0 0 0 3px rgba(0,85,153,.12);
  background: #fff;
}
.ace-sw-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23003366' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 32px;
}
.ace-sw-field textarea { resize: vertical; min-height: 80px; }

/* ── Honeypot hidden field ── */
.ace-sw-hp {
  position: absolute;
  left: -9999px;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* ── Submit button ── */
.ace-sw-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
  padding: 14px 24px;
  background: linear-gradient(90deg, var(--ace-navy) 0%, var(--ace-navy-mid) 50%, var(--ace-gold) 100%);
  color: var(--ace-white);
  font-size: 1em;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .3px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.ace-sw-submit:hover:not(:disabled)  { opacity: .9; transform: translateY(-1px); }
.ace-sw-submit:active:not(:disabled) { transform: translateY(0); }
.ace-sw-submit:disabled { cursor: not-allowed; opacity: .65; }

/* ── Spinner ── */
.ace-sw-btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ace-spin-btn .7s linear infinite;
}
.ace-sw-loading .ace-sw-btn-spinner { display: inline-block; }
@keyframes ace-spin-btn {
  to { transform: rotate(360deg); }
}
