/* Yearbook photo submission form (js/yearbook-form.js) */
.ybf { max-width: 720px; }
.ybf form { margin: 0; }
.ybf-group { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.ybf-group legend { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); padding: 0; margin-bottom: 10px; }
.ybf-field { margin-bottom: 14px; }
.ybf-field label, .ybf-label { display: block; font-weight: 700; font-size: 14.5px; color: var(--text); margin-bottom: 4px; }
.ybf-hint { display: block; font-size: 13px; color: var(--text-light); line-height: 1.45; margin: -2px 0 8px; }
.ybf-req { color: #b42318; font-weight: 800; }
.ybf-opt { font-weight: 500; color: var(--text-light); font-size: 13px; }
.ybf input[type=text], .ybf input[type=email], .ybf select, .ybf textarea {
  width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 15px; background: #fff; color: var(--text);
}
.ybf textarea { resize: vertical; min-height: 72px; }
.ybf input:focus, .ybf select:focus, .ybf textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 122, 61, .15); }
.ybf-other { margin-top: 8px; }
.ybf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .ybf-row { grid-template-columns: 1fr; } }

.ybf-students { display: grid; gap: 8px; }
.ybf-student { display: grid; grid-template-columns: 1fr 1fr 1.1fr 1fr 32px; gap: 8px; align-items: center; }
.ybf .ybf-student select { padding-left: 10px; padding-right: 6px; }
.ybf-student .ybf-rm { border: 0; background: #f2f4f3; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); }
.ybf-student .ybf-rm[hidden] { display: block; visibility: hidden; }
.ybf-add { margin-top: 8px; border: 1.5px dashed var(--border); background: #fff; color: var(--primary); font: inherit; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.ybf-add:hover { border-color: var(--primary); background: #f1f8f3; }
/* Narrow screens: names on one line, school + grade under them, each student in a light box. */
@media (max-width: 700px) {
  .ybf-student { grid-template-columns: 1fr 1fr 32px; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: #fafcfb; }
  .ybf-student .ybf-first { grid-column: 1; grid-row: 1; }
  .ybf-student .ybf-last { grid-column: 2; grid-row: 1; }
  .ybf-student .ybf-school { grid-column: 1; grid-row: 2; }
  .ybf-student .ybf-grade { grid-column: 2; grid-row: 2; }
  .ybf-student .ybf-rm { grid-column: 3; grid-row: 1 / span 2; }
}
.ybf-grades { display: flex; flex-wrap: wrap; gap: 8px; }
.ybf-chip { margin: 0 !important; cursor: pointer; }
.ybf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ybf-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; font-weight: 800; font-size: 15px; color: var(--text); }
.ybf-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.ybf-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 122, 61, .3); }
.ybf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ybf-drop { border: 2px dashed var(--border); border-radius: 14px; padding: 26px 16px; text-align: center; cursor: pointer; color: var(--text-light); font-size: 14.5px; background: #fafcfb; }
.ybf-drop strong { color: var(--primary); }
.ybf-drop:hover, .ybf-drop.is-drag, .ybf-drop:focus-visible { border-color: var(--primary); background: #f1f8f3; outline: none; }
.ybf-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ybf-file { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.ybf-file img, .ybf-noprev { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eef1ef; display: grid; place-items: center; font-size: 22px; }
.ybf-file div { flex: 1; min-width: 0; }
.ybf-file b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ybf-file small { font-size: 12.5px; color: var(--text-light); }
.ybf-file em { color: #8a4b00; font-style: normal; font-weight: 700; }
.ybf-file button { border: 0; background: #f2f4f3; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); flex-shrink: 0; }
.ybf-file.is-done { border-color: #9bd3a8; background: #f3fbf5; }
.ybf-file.is-fail { border-color: #f1a99c; background: #fff5f3; }
.ybf-file.is-up { opacity: .75; }

.ybf-submit { font-size: 16px; padding: 14px 28px; border: 0; cursor: pointer; }
.ybf-submit:disabled { opacity: .6; cursor: progress; }
.ybf-fine { font-size: 12.5px; color: var(--text-light); line-height: 1.5; margin: 14px 0 0; }
.ybf-alert { padding: 12px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; margin-bottom: 16px; }
.ybf-alert.ok { background: #e9f7ee; color: #14532d; border: 1px solid #9bd3a8; }
.ybf-alert.err { background: #fff1ee; color: #8a1c00; border: 1px solid #f1a99c; }
.ybf-dir-next { display: block; margin-top: 10px; font-weight: 600; }
.ybf-dir-next .btn { display: inline-flex; margin-top: 8px; text-decoration: none; }
/* Event upload buttons (one per Drive event folder) */
.ybf-evbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ybf-evbtn { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--border);
  color: var(--primary-dark, #1a3d24); font-weight: 800; font-size: 14.5px; text-decoration: none; line-height: 1.25; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.ybf-evbtn:hover, .ybf-evbtn:focus-visible { border-color: var(--primary); background: #f1f8f3; transform: translateY(-1px); outline: none; }


/* Confirmation shown in place of the form after a successful send */
.ybf-done { text-align: center; background: #e9f7ee; border: 2px solid #34a853; border-radius: 16px; padding: 32px 24px; outline: none; }
.ybf-done[hidden], .ybf form[hidden] { display: none; }
.ybf-done-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #2e8b47; display: flex; align-items: center; justify-content: center; }
.ybf-done h3 { font-size: 22px; color: #14532d; margin-bottom: 8px; }
.ybf-done p { font-size: 15px; color: #1f4d2c; margin: 0 auto 18px; max-width: 460px; }
.ybf-done .ybf-dir-next { display: block; margin: 0 auto 18px; max-width: 460px; }

/* A field the parent needs to fix */
.ybf .ybf-bad { border-color: #d93025 !important; box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.18) !important; background: #fff6f5; }
.ybf .ybf-drop.ybf-bad { border-style: solid; }
.ybf-fieldmsg { margin: 6px 0 4px; color: #b3261e; font-size: 14px; font-weight: 700; }

/* Jefferson/Woestina note: their photos go to TreeRing (Nov 2026) */
.ybf-tr { background:#eef7e8; border:1px solid #cfe6c0; border-radius:10px; padding:10px 14px; font-size:14px; margin:0 0 16px; }
.ybf-tr a { color:#3a7a1e; font-weight:700; }
