/* CSC Events — structural defaults only. Plain class names; the theme owns
   the look (spec 04 §14.4). */

/* Feed cards — the legacy home-school-day split layout, tightened: green
   info panel + photo, alternating greens, date-led heading. */
.csc-events-list { display: flex; flex-direction: column; gap: 24px; margin-top: 18px; }
.csc-events-intro { text-align: center; margin: 0 0 6px; font-size: 1.05em; line-height: 1.5; }
.csc-portal-policy { margin: 14px 0 6px; }
.csc-event-card { display: flex; border-radius: 10px; overflow: hidden; background: #16944E; color: #fff; min-height: 230px; }
.csc-events-list .csc-event-card:nth-child(even) { background: #5FB34A; }
.csc-event-body { flex: 1 1 55%; padding: 22px 26px; display: flex; flex-direction: column; align-items: flex-start; }
/* The photo keeps its own shape: it sets the card's height, and cover trims
   only the sides when the text runs taller. The column is capped so a square
   photo doesn't tower over the text; max-height reins in a tall portrait. */
.csc-event-media { flex: 0 1 38%; max-width: 380px; min-width: 0; }
.csc-event-image { width: 100%; height: 100%; max-height: 460px; object-fit: cover; display: block; }
.csc-event-card-noimage .csc-event-body { flex-basis: 100%; }
.csc-event-day { margin: 0 0 2px 0; color: #fff; font-size: 1.5em; }
.csc-event-theme { margin: 0 0 8px 0; font-weight: bold; font-size: 1.1em; }
.csc-event-date { margin: 0 0 8px 0; }
.csc-event-description { margin: 0 0 8px 0; font-size: .95em; }
.csc-event-price { margin: 0 0 12px 0; font-size: .95em; }
.csc-event-badge { display: inline-block; padding: 4px 12px; border-radius: 14px; font-size: .85em; background: rgba(255,255,255,.9); color: #1c5c33; font-weight: bold; margin-top: auto; }
.csc-event-register { display: inline-block; background: #fff; color: #16944E; padding: 10px 26px; border-radius: 6px; text-decoration: none; font-weight: bold; margin-top: auto; }
.csc-event-register:hover { background: #f2f8f4; color: #0e6d38; }
@media (max-width: 640px) {
  .csc-event-card { flex-direction: column-reverse; }
  .csc-event-media { flex: none; max-width: none; }
  .csc-event-image { height: auto; max-height: 420px; }
}

/* Portal — the camp's public personality: rounded, warm, the site's greens
   and orange. Same family as the feed cards and the emails. */
.csc-portal { max-width: 680px; margin: 0 auto; accent-color: #16944E; }
.csc-portal-daycard { margin-bottom: 20px; min-height: 0; }
.csc-portal-daycard .csc-event-day { font-size: 1.35em; }
.csc-portal-daycard .csc-event-media { min-height: 150px; }
.csc-portal-daycard .csc-event-price { margin-bottom: 0; }
.csc-portal-heading { margin-top: 0; padding-bottom: 8px; position: relative; }
.csc-portal-heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 5px; border-radius: 3px; background: #5FB34A; }
.csc-portal-flash + .csc-portal-heading::after { display: none; }
.csc-portal-subheading { color: #16944E; }
.csc-portal-form label { display: block; margin-top: 10px; font-weight: bold; }
.csc-portal-form input[type=text], .csc-portal-form input[type=email], .csc-portal-form input[type=date], .csc-portal-form select { width: 100%; max-width: 420px; padding: 10px; border: 1px solid #bbb; border-radius: 8px; font-size: 16px; }
.csc-portal input:focus-visible, .csc-portal select:focus-visible { outline: 3px solid rgba(95,179,74,.5); outline-offset: 1px; }
.csc-portal-row { display: flex; gap: 8px; flex-wrap: wrap; }
.csc-portal-row input { flex: 1; min-width: 140px; }
.csc-portal-button { display: inline-block; background: #e8760e; color: #fff !important; border: none; padding: 12px 26px; border-radius: 6px; font-weight: bold; font-size: 17px; cursor: pointer; text-decoration: none; margin-top: 12px; }
.csc-portal-button-secondary { background: #e4e6e9; color: #222 !important; }
.csc-portal-button-small { padding: 8px 16px; font-size: 15px; margin-top: 6px; }
.csc-portal-button-danger { background: #c0392b; }
.csc-portal-link { background: none; border: none; color: #e8760e; text-decoration: underline; cursor: pointer; padding: 0; font-size: 15px; }
.csc-portal-link-danger { color: #c0392b; }
.csc-portal-actions { display: flex; gap: 16px; align-items: center; margin: 12px 0 6px 0; flex-wrap: wrap; }
.csc-portal-actions .csc-portal-button { margin-top: 0; }
.csc-portal-keyword { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.csc-portal-keyword input[type=text] { padding: 8px 10px; border: 1px solid #bbb; border-radius: 8px; font-size: 15px; max-width: 200px; }
.csc-portal-keyword .csc-portal-button { margin-top: 0; }
.csc-portal-keyword select { padding: 8px 10px; border: 1px solid #bbb; border-radius: 8px; font-size: 15px; }
.csc-portal-groups { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: flex-end; }
.csc-portal-note { color: #666; font-size: .9em; font-weight: normal; }
.csc-portal-summary { list-style: none; padding: 10px 14px; margin: 8px 0; border: 1px dashed #cfd6d1; border-radius: 8px; background: #fff; font-size: .95em; }
.csc-portal-summary li:last-child { font-weight: bold; border-top: 1px solid #e3ddd2; margin-top: 6px; padding-top: 6px; }
.csc-row-price { white-space: nowrap; color: #16944E; font-weight: bold; }
.csc-row-face { color: #b25a00; margin-top: 4px; }
.csc-portal-badge-nearly { background: #fff4d6; color: #7a4b00; }
.csc-portal-flash { background: #d7f0dd; border: 1px solid #9fd6ad; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }
.csc-portal-flash-inline { background: #fdf1d6; border-color: #e8c377; font-weight: 600; }
.csc-portal-warn { background: #fff4d6; border: 1px solid #eecf7f; border-radius: 6px; padding: 10px 14px; margin: 10px 0; }
.csc-quote-face { margin-top: -8px; font-weight: bold; }
.csc-portal-panel { border: 1px solid #e3ddd2; border-radius: 10px; padding: 14px 16px; margin: 14px 0; background: #fdf9f4; }
.csc-portal-panel-waiver { background: #fff4d6; border-color: #eecf7f; }
.csc-portal-person { border: 1px solid #e3ddd2; border-radius: 10px; padding: 14px 16px; margin: 12px 0; background: #fdf9f4; }
.csc-portal-panel-cancelled { background: #f2f2f0; border-style: dashed; color: #777; }
.csc-portal-cancelled-badge { display: inline-block; background: #999; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: .8em; font-weight: bold; margin-left: 6px; vertical-align: 1px; }
.csc-portal-cta { text-align: center; margin: 30px 0 22px 0; }
.csc-portal-cta p { font-weight: bold; font-size: 1.1em; margin: 0 0 4px 0; }
.csc-info { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: #16944E; color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-weight: bold; font-style: normal; cursor: help; margin-left: 6px; vertical-align: 1px; }
.csc-portal-modal { position: fixed; inset: 0; background: rgba(30, 30, 30, .55); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 16px; }
.csc-portal-modal[hidden] { display: none; }
.csc-portal-modal-box { background: #fff; border-radius: 10px; padding: 22px 24px; max-width: 460px; width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.csc-portal-footer { text-align: center; margin: 30px 0 6px 0; }
.csc-portal-footer img { max-width: 90px; height: auto; }
.csc-portal-eventdate { color: #16944E; font-weight: bold; font-size: 1.1em; margin: -2px 0 18px 0; }
.csc-portal-table { width: 100%; border-collapse: collapse; margin: 10px 0; border-radius: 8px; overflow: hidden; }
.csc-portal-table th { background: #16944E; color: #fff; }
.csc-portal-table th, .csc-portal-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eee; }
.csc-portal-table tr:nth-child(odd) td { background: #f7fbf5; }
.csc-portal-event { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.csc-portal-event-action { margin-left: auto; flex: 0 0 auto; text-align: right; white-space: nowrap; }
.csc-portal-event-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.csc-portal-optin { background: #f2f9ef; border: 1px solid #cde8c2; border-radius: 10px; padding: 16px 20px; margin: 16px 0; }
.csc-portal-optin-lead { margin: 0 0 6px 0; }
.csc-portal-optin p { margin: 0 0 12px 0; }
.csc-portal-optin form { margin: 0; }
.csc-portal-event-clickable { position: relative; }
.csc-portal-event-clickable:hover { background: #f7fbf5; }
.csc-portal-event-stretch::after { content: ""; position: absolute; inset: 0; }
.csc-portal-thumb { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; flex-shrink: 0; display: block; }
.csc-portal-thumb-tile { background: #eaf4e6; color: #16944E; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.csc-portal-thumb-month { font-size: .75em; font-weight: bold; text-transform: uppercase; letter-spacing: .08em; }
.csc-portal-thumb-day { font-size: 1.6em; font-weight: bold; }
.csc-portal-header { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 16px; background: #16944E; border-radius: 8px; color: #fff; font-weight: bold; }
.csc-portal-header .csc-portal-inline { display: contents; }
.csc-portal-header .csc-portal-link { color: #fff; font-weight: normal; font-family: inherit; font-size: .9em; line-height: inherit; text-decoration: none; padding: 3px 13px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; opacity: .9; }
.csc-portal-header .csc-portal-link:hover { background: rgba(255,255,255,.16); opacity: 1; }
.csc-portal-header-name { color: #fff; font-weight: bold; text-decoration: none; }
.csc-portal-header-name:hover { color: #fff; text-decoration: underline; }
.csc-portal-header-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.csc-portal-header-tab { color: #fff; font-weight: normal; font-size: .9em; text-decoration: none; padding: 4px 13px; border-radius: 999px; background: rgba(255,255,255,.16); }
.csc-portal-header-tab:hover { color: #fff; background: rgba(255,255,255,.3); text-decoration: none; }
.csc-portal-header-tab.is-current { background: #fff; color: #16944E; font-weight: bold; }
.csc-portal-inline { display: inline; }
.csc-portal-check { font-weight: normal !important; display: block; margin: 6px 0; }
/* The box beside the text, so a wrapped label lines up under its first line, not under the box.
   label.csc-portal-check outranks .csc-portal-form label's display: block by coming later. */
label.csc-portal-check { display: flex; align-items: flex-start; gap: 8px; }
.csc-portal-check input { flex: none; margin: 0.2em 0 0 0; }
.csc-portal-confirm { background: #16944E; color: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; }
.csc-portal-confirm .csc-portal-heading { color: #fff; padding-bottom: 0; margin-bottom: 6px; }
.csc-portal-confirm .csc-portal-heading::after { display: none; }
.csc-portal-confirm-line { margin: 2px 0 0 0; }
.csc-portal-codebox { text-align: center; margin: 18px 0; }
.csc-portal-codebox p { font-weight: bold; margin-bottom: 6px; }
.csc-portal-code { display: inline-block; background: #ffc300; color: #222; padding: 10px 25px; border-radius: 4px; font-weight: bold; letter-spacing: .3rem; font-size: 26px; }
.csc-portal-code-small { font-size: 15px; padding: 2px 10px; letter-spacing: .2rem; }
.csc-portal-quote { font-size: 20px; font-weight: bold; margin: 16px 0; padding: 12px 16px; background: #16944E; color: #fff; border-radius: 8px; position: sticky; bottom: 8px; }
.csc-portal-details { margin: 12px 0; }
.csc-portal-details summary { cursor: pointer; color: #e8760e; font-weight: bold; list-style: none; }
.csc-portal-details summary::-webkit-details-marker { display: none; }
.csc-portal-details summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s ease; color: #16944E; }
.csc-portal-details[open] summary::before { transform: rotate(90deg); }
.csc-portal-list { padding-left: 20px; }
#csc-card-container { max-width: 420px; margin: 10px 0; }

.csc-row-flagged td:first-child { box-shadow: inset 4px 0 0 #e8c377; }
.csc-input-error { border-color: #c0392b !important; outline: 1px solid #c0392b; }
.csc-extra-error { color: #c0392b; display: block; }

/* The portal always renders light: on a device in dark mode the theme's
   color-scheme made native checkboxes paint as solid dark squares that
   read as already-ticked (browser walkthrough, 2026-09-11). */
.csc-portal { color-scheme: light; }
/* Checkboxes families tap on a phone: bigger than the 13px native box, with
   an accent colour so a tick is unmistakable. */
.csc-portal input[type=checkbox] { width: 20px; height: 20px; accent-color: #e8760e; vertical-align: middle; }
/* The register table's Coming cell is a large tap target, and the name cell
   toggles it too (wired in JS). */
.csc-portal-table td:first-child { padding: 10px 8px; }
.csc-portal-table td:nth-child(2) { cursor: pointer; }
/* A disabled action looks disabled, not just refuses the tap. */
.csc-portal-button:disabled, .csc-portal-button[disabled] { background: #c9ccd1; color: #5f6368 !important; cursor: not-allowed; box-shadow: none; }
.csc-portal-submit-reason { color: #8a4b00; font-weight: 600; margin: 6px 0 0; }
/* An error is not good news: the red-tinted flash for a refusal. */
.csc-portal-flash-error { background: #fbe4e0; border-color: #e0a89e; }
