/* Little Mozarts — digital enrolment form (styled after the printed PDF forms) */

.form-page { background: #eef6fb; padding: 44px 16px 90px; }
.paper { max-width: 920px; margin: 0 auto; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: 0 20px 50px rgba(2, 68, 173, .12); }
.paper-head { background: var(--navy); display: flex; justify-content: center; padding: 22px 16px 18px; }
.paper-head img { width: 250px; }
#enrol-form { padding: 10px 44px 40px; }

.form-title { color: var(--navy); font-weight: 700; font-size: clamp(28px, 5vw, 42px); text-align: center; margin: 22px 0 6px; }
.enrol-date { display: flex; flex-direction: column; align-items: center; margin: 0 auto 8px; }
.enrol-date input { border: 0; border-bottom: 2px solid var(--navy); text-align: center; font: 500 16px "Poppins", sans-serif; color: var(--navy); padding: 6px 10px; background: transparent; }
.enrol-date span { font-weight: 600; font-size: 14px; margin-top: 6px; }
.form-help { text-align: center; font-size: 13px; color: #555; margin: 14px 0 0; }
.req { color: var(--orange); font-style: normal; font-weight: 700; }

.fsec { margin-top: 34px; scroll-margin-top: 110px; }
.sec-title { text-align: center; margin: 0 0 12px; }
.sec-title span { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; font-size: 17px; line-height: 1.25; padding: 6px 20px; border-radius: 999px; }
.sub-title { width: fit-content; margin: 20px auto 10px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 16px; border-radius: 999px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sec-intro { font-size: 14px; text-align: center; margin: 0 0 12px; line-height: 1.55; }
.sec-intro.left { text-align: left; }

/* bordered field tables */
.ftable { border: 1.5px solid var(--navy); border-radius: 16px; overflow: hidden; background: #fff; }
.ftable.pad { padding: 14px 16px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; }
.frow + .frow { border-top: 1.5px solid var(--navy); }
.frow.one { grid-template-columns: 1fr; }
.cell { display: grid; grid-template-columns: minmax(118px, 38%) 1fr; align-items: stretch; min-height: 42px; }
.frow.one .cell { grid-template-columns: minmax(118px, 19%) 1fr; }
.cell + .cell { border-left: 1.5px solid var(--navy); }
.cell .lbl { font-size: 13px; letter-spacing: .02em; padding: 10px 12px; border-right: 1.5px solid var(--navy); display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.cell input, .cell select, .cell textarea, .choices .other, .range input {
  width: 100%; border: 0; background: transparent; font: 400 15px "Poppins", sans-serif; color: #0b2a6b; padding: 9px 12px; min-width: 0;
}
.cell textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
.cell input:focus, .cell select:focus, .cell textarea:focus, .choices .other:focus, .range input:focus { outline: none; background: #eaf9ff; }
.cell:focus-within .lbl { color: var(--navy); font-weight: 600; }
.cell select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230244ad' stroke-width='2'/%3E%3C/svg%3E") right 12px center no-repeat; padding-right: 30px; cursor: pointer; }
.cell.invalid, .date-block.invalid input, .inline-fields.invalid, .services.invalid, .sign-block.invalid .sig-wrap, .check.invalid, .choices.invalid { background: #fff1ec; }
.cell.invalid .lbl { color: var(--orange); font-weight: 600; }

.choices { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; }
.choices.wrap { gap: 8px 10px; }
.lbl.inline { font-weight: 600; font-size: 14px; margin-right: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; border: 1.5px solid var(--navy); color: var(--navy); border-radius: 999px; padding: 5px 13px; font-size: 13px; transition: .15s; }
.chip:hover span { background: #eaf9ff; }
.chip input:checked + span { background: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.choices .other { flex: 1 1 110px; border-bottom: 1.5px dashed #9bb3d8; padding: 5px 6px; font-size: 14px; }
.range { display: flex; flex-direction: column; }
.range .rp { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 0; }
.range .rp select { flex: 1 1 0; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--navy); padding: 6px 4px; cursor: pointer; }
.range .rp select:focus { outline: none; background: #eaf9ff; border-radius: 8px; }
.range label { flex: 1; display: flex; align-items: center; }
.range label + label { border-top: 1.5px solid var(--navy); }
.range span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8aa0c4; padding-left: 10px; min-width: 58px; }

.col-heads { display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 6px; }
.collector + .collector { margin-top: 4px; }
.pill.small { font-size: 14px; padding: .55em 1.2em; margin-top: 14px; }
#add-collector[hidden] { display: none; }

.copy-from { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 10px; flex-wrap: wrap; }
.chip-btn { border: 1.5px solid var(--cyan); background: #eaf9ff; color: var(--navy); border-radius: 999px; padding: 4px 14px; font: 600 13px "Poppins", sans-serif; cursor: pointer; }
.chip-btn:hover { background: var(--cyan); color: #fff; }

/* services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; border-radius: 16px; padding: 4px; }
.service { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--navy); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.service:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(2, 68, 173, .15); }
.service input { position: absolute; opacity: 0; }
.service .s-name { padding: 12px 10px 10px 36px; font-size: 14px; position: relative; }
.service .s-name::before { content: ""; position: absolute; left: 11px; top: 13px; width: 16px; height: 16px; border: 1.5px solid var(--navy); border-radius: 4px; background: #fff; }
.service .s-price { border-top: 1.5px solid var(--navy); text-align: center; font-weight: 700; color: var(--navy); padding: 8px; letter-spacing: .06em; }
.service input:checked ~ .s-name { background: #eaf9ff; }
.service input:checked ~ .s-name::before { background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E") center no-repeat; }
.service input:checked ~ .s-price { background: var(--navy); color: #fff; }
.service input:focus-visible ~ .s-name { outline: 3px solid var(--cyan); outline-offset: -3px; }

/* checklist */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; border-radius: 8px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.check.strong { margin-top: 18px; font-weight: 600; background: #f3f9ff; padding: 12px 14px; }
.note { font-size: 14px; line-height: 1.55; margin: 16px 0 0; }
.note.small { font-size: 13px; color: #444; margin-top: 8px; }
.note a { color: var(--navy); font-weight: 600; }

/* fee structure */
.fee-wrap { overflow-x: auto; border: 1.5px solid var(--navy); border-radius: 16px; }
.fee-struct { width: 100%; border-collapse: collapse; font-size: 14px; }
.fee-struct th, .fee-struct td { padding: 10px 12px; border-top: 1.5px solid var(--navy); }
.fee-struct thead th { border-top: 0; background: #eaf9ff; color: var(--navy); font-weight: 700; }
.fee-struct tbody th { text-align: left; font-weight: 400; width: 52%; }
.fee-struct td { text-align: center; font-weight: 600; color: var(--navy); border-left: 1.5px solid var(--navy); }
.ftable.info .cell { grid-template-columns: minmax(150px, 30%) 1fr; }
.ftable.info .val { padding: 10px 12px; font-weight: 600; color: var(--navy); font-size: 14px; }

/* legal text */
.legal { font-size: 14px; line-height: 1.6; }
.legal ol { padding-left: 22px; margin: 12px 0 0; }
.legal li { margin-bottom: 10px; padding-left: 4px; }
.legal li ol { margin-top: 6px; }
.legal li li { margin-bottom: 6px; }
.inline-fields input { border: 0; border-bottom: 1.5px solid var(--navy); font: 500 15px "Poppins", sans-serif; color: #0b2a6b; padding: 3px 4px; min-width: 220px; background: transparent; }
.inline-fields input:focus { outline: none; background: #eaf9ff; }
.fill-name { font-weight: 700; color: var(--navy); }

/* signatures */
.sign-row { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; margin-top: 22px; }
.sign-block { flex: 1 1 300px; }
.sig-wrap { position: relative; border: 1.5px dashed #9bb3d8; border-radius: 14px; background: #fbfdff; }
.sig { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #9bb3d8; font-size: 13px; pointer-events: none; }
.sig-wrap.signed .sig-hint { display: none; }
.sig-clear { position: absolute; top: 8px; right: 8px; border: 0; background: #eaf2fb; color: var(--navy); border-radius: 999px; padding: 4px 12px; font: 600 12px "Poppins", sans-serif; cursor: pointer; }
.sig-label { border-top: 1.5px solid var(--navy); margin-top: 8px; padding-top: 6px; font-size: 13px; }
.date-block { flex: 0 1 190px; }
.date-block input { width: 100%; border: 0; font: 500 15px "Poppins", sans-serif; color: #0b2a6b; padding: 8px 4px; background: transparent; }
.date-block.initials { flex-basis: 110px; }

/* submit */
.form-error { margin-top: 26px; background: #fff1ec; border: 1.5px solid var(--orange); color: #7a2000; border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.submit-row { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 32px; }
.pill.big { font-size: 18px; padding: .7em 1.6em; }
.pill:disabled { opacity: .6; cursor: wait; }
.link-btn { background: none; border: 0; color: #667; text-decoration: underline; cursor: pointer; font-size: 14px; }
.form-foot { text-align: center; color: #8a94a6; font-size: 12px; line-height: 1.6; margin: 34px 0 0; }


.consents { display: grid; gap: 10px; }
.consents .check.strong { margin-top: 0; font-weight: 500; }
.consents a { color: var(--navy); font-weight: 600; }
.consents small { font-weight: 400; color: #5b6b8c; }

/* document uploads */
.docs { display: grid; gap: 10px; }
.doc-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border: 1.5px solid var(--navy); border-radius: 16px; padding: 12px 14px; background: #fff; transition: background .2s, border-color .2s; }
.doc-row.has-files { border-color: #5fb31c; background: #f6fff0; }
.doc-row.invalid { background: #fff1ec; border-color: var(--orange); }
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-label { font-weight: 600; font-size: 14px; color: var(--navy); }
.doc-help { font-size: 12.5px; color: #5b6b8c; }
.doc-add { position: relative; flex: none; cursor: pointer; }
.doc-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.doc-add span { display: inline-block; background: var(--cyan); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.doc-add:hover span { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 150, 200, .25); }
.doc-add input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.doc-files { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.doc-files:empty { display: none; }
.doc-file { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #f3f8ff; border-radius: 10px; padding: 6px 8px; }
.doc-file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-file small { color: #7a88a6; }
.doc-file .st { flex: none; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.doc-file .st.ok { color: #3c8a0e; }
.doc-file .st.err { color: var(--orange); }
.doc-file .st.busy { color: var(--navy); }
.mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: #d7e4f7; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--navy)); transition: width .2s; }
.doc-remove, .doc-retry { border: 0; background: #e2ebf8; color: var(--navy); border-radius: 999px; cursor: pointer; font: 700 12px "Poppins", sans-serif; }
.doc-remove { width: 24px; height: 24px; font-size: 16px; line-height: 1; flex: none; }
.doc-retry { padding: 2px 10px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-progress { text-align: center; margin-top: 18px; color: var(--navy); font-weight: 600; font-size: 14px; }
.send-progress .bar { width: min(320px, 80%); height: 8px; margin: 0 auto 8px; border-radius: 4px; background: #d7e4f7; overflow: hidden; }
.send-progress .bar span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--orange)); border-radius: 4px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.sent-note { font-size: 18px; color: #3c8a0e; font-weight: 600; }
.closed-box { text-align: center; padding: 20px 10px 30px; }
.closed-box img { width: 110px; margin: 0 auto 10px; }
.closed-box p { font-size: 16px; line-height: 1.6; max-width: 520px; margin: 0 auto 18px; }

/* optional extra numbers, tucked away until needed */
.more-fields { margin: -1px 0 0; }
.more-fields > summary { cursor: pointer; list-style: none; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--navy); }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary small { color: #8aa0c4; font-weight: 400; }
.more-fields[open] > summary { color: #8aa0c4; }
/* nothing may be wider than the screen (stops the page sliding left and right on phones) */
.frow > .cell, .cell > *, .range label, .range input { min-width: 0; }
.cell input, .cell select, .cell textarea, .range input { max-width: 100%; }
@media (max-width: 640px) {
  .doc-row { flex-direction: column; }
  .doc-add { align-self: stretch; text-align: center; }
  .doc-add span { display: block; }
  #enrol-form { padding: 6px 16px 30px; }
  .paper-head img { width: 190px; }
  .frow, .frow.one { grid-template-columns: minmax(0, 1fr); }
  .range { flex-direction: column; }
  .range label { flex: none; width: 100%; padding: 4px 0; }
  .range label + label { border-left: 0; border-top: 1.5px solid var(--navy); }
  .range span { min-width: 52px; }
  .cell + .cell { border-left: 0; border-top: 1.5px solid var(--navy); }
  .cell, .frow.one .cell, .ftable.info .cell { grid-template-columns: minmax(0, 1fr); }
  .cell .lbl { border-right: 0; padding: 8px 12px 0; font-size: 12px; color: #4b5d80; }
  .col-heads { display: none; }
  .checklist { grid-template-columns: 1fr; }
  .inline-fields input { min-width: 0; width: 100%; margin: 4px 0; }
  .sec-title span { font-size: 15px; }
}

/* printing: the form is submitted online only — no paper copies */
@media print {
  .site-header, .site-footer, .form-page, .modal { display: none !important; }
  body::before { content: "Little Mozarts enrolment forms are completed and submitted online. Thank you!"; display: block; font: 600 16px sans-serif; padding: 40px; text-align: center; }
}

/* "what did I miss?" bar */
.fix-bar { position: fixed; left: 50%; top: calc(80px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100vw - 24px); background: #fff1ec; border: 2px solid var(--orange); color: #7a2000; border-radius: 999px; padding: 8px 8px 8px 18px;
  box-shadow: 0 10px 30px rgba(2, 30, 80, .25); font-weight: 700; font-size: 15px; animation: fbIn .35s cubic-bezier(.3, 1.4, .5, 1); }
.fix-bar[hidden] { display: none; }
.fix-bar .fb-btn { border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-weight: 800; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.fix-bar.done { background: #eefbe0; border-color: #5fae12; color: #2d5a00; }
.fix-bar.done .fb-btn { background: #2e9e3e; }
@keyframes fbIn { from { opacity: 0; transform: translate(-50%, -20px); } }
.take-me { display: inline-block; margin-top: 8px; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: 700 14px "Poppins", sans-serif; padding: 8px 16px; cursor: pointer; }
.sub-title small { font-weight: 400; color: #8aa0c4; font-size: .8em; }

/* signature: Done button while signing; locked "✓ Signed" afterwards so scrolling can't draw on it */
.sig-done { display: none; position: absolute; top: 8px; left: 8px; border: 0; background: #2e9e3e; color: #fff; border-radius: 999px; padding: 4px 12px; font: 700 12px "Poppins", sans-serif; cursor: pointer; }
.sig-wrap.signed .sig-done { display: block; }
.sig-locked { display: none; position: absolute; inset: 0; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(238, 251, 224, .35); pointer-events: none; }
.sig-locked span { background: #2e9e3e; color: #fff; font: 700 12px "Poppins", sans-serif; padding: 4px 10px; border-radius: 999px; }
.sig-again { pointer-events: auto; border: 0; background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 14px; font: 700 12px "Poppins", sans-serif; box-shadow: 0 2px 8px rgba(2, 30, 80, .15); cursor: pointer; }
.sig-wrap.locked { border-style: solid; border-color: #8ed62b; }
.sig-wrap.locked .sig { touch-action: auto; pointer-events: none; cursor: default; }
.sig-wrap.locked .sig-locked { display: flex; }
.sig-wrap.locked .sig-clear, .sig-wrap.locked .sig-done { display: none; }
.flash-missing { animation: flashMissing 1.6s ease 1; }
@keyframes flashMissing { 0%, 40% { box-shadow: 0 0 0 4px rgba(255, 67, 16, .55); } 100% { box-shadow: 0 0 0 0 rgba(255, 67, 16, 0); } }
.sub-title small { color: #cfe0ff; }
