/* DAT Saturday School enrollment — themed styles (self-contained) */
.dat-enroll {
	--dat-primary: #0b6e6e;
	--dat-primary-dark: #084f4f;
	--dat-accent: #c79a3a;
	--dat-ink: #1f2933;
	--dat-muted: #5b6773;
	--dat-line: #e3e8ec;
	--dat-bg: #f4f7f8;
	--dat-radius: 16px;

	max-width: 720px;
	margin: 2em auto;
	color: var(--dat-ink);
	font-size: 16px; /* pin base so theme root can't shrink our em text */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.5;
}
.dat-enroll * { box-sizing: border-box; }

/* Card shell with branded header */
.dat-card {
	background: #fff;
	border: 1px solid var(--dat-line);
	border-radius: var(--dat-radius);
	box-shadow: 0 10px 30px rgba(8, 79, 79, .08);
	overflow: hidden;
}
.dat-head {
	background: linear-gradient(135deg, var(--dat-primary) 0%, var(--dat-primary-dark) 100%);
	color: #fff;
	padding: 1.6em 1.75em 1.4em;
	position: relative;
}
.dat-head::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
	background: linear-gradient(90deg, var(--dat-accent), #e6c877);
}
.dat-head .dat-brand { font-size: .78em; letter-spacing: .12em; text-transform: uppercase; color: var(--dat-accent); opacity: 1; margin: 0 0 .35em; }
.dat-head h2 { margin: 0; font-size: 1.55em; font-weight: 700; }
.dat-head p.dat-sub { margin: .4em 0 0; color: rgba(255,255,255,.9); font-size: .95em; }

.dat-body { padding: 1.6em 1.75em 1.9em; }
.dat-body > h3 { font-size: 1.05em; margin: 1.5em 0 .8em; padding-bottom: .4em; border-bottom: 1px solid var(--dat-line); }
.dat-body > h3:first-child { margin-top: 0; }

/* Step progress */
.dat-steps { display: flex; gap: .5em; padding: 1em 1.75em 0; }
.dat-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--dat-line); transition: background .3s; }
.dat-steps span.active { background: var(--dat-accent); }

/* Returning / new choice */
.dat-choice { display: grid; gap: 1em; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .dat-choice { grid-template-columns: 1fr; } }
.dat-choice button {
	padding: 1.5em 1.15em; border: 2px solid var(--dat-line); border-radius: 14px;
	background: #fff; cursor: pointer; text-align: left; font-size: 1.05em; font-weight: 700; color: var(--dat-ink);
	transition: border-color .15s, box-shadow .15s, transform .05s;
}
.dat-choice button:hover { border-color: var(--dat-primary); box-shadow: 0 6px 18px rgba(11,110,110,.12); }
.dat-choice button:active { transform: translateY(1px); }
.dat-choice button small { display: block; font-weight: 400; color: var(--dat-muted); margin-top: .45em; font-size: .88em; }

/* Fields */
.dat-field { margin-bottom: 1.05em; }
.dat-field label { display: block; font-weight: 600; margin-bottom: .4em; font-size: .88em; color: var(--dat-ink); }
.dat-field input, .dat-field select, .dat-field textarea {
	width: 100%; padding: .7em .85em; border: 1px solid #cbd4da; border-radius: 10px;
	font-size: 1em; color: var(--dat-ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.dat-field input:focus, .dat-field select:focus, .dat-field textarea:focus {
	outline: none; border-color: var(--dat-primary); box-shadow: 0 0 0 3px rgba(11,110,110,.15);
}
.dat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
@media (max-width: 520px) { .dat-row { grid-template-columns: 1fr; } }

/* Buttons */
.dat-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .8em 1.6em; border: none; border-radius: 10px;
	background: var(--dat-primary); color: #fff; font-size: 1em; font-weight: 600; cursor: pointer;
	transition: background .15s, transform .05s;
}
.dat-btn:hover { background: var(--dat-primary-dark); }
.dat-btn:active { transform: translateY(1px); }
.dat-btn:disabled { opacity: .55; cursor: not-allowed; }
.dat-btn.secondary { background: #eef2f4; color: var(--dat-ink); }
.dat-btn.secondary:hover { background: #e2e8eb; }
.dat-btn.link { background: none; color: var(--dat-primary); padding: .5em .25em; text-decoration: underline; font-weight: 600; }
.dat-btn.link:hover { color: var(--dat-primary-dark); }
.dat-actions { display: flex; flex-wrap: wrap; gap: .75em; align-items: center; margin-top: 1.5em; }

/* Parent summary */
.dat-parent-summary {
	background: var(--dat-bg); border: 1px solid var(--dat-line); border-radius: 14px;
	padding: 1.15em 1.3em; margin-bottom: 1.4em;
	display: grid; grid-template-columns: 1fr 1fr; gap: .9em 1.5em;
}
@media (max-width: 520px) { .dat-parent-summary { grid-template-columns: 1fr; } }
.dat-parent-col { display: flex; flex-direction: column; gap: .7em; }
.dat-parent-summary .full { grid-column: 1 / -1; }
.dat-parent-summary dt { font-weight: 600; font-size: .74em; letter-spacing: .04em; text-transform: uppercase; color: var(--dat-muted); margin-bottom: .15em; }
.dat-parent-summary dd { margin: 0; font-size: .98em; }

/* Children list */
.dat-child-list { list-style: none; margin: 0; padding: 0; }
.dat-child-list li {
	display: block;
	padding: 1em 1.1em; border: 1px solid var(--dat-line); border-radius: 12px; margin-bottom: .7em;
	transition: border-color .15s, background .15s;
}
.dat-child-list li:hover { border-color: var(--dat-primary); background: #f7fbfb; }
.dat-child-main { display: flex; align-items: flex-start; gap: .85em; }
.dat-child-list input[type=checkbox] { margin-top: .15em; width: 20px; height: 20px; accent-color: var(--dat-primary); flex: none; }
.dat-lunch-row { margin-top: .7em; padding-left: calc(20px + .85em); }
.dat-lunch-row label { display: block; font-weight: 600; font-size: .8em; color: var(--dat-muted); margin-bottom: .3em; }
.dat-lunch-row select { width: 100%; max-width: 340px; padding: .55em .7em; border: 1px solid #cbd4da; border-radius: 8px; font-size: .95em; background: #fff; }
.dat-child-list strong { font-size: 1.02em; }
.dat-child-meta { font-size: .85em; color: var(--dat-muted); margin-top: .25em; }
.dat-badge {
	display: inline-block; font-size: .7em; font-weight: 700; padding: .15em .55em;
	border-radius: 999px; background: #e7f6ee; color: #1f7a4d; margin-left: .5em; vertical-align: middle;
}

/* New-family child blocks */
.dat-child-block { border: 1px solid var(--dat-line); border-radius: 14px; padding: 1.2em; margin-bottom: 1.1em; position: relative; background: #fcfdfd; }
.dat-child-block .dat-remove { position: absolute; top: .6em; right: .8em; }
.dat-child-block.has-err { border-color: #f6c9c4; background: #fff6f5; }
.dat-child-err { color: #b42318; font-size: .88em; font-weight: 600; margin-top: .5em; }

/* Alerts */
.dat-alert { padding: .85em 1.1em; border-radius: 10px; margin-bottom: 1.1em; font-size: .92em; }
.dat-alert.error { background: #fdecec; color: #b42318; border: 1px solid #f6c9c4; }
.dat-alert.success { background: #e7f6ee; color: #1f7a4d; border: 1px solid #b6e2c8; }

/* Spinner */
.dat-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: dat-spin .7s linear infinite; margin-right: .55em; }
@keyframes dat-spin { to { transform: rotate(360deg); } }
