/* ============================================================
   Drona Sports Arena — Enrollment Form (paper-form aesthetic)
   Cream paper background, numbered fields with dotted underlines,
   pill section headers — matches dsa-poster/enrollment-form.html
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #d8d3c5;
  color: #0B2545;
  min-height: 100vh;
  padding: 24px 14px 60px;
  line-height: 1.5;
}

.page-wrap { max-width: 820px; margin: 0 auto; }

/* ============ PAPER PANEL ============ */
.paper {
  background: #f6efdc;
  background-image:
    radial-gradient(rgba(120, 95, 50, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(120, 95, 50, 0.04) 1px, transparent 1px);
  background-size: 22px 22px, 14px 14px;
  background-position: 0 0, 8px 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 32px 40px 36px;
  position: relative;
}

/* ============ LETTERHEAD ============ */
.letterhead {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0B2545;
  position: relative;
}
.letterhead .logo {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0B2545;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}
.letterhead .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.letterhead .brand-info { flex: 1; min-width: 0; }
.letterhead .brand-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.letterhead .brand-name {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: #0B2545;
  line-height: 1;
}
.letterhead .tagline {
  font-family: 'Dancing Script', cursive;
  font-size: 16px;
  font-weight: 600;
  color: #5a6b85;
  font-style: italic;
}
.letterhead .contacts {
  font-size: 12px;
  color: #1a3358;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.letterhead .contacts .item { display: inline-flex; align-items: center; gap: 4px; }
.letterhead .contacts .ico { color: #F77F00; }

.letterhead .date-block {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0B2545;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.letterhead .date-block .value {
  border-bottom: 1.2px solid #0B2545;
  min-width: 110px;
  display: inline-block;
  text-align: center;
  padding-bottom: 1px;
  font-weight: 500;
}

/* ============ REG ROW + PHOTO ============ */
.reg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 18px;
  padding-right: 160px;
  font-size: 14px;
  font-weight: 700;
  color: #0B2545;
}
.reg-row .line {
  flex: 1;
  border-bottom: 1.5px dotted #0B2545;
  font-size: 12px;
  font-weight: 500;
  color: #8a7d5a;
  font-style: italic;
  padding-bottom: 3px;
}

.photo-corner {
  position: absolute;
  top: 145px;
  right: 36px;
  width: 140px;
  z-index: 2;
}
.photo-field {
  border: 1.5px solid #0B2545;
  background: rgba(255, 255, 255, 0.5);
  padding: 8px;
  border-radius: 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.photo-preview {
  width: 100%;
  height: 105px;
  background: #fff;
  border: 1px dashed #5a6b85;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 4px;
  color: #5a6b85;
  overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-field .upload-btn {
  width: 100%;
  background: #0B2545;
  color: #fff;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}
.photo-field .upload-btn:hover { background: #F77F00; }
.photo-field .photo-hint {
  font-size: 9.5px;
  color: #5a6b85;
  line-height: 1.4;
  font-style: italic;
}
.photo-field .photo-name {
  font-size: 10px;
  color: #F77F00;
  font-weight: 600;
  word-break: break-all;
}

/* ============ FIELD ROWS ============ */
.fields { display: flex; flex-direction: column; gap: 12px; }
.fields.tight { gap: 8px; }

.row {
  display: grid;
  grid-template-columns: 32px minmax(160px, 1fr) 2.5fr;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 14px;
}
.row.indent-photo { padding-right: 160px; }
.row.two-col {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.row.two-col .sub { display: flex; flex-direction: column; gap: 3px; }

.row .num {
  font-weight: 700;
  color: #0B2545;
  font-size: 14px;
  align-self: center;
  text-align: right;
}
.row .lbl {
  font-weight: 600;
  color: #0B2545;
  font-size: 14px;
  align-self: center;
}
.row .lbl .hint {
  font-size: 11px;
  font-weight: 500;
  color: #5a6b85;
  font-style: italic;
}
.row .lbl .req { color: #c0392b; }

.row input[type=text],
.row input[type=tel],
.row input[type=email],
.row input[type=date],
.row input[type=number],
.row select,
.row textarea,
.sub input,
.sub select,
.sub textarea {
  border: none;
  border-bottom: 1.5px dotted #0B2545;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #0B2545;
  padding: 4px 2px;
  width: 100%;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
}
.row input:focus,
.row select:focus,
.row textarea:focus,
.sub input:focus,
.sub select:focus,
.sub textarea:focus {
  border-bottom: 2px solid #F77F00;
  background: rgba(255, 248, 230, 0.4);
}
.row textarea, .sub textarea { resize: vertical; min-height: 30px; }
.row select, .sub select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%230B2545' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 18px;
}

/* CHECKBOXES (sport selection, batch radios) */
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  padding-bottom: 4px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0B2545;
  cursor: pointer;
}
.check input { display: none; }
.check .box {
  width: 16px;
  height: 16px;
  border: 1.5px solid #0B2545;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.check input:checked + .box {
  background: #F77F00;
  border-color: #F77F00;
}
.check input:checked + .box::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.checks.radio .check .box { border-radius: 50%; }
.checks.radio .check input:checked + .box::after { content: ''; }
.checks.radio .check input:checked + .box {
  background: #fff;
  border-color: #F77F00;
  box-shadow: inset 0 0 0 3px #F77F00;
}

/* ============ ID PROOF UPLOAD ROW ============ */
.id-upload-row {
  grid-column: 2 / -1;
  margin-top: 6px;
}
.lbl-mini {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5a6b85;
  font-style: italic;
  margin-bottom: 4px;
}
.id-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px dashed #0B2545;
  border-radius: 4px;
}
.id-upload.has-file { background: #fff8ee; border-style: solid; border-color: #F77F00; }
.upload-btn.small {
  background: #0B2545;
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}
.upload-btn.small:hover { background: #F77F00; }
.id-preview {
  flex: 1;
  font-size: 12px;
  color: #5a6b85;
  font-style: italic;
  min-width: 0;
  word-break: break-all;
}
.id-upload.has-file .id-preview { color: #0B2545; font-weight: 600; font-style: normal; }
.id-upload .photo-hint {
  font-size: 10.5px;
  color: #5a6b85;
  font-style: italic;
  flex-basis: 100%;
}

/* ============ EXTRAS (collapsible) ============ */
.extras {
  margin: 22px 0 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px dashed #0B2545;
  border-radius: 4px;
}
.extras summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #0B2545;
  text-transform: uppercase;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.extras summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #0B2545;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 18px;
}
.extras[open] summary::before { content: '−'; }
.extras summary .hint {
  font-weight: 500;
  font-style: italic;
  color: #5a6b85;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11.5px;
}
.extras .fields { margin-top: 12px; }

/* ============ PILL SECTION HEADERS ============ */
.pill-header {
  display: block;
  text-align: center;
  margin: 22px auto 14px;
  background: #0B2545;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2.5px;
  padding: 8px 36px;
  border-radius: 100px;
  width: fit-content;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  border: 1.5px solid #F77F00;
}

/* ============ RULES ============ */
.rules {
  padding: 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #1a3358;
  margin-bottom: 10px;
}
.rules ol { padding-left: 20px; }
.rules li { margin-bottom: 6px; padding-left: 3px; }
.rules li::marker { font-weight: 700; color: #0B2545; }

/* ============ DECLARATION ============ */
.declaration {
  padding: 4px 8px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #1a3358;
  text-align: justify;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 8px 18px;
  padding: 10px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #d4cbb0;
  font-size: 13.5px;
  font-weight: 600;
  color: #0B2545;
  cursor: pointer;
}
.consent-row input { accent-color: #F77F00; margin-top: 2px; flex-shrink: 0; }

/* ============ SIGNOFF ============ */
.signoff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
  margin-top: 18px;
  padding: 0 8px;
}
.signoff-field { display: flex; flex-direction: column; gap: 4px; }
.signoff-field .lbl {
  font-size: 13px;
  font-weight: 700;
  color: #0B2545;
}
.signoff-field input {
  border: none;
  border-bottom: 1.5px dotted #0B2545;
  background: transparent;
  padding: 4px 2px;
  font-family: inherit;
  font-size: 14px;
  color: #0B2545;
  outline: none;
}
.signoff-field input:focus {
  border-bottom: 2px solid #F77F00;
  background: rgba(255, 248, 230, 0.4);
}
.submit-wrap { text-align: right; }

/* ============ SUBMIT BUTTON ============ */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #F77F00 0%, #d96b00 100%);
  color: #fff;
  padding: 14px 36px;
  border: 1.5px solid #0B2545;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(247,127,0,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(247,127,0,0.45);
}
.btn:disabled {
  background: #b0b8c5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  border-color: #b0b8c5;
}

/* ============ ALERT ============ */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 14px;
}
.alert.error {
  background: #fde7e7;
  color: #b71c1c;
  border-left: 4px solid #b71c1c;
}
.alert.success {
  background: #d1f4dd;
  color: #1c8a3f;
  border-left: 4px solid #1c8a3f;
}

/* ============ SUCCESS SCREEN ============ */
.success-screen {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.success-screen .check {
  width: 70px; height: 70px;
  background: #d1f4dd;
  color: #1c8a3f;
  border-radius: 50%;
  font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid #1c8a3f;
}
.success-screen h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: #0B2545;
  margin-bottom: 8px;
}
.success-screen p {
  font-size: 14px;
  color: #5a6b85;
  margin-bottom: 6px;
}
.success-screen .ref {
  display: inline-block;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed #0B2545;
  border-radius: 4px;
  padding: 8px 16px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #F77F00;
  margin: 14px 0 18px;
  font-size: 15px;
}

/* ============ PAGE FOOTER ============ */
.page-footer {
  text-align: center;
  font-size: 11px;
  color: #5a6b85;
  margin-top: 18px;
  letter-spacing: 0.8px;
  line-height: 1.6;
}
.page-footer .phone { color: #F77F00; font-weight: 700; }

/* ============ RESPONSIVE ============ */

/* Tablet: photo moves below, rows go single-column */
@media (max-width: 720px) {
  body { padding: 14px 10px 40px; }
  .paper { padding: 22px 22px 26px; }

  .letterhead { flex-wrap: wrap; padding-bottom: 80px; }
  .letterhead .brand-name { font-size: 24px; letter-spacing: 2px; }
  .letterhead .tagline { font-size: 14px; }
  .letterhead .date-block {
    position: absolute;
    top: auto;
    bottom: 12px;
    left: 0;
    right: auto;
    font-size: 12px;
  }

  .photo-corner {
    position: static;
    width: 100%;
    margin: 8px 0 16px;
    max-width: 200px;
  }
  .photo-preview { height: 150px; }

  .reg-row, .row.indent-photo { padding-right: 0; }

  .row {
    grid-template-columns: 26px 1fr;
    gap: 4px 8px;
  }
  .row .lbl {
    grid-column: 2;
    font-size: 13px;
    margin-bottom: 2px;
  }
  .row input,
  .row select,
  .row textarea,
  .row .checks,
  .row .id-upload-row {
    grid-column: 2;
  }
  .row.two-col { grid-template-columns: 1fr 1fr; }
  .row.two-col .sub { grid-column: auto; }

  .signoff { grid-template-columns: 1fr; }
  .submit-wrap { text-align: center; }
  .btn { width: 100%; max-width: 320px; padding: 14px 24px; }

  /* 16px input font prevents iOS zoom on focus */
  .row input,
  .row select,
  .row textarea,
  .sub input,
  .sub select,
  .sub textarea,
  .signoff-field input {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .paper { padding: 18px 16px 22px; }
  .letterhead .logo { width: 56px; height: 56px; }
  .letterhead .brand-name { font-size: 20px; letter-spacing: 1.5px; }
  .letterhead .tagline { font-size: 13px; }
  .letterhead .contacts { font-size: 11px; gap: 2px 10px; }
  .pill-header { padding: 7px 22px; font-size: 12px; letter-spacing: 2px; }
  .rules { font-size: 12.5px; }
  .declaration { font-size: 13px; }
  .row.two-col { grid-template-columns: 1fr; }
}
