/* =====================================================================
   app.css - additions for the database-driven Web Forms site.
   Uses the design tokens defined in site.css; nothing here changes the
   original look, it only styles elements that the static site did not have
   (server-side forms, pagination, filters as links, empty states).
   ===================================================================== */

/* The single ASP.NET server form wraps the whole page. */
.site-form { display: block; margin: 0; }

/* Select boxes and check boxes in public forms match the existing inputs. */
.field select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--slate); font: inherit;
}
.field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(20, 36, 196, .18); }
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--teal); }
.field-check label { margin: 0; font-family: var(--font-body); font-weight: 500; color: var(--slate); line-height: 1.55; }
.field-optional { font-weight: 500; color: var(--muted); font-size: .84rem; }

.form-status.is-success { background: #ECFDF3; color: #05603A; border: 1px solid #A6F4C5; }
.form-status ul { margin-top: 8px; padding-left: 18px; list-style: disc; }
.form-ref { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid #A6F4C5;
  font-family: var(--font-head); font-weight: 800; letter-spacing: .04em; color: #05603A; }

/* Server CAPTCHA image and text alternative */
.captcha-image { display: block; width: 200px; height: 60px; }
/* site.css hides .captcha without JavaScript (the original check ran in the browser). The server check works
   without JavaScript, so the field must stay visible or the forms could not be sent. */
html:not(.js) .captcha { display: block; }
.captcha-challenge .captcha-question { display: block; padding: 18px 16px; }
.captcha-refresh, .captcha-switch { font: inherit; }
.captcha-switch { cursor: pointer; }

/* Buttons disabled while a form is being sent */
.btn.is-busy { opacity: .7; pointer-events: none; }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; text-decoration: none;
}
.pager a:hover { border-color: var(--navy); }
.pager [aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .pager-gap { border: 0; background: transparent; min-width: 20px; padding: 0; }
.pager .is-disabled { color: var(--muted); background: var(--off); }

/* Filters rendered as links (server-side filtering, works without JavaScript) */
a.filter-chip { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--navy); }
a.filter-chip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-count { margin-left: 6px; font-size: .78rem; opacity: .75; }

/* Generic empty state used by lists */
.list-empty { padding: 32px 24px; border: 1.5px dashed #C8D0F0; border-radius: var(--radius); background: #fff; text-align: center; color: var(--muted); }
.list-empty h3 { font-family: var(--font-head); color: var(--navy); font-size: 1.1rem; margin-bottom: 6px; }

/* Event cards and detail */
.event-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: .92rem; color: var(--muted); }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-meta svg { width: 16px; height: 16px; color: var(--teal-700); }
.reg-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; background: #ECFDF3; color: #05603A; }
.reg-badge.is-closed { background: var(--off); color: var(--muted); }
.past-events { display: grid; gap: 12px; margin-top: 20px; }
.past-event { display: grid; gap: 4px 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (min-width: 640px) { .past-event { grid-template-columns: 180px minmax(0, 1fr); } }
.past-event-date { font-family: var(--font-head); font-weight: 800; color: var(--teal-700); font-size: .9rem; }
.past-event a { color: var(--navy); font-weight: 700; text-decoration: none; }
.past-event a:hover { text-decoration: underline; }

/* About page draft statement: the original set this size inline; inline styles are not kept in page sections */
.draft-panel .quote-rule { font-size: 1.1rem; }

/* Resources page: space between document cards when more than one is listed (the original had one) */
.doc-card + .doc-card { margin-top: 2rem; }

/* Recorded awards inside an honour-roll card (awards page) */
.award-list { display: grid; gap: 10px; margin-top: 12px; }
.award-list li { padding: 12px 14px; border-radius: 12px; background: var(--off); }
.award-list b { color: var(--navy); font-family: var(--font-head); }

/* Footer social links */
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer-social a { display: inline-flex; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); font-size: .84rem; }
.footer-social a:hover { border-color: var(--gold); }

/* Home hero: per-slide banners (heading, introduction and buttons). All blocks share one grid cell so the banner
   keeps the height of the longest; only the active one is shown, and showing it replays the existing rise-in
   animation. Only the first heading is an h1 (one per page), so the h1 font is set on every slide's heading. */
.hero2-texts { display: grid; }
.hero2-text { grid-area: 1 / 1; min-width: 0; visibility: hidden; opacity: 0; transition: opacity .5s var(--ease), visibility 0s .5s; }
.hero2-text.is-active { visibility: visible; opacity: 1; transition: opacity .5s var(--ease), visibility 0s; }
.hero2-text:not(.is-active) .hero2-pill, .hero2-text:not(.is-active) .line, .hero2-text:not(.is-active) .hero2-lead, .hero2-text:not(.is-active) .hero2-actions { animation: none; }
.hero2-text .hero2-title { font-family: var(--font-head); }
@media (prefers-reduced-motion: reduce) { .hero2-text { transition: none; } }

/* Contact cards: designation and institution lines under the name */
.contact-details { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; line-height: 1.5; }

/* Error pages */
.error-panel { max-width: 640px; margin-inline: auto; text-align: center; }
