/* ============================================================
   Samba Recovery — Alumni Events Calendar (public styles)
   Brand color is injected per-page as --brand.
   ============================================================ */

:root {
    --brand: #323f99;        /* indigo  */
    --brand-dark: #1d2c5b;   /* navy    */
    --brand-light: #457fc1;  /* blue    */
    --accent: #3ec1c7;       /* teal    */
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --soft: #f4f6f8;
    --radius: 12px;
}

* { box-sizing: border-box; }

body.samba {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: transparent;
    line-height: 1.5;
}

.samba-wrap { max-width: 920px; margin: 0 auto; padding: 16px; }
.samba a { color: var(--brand-dark); }

/* ---------- Calendar header ---------- */
.cal-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.cal-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.btn {
    display: inline-block; border: 1px solid var(--line); background: #fff;
    color: var(--ink); padding: .5rem .8rem; border-radius: 8px;
    text-decoration: none; font-size: .95rem; cursor: pointer; line-height: 1;
}
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-primary {
    background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Month grid ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow {
    text-align: center; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 4px 0;
}
.cal-cell {
    min-height: 92px; border: 1px solid var(--line); border-radius: 8px;
    padding: 5px; background: #fff; overflow: hidden;
}
.cal-cell.empty { background: var(--soft); border-style: dashed; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-date { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-cell.today .cal-date { color: var(--brand-dark); }
.cal-event {
    display: block; font-size: .74rem; line-height: 1.25; text-decoration: none;
    background: var(--brand); color: #fff; border-radius: 5px;
    padding: 2px 5px; margin-bottom: 3px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.cal-event:hover { background: var(--brand-dark); }
.cal-event.is-cancelled { background: #9ca3af; text-decoration: line-through; }
.cal-event .ce-time { opacity: .85; }

/* ---------- Agenda (mobile) ---------- */
.cal-agenda { display: none; }
.agenda-day { margin-bottom: 14px; }
.agenda-date { font-weight: 700; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.agenda-item {
    display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fff;
}
.agenda-item:hover { border-color: var(--brand); }
.agenda-thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; background: var(--soft); }
.agenda-when { font-size: .8rem; color: var(--brand-dark); font-weight: 600; }
.agenda-title { font-weight: 600; }
.empty-note { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* ---------- Event details / RSVP page ---------- */
.event-page { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.event-hero { width: 100%; max-height: 340px; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; }
.event-title { font-size: 1.7rem; margin: 0 0 6px; }
.event-meta { color: var(--muted); margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.event-meta strong { color: var(--ink); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge-soft { background: #e8edfb; color: var(--brand-dark); }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-full { background: #fee2e2; color: #991b1b; }
.event-desc { margin: 16px 0; white-space: pre-line; }
.event-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 26px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- Forms ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 5px; }
.req { color: #b91c1c; }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=tel],
.form-row input[type=number], .form-row input[type=password], .form-row input[type=url],
.form-row input[type=datetime-local], .form-row input[type=date], .form-row textarea,
.form-row select {
    width: 100%; padding: .6rem .7rem; border: 1px solid #cbd5e1; border-radius: 8px;
    font-size: 1rem; font-family: inherit; background: #fff;
}
.form-row textarea { min-height: 110px; resize: vertical; }
.help { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.radio-group { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-group label { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- Alerts ---------- */
.alert { padding: .85rem 1rem; border-radius: 10px; margin-bottom: 18px; }
.alert-ok { background: #dcfce7; color: #166534; }
.alert-info { background: #e0f2fe; color: #075985; }
.alert-warn { background: #fef3c7; color: #92400e; }
.alert-err { background: #fee2e2; color: #991b1b; }

.privacy-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.footer-note { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 22px; }

/* ---------- "Get notified" calendar CTA ---------- */
.notify-cta { text-align: center; margin-top: 20px; }
.notify-cta a {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
}
.notify-cta a:hover { background: var(--brand-dark); color: #fff; }

/* ---------- Responsive: switch grid -> agenda ---------- */
@media (max-width: 640px) {
    .cal-grid { display: none; }
    .cal-agenda { display: block; }
    .event-title { font-size: 1.4rem; }
}
