/* ── Encounter Registration — Public Styles ── */

/* Encounter list — default "list" layout: full-width rows */
.er-encounter-list { display:flex; flex-direction:column; gap:24px; }

/* "Cards" layout: an even grid of centred cards, like the original site.
   Column count comes from --er-list-cols, set inline by the shortcode. */
.er-encounter-list--cards {
    display:grid;
    grid-template-columns:repeat(var(--er-list-cols,3), minmax(0,1fr));
    gap:24px;
    align-items:start;
}
.er-encounter-list--cards .er-encounter-card {
    text-align:center;
    padding:28px 20px;
}
/* The accent stripe reads as a left edge on a wide row; on a card it just
   looks like a stray line, so drop it and let the icon carry the colour. */
.er-encounter-list--cards .er-encounter-card::before { display:none; }
.er-encounter-list--cards .er-encounter-card__header { flex-direction:column; align-items:center; gap:4px; }
.er-encounter-list--cards .er-encounter-card__icon {
    margin:0 auto 14px;
    padding:12px;
    border:1px solid var(--enc-border,#e5e7eb);
    border-radius:8px;
    width:72px; height:72px;
    box-sizing:content-box;
}
.er-encounter-list--cards .er-encounter-card__title {
    color:var(--er-accent,#2271b1);
    font-size:1.2rem;
}
.er-encounter-list--cards .er-encounter-card__actions { justify-content:center; gap:8px; }
/* Full-size buttons are too wide for a narrow column and wrap onto separate
   lines; scale them down so both sit on one row as they do in a row layout. */
.er-encounter-list--cards .er-encounter-card__actions .er-btn {
    padding:8px 14px;
    font-size:.8rem;
}
.er-encounter-list--cards .er-encounter-card__desc { font-size:.92rem; }

@media (max-width:900px) {
    .er-encounter-list--cards { grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); }
}
@media (max-width:520px) {
    .er-encounter-list--cards { grid-template-columns:1fr; }
}

/* Venue line (optional field) */
.er-encounter-card__venue { font-size:.9rem; color:#6b7280; margin:4px 0; }

.er-encounter-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: relative;
}
.er-encounter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    border-radius: 10px 0 0 10px;
    background: #2271b1;
}
.er-type-women .er-encounter-card::before { background: #b12278; }

.er-encounter-card__header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.er-encounter-card__title  { font-size:1.4rem; margin:0 0 8px; }
.er-encounter-card__type   { font-size:.8rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:#666; background:#f3f4f6; border-radius:12px; padding:3px 10px; white-space:nowrap; }
.er-encounter-card__dates  { font-size:1rem; color:#374151; font-weight:600; margin:4px 0; }
.er-encounter-card__church,
.er-encounter-card__cost   { font-size:.9rem; color:#6b7280; margin:4px 0; }
.er-encounter-card__desc   { margin:12px 0; color:#374151; line-height:1.6; }
.er-encounter-card__actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

.er-no-encounters { color:#6b7280; font-style:italic; padding:20px 0; }

/* Buttons */
.er-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s ease;
    line-height: 1.2;
}
.er-btn--primary  { background:#2271b1; color:#fff; }
.er-btn--primary:hover  { background:#135e96; color:#fff; }
.er-btn--secondary { background:#fff; border-color:#2271b1; color:#2271b1; }
.er-btn--secondary:hover { background:#f0f6fc; }
.er-btn--outline  { background:transparent; border-color:#d1d5db; color:#374151; }
.er-btn--outline:hover { background:#f9fafb; }
.er-btn--large    { padding:14px 28px; font-size:1.05rem; }

/* Notices */
.er-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 0 0 20px;
    font-weight: 500;
    border-left: 4px solid;
}
.er-notice--success { background:#d1fae5; border-color:#059669; color:#065f46; }
.er-notice--error   { background:#fee2e2; border-color:#dc2626; color:#7f1d1d; }
.er-notice--info    { background:#dbeafe; border-color:#2563eb; color:#1e3a8a; }

/* Registration form */
.er-register-wrap { max-width: 760px; }
.er-register__title { margin-bottom: 20px; }

.er-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 0 20px;
}
.er-fieldset legend {
    font-weight: 700;
    font-size: 1rem;
    padding: 0 8px;
    color: #374151;
}

.er-field { display:flex; flex-direction:column; gap:5px; margin-bottom:14px; }
.er-field:last-child { margin-bottom:0; }
.er-field label { font-size:.9rem; font-weight:600; color:#374151; }
.er-field input:not([type="radio"]):not([type="checkbox"]),
.er-field select,
.er-field textarea {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.er-field input:focus,
.er-field select:focus,
.er-field textarea:focus { outline:none; border-color:#2271b1; box-shadow:0 0 0 2px rgba(34,113,177,.15); }

/* Radios/checkboxes shouldn't stretch to the field's full width — that
   squeezes their label text into a single narrow, wrapped column. */
.er-field input[type="radio"],
.er-field input[type="checkbox"] { width:auto; flex-shrink:0; }

.er-field-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.er-field--grow { flex:1; }
.er-field--sm   { width: 80px; min-width:60px; }
.er-field--inline { flex-direction:row; gap:16px; flex-wrap:wrap; }
.er-field--inline label { display:flex; align-items:center; gap:6px; font-weight:400; width:auto; }

.er-checkbox-label { display:flex; align-items:flex-start; gap:10px; font-weight:400; line-height:1.5; cursor:pointer; }
.er-checkbox-label input { margin-top:3px; flex-shrink:0; }

.er-recaptcha { margin: 16px 0; }
.er-submit { margin-top: 24px; }

/* Encounter info page */
.er-encounter-info { max-width:760px; }
.er-info__title  { font-size:2rem; margin-bottom:8px; }
.er-info__type   { font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:#6b7280; font-size:.85rem; margin-bottom:6px; }
.er-info__dates  { font-size:1.1rem; font-weight:700; color:#374151; margin-bottom:4px; }
.er-info__cost   { color:#6b7280; }
.er-info__desc   { margin:16px 0; line-height:1.7; }
.er-info__venue  { margin:8px 0; }
.er-info__launch-points { background:#f9fafb; border-radius:8px; padding:16px 20px; margin:16px 0; }
.er-info__launch-points h3 { margin-top:0; font-size:1rem; }
.er-info__launch-points ul { margin:0; padding-left:20px; }
.er-info__actions { margin-top:24px; display:flex; gap:12px; flex-wrap:wrap; }
.er-registration-closed { color:#dc2626; font-style:italic; }

/* ── Full encounter page ([encounters] / [encounter_info]) ── */
.er-encounter-page { --er-accent:#2271b1; max-width:1100px; margin:0 auto; }
.er-encounter-page.er-type-women { --er-accent:#b12278; }
.er-accent { color:var(--er-accent); font-weight:600; }

.er-page__title { text-align:center; font-size:2.6rem; margin:0 0 28px; }

/* Hero: dates + countdown */
.er-event-hero {
    display:grid;
    grid-template-columns:1fr 1.4fr;
    gap:24px;
    align-items:center;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:24px 28px;
    margin-bottom:28px;
}
.er-event-hero__dates { display:flex; align-items:center; gap:16px; }
.er-event-hero__cal {
    flex:0 0 auto;
    width:54px; height:54px;
    display:flex; align-items:center; justify-content:center;
    color:var(--er-accent);
}
.er-event-hero__cal svg { width:40px; height:40px; }
.er-event-hero__dates h2 { margin:0 0 4px; font-size:1.25rem; text-transform:uppercase; letter-spacing:.02em; }
.er-event-hero__dates p  { margin:0; color:#6b7280; font-weight:600; }
.er-event-hero__countdown { text-align:center; }
.er-event-hero__cta { margin-top:14px; display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }

.er-page__desc { line-height:1.7; margin:0 0 28px; color:#374151; }

/* Info cards (cost / location / packing / schedule) */
.er-info-cards {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:32px 40px;
    margin-bottom:36px;
}
.er-info-card { text-align:center; }
.er-info-card__icon {
    width:110px; height:110px;
    margin:0 auto 16px;
    border-radius:50%;
    background:#f3f4f6;
    display:flex; align-items:center; justify-content:center;
    color:#374151;
}
.er-info-card__icon svg { width:48px; height:48px; }
.er-info-card__title { font-size:1.15rem; font-weight:800; margin:0 0 12px; }
.er-info-card__body { text-align:left; line-height:1.6; color:#374151; }
.er-info-card__body ul { margin:0 0 12px; padding-left:20px; }
.er-info-card__body li { margin-bottom:4px; }
.er-info-card__body address { font-style:normal; margin-bottom:12px; line-height:1.5; }

/* Inline registration section (only rendered after a Register button is clicked) */
.er-page__register {
    margin-top:8px;
    scroll-margin-top:24px;
}
.er-page__register-back { margin-bottom:20px; }
.er-page__register-back a,
.er-page__back a { color:var(--er-accent); text-decoration:none; font-weight:600; }
.er-page__back { margin-top:24px; }

/* Gender icon on list cards */
.er-encounter-card__icon {
    width:48px; height:48px;
    color:#2271b1;
    margin-bottom:8px;
}
.er-type-women .er-encounter-card__icon { color:#b12278; }
.er-encounter-card__icon svg { width:100%; height:100%; }
/* Font Awesome variant: an <i> has no intrinsic size, so drive it with
   font-size and centre it in the same 48px box the SVG occupies. */
.er-encounter-card__icon i {
    font-size: 42px;
    line-height: 48px;
    display: block;
    text-align: center;
}

@media (max-width:768px) {
    .er-event-hero { grid-template-columns:1fr; }
    .er-info-cards { grid-template-columns:1fr; gap:28px; }
    .er-page__title { font-size:2rem; }
}

/* Contact / Scholarship */
.er-scholarship-wrap,
.er-contact-wrap { max-width:600px; }
.er-form-public .er-field { margin-bottom:16px; }

/* Countdown ([encounter_countdown]) */
.er-countdown { text-align:center; }
.er-countdown__label { font-size:1.05rem; font-weight:700; margin-bottom:2px; }
.er-countdown__date  { font-size:.85rem; color:#6b7280; margin-bottom:12px; }
.er-countdown__tiles {
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    justify-content:center;
    gap:10px;
}
.er-countdown__tile {
    background:#1f2937;
    color:#fff;
    border-radius:8px;
    padding:10px 0 8px;
    min-width:64px;
    display:flex;
    flex-direction:column;
    align-items:center;
}
.er-countdown__count { font-size:1.7rem; font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; }
.er-countdown__unit  { font-size:.68rem; text-transform:uppercase; letter-spacing:.08em; opacity:.75; margin-top:2px; }
.er-countdown--expired .er-countdown__label { color:#059669; }

@media (max-width:480px) {
    .er-countdown__tile  { min-width:56px; }
    .er-countdown__count { font-size:1.3rem; }
}

/* Picker */
.er-picker__list { list-style:none; padding:0; margin:0; }
.er-picker__list li { margin-bottom:8px; }
.er-picker__list a { display:inline-block; padding:10px 18px; background:#f3f4f6; border-radius:6px; text-decoration:none; color:#374151; font-weight:600; }
.er-picker__list a:hover { background:#e5e7eb; }

@media (max-width: 600px) {
    .er-field-row { grid-template-columns:1fr; }
    .er-encounter-card { padding:16px; }
    .er-encounter-card__header { flex-direction:column; }
}

/* City / state / postal sit on one line. The generic .er-field-row is a
   two-column grid, so a third cell used to drop onto its own row, and the
   state cell was sized for a two-letter box — a province dropdown needs
   real width or it clips to "Alberta…". */
.er-field-row--address { grid-template-columns: minmax(0,1.6fr) minmax(0,1.2fr) minmax(0,1fr); }
.er-field-row--address .er-field--sm { width:auto; min-width:0; }
@media (max-width:640px) {
    .er-field-row--address { grid-template-columns:1fr; }
}

/* Country / state pair — the inactive control is disabled AND hidden, but
   some themes set an explicit display on selects, so force it. */
.er-geo [hidden] { display: none !important; }
.er-geo__country,
.er-geo__state { max-width: 100%; }
.er-field .er-geo__country,
.er-field .er-geo__state,
.er-field .er-geo__state-text { width: 100%; }
