/* ═══════════════════════════════════════════════════════════
   Event form — the new-event steps and the edit page share these.
   One sheet rather than scoped CSS: the pieces are separate
   components that sit inside each other (When fields in a step,
   a step in the page), and scoped styles stop at the boundary.
   ═══════════════════════════════════════════════════════════ */

.evf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.75rem;
  align-items: start;
}

.evf-aside {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .evf-layout { grid-template-columns: minmax(0, 1fr); }
  .evf-aside { position: static; }
}

.evf-card {
  background: var(--crm-white);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-r-lg);
  box-shadow: var(--crm-shadow-sm);
}

.evf-step-card { padding: 1.75rem 2rem; min-height: 28rem; }

.evf-step-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}

.evf-step-lede {
  margin: 0 0 1.5rem;
  font-size: 0.93rem;
  color: var(--crm-text-2);
}

.evf-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  color: var(--crm-text);
}

.evf-label .evf-opt { font-weight: 400; color: var(--crm-text-2); }

.evf-hint {
  font-size: 0.85rem;
  color: var(--crm-text-2);
  margin: 0.375rem 0 0;
  line-height: 1.45;
}

.evf-stack { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Step rail ─────────────────────────────────────────── */

.evf-rail {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.evf-rail-step {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: var(--crm-r);
  background: transparent;
  color: var(--crm-text);
  text-align: left;
  transition: background var(--crm-fast) ease;
}

.evf-rail-step:hover { background: var(--crm-surface-2); }
.evf-rail-step:focus-visible { outline: 2px solid var(--crm-teal); outline-offset: 2px; }
.evf-rail-step.is-current { background: var(--crm-white); box-shadow: var(--crm-shadow-xs); }

.evf-rail-dot {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--crm-white);
  color: var(--crm-text-2);
  border: 1px solid var(--crm-border-2);
}

.evf-rail-step.is-done .evf-rail-dot { background: var(--crm-teal-600); border-color: var(--crm-teal-600); color: #fff; }
.evf-rail-step.is-current .evf-rail-dot { background: var(--crm-navy); border-color: var(--crm-navy); color: #fff; }

.evf-rail-name { display: block; font-size: 0.93rem; font-weight: 600; }

.evf-rail-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--crm-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .evf-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.evf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

/* ── Choice controls ───────────────────────────────────── */

.evf-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.evf-chip {
  height: 34px;
  padding: 0 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--crm-border-2);
  background: var(--crm-white);
  color: var(--crm-text);
  font-size: 0.9rem;
  transition: border-color var(--crm-fast) ease, background var(--crm-fast) ease;
}

.evf-chip:hover { border-color: var(--crm-navy-400); }
.evf-chip:focus-visible { outline: 2px solid var(--crm-teal); outline-offset: 2px; }

.evf-chip[aria-pressed="true"] {
  background: rgba(var(--crm-teal-rgb), 0.1);
  border-color: var(--crm-teal-600);
  color: #00705F;
  font-weight: 600;
}

.evf-seg {
  display: inline-flex;
  background: var(--crm-surface-2);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.evf-seg button {
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--crm-text-2);
}

.evf-seg button:focus-visible { outline: 2px solid var(--crm-teal); outline-offset: 1px; }

.evf-seg button[aria-pressed="true"] {
  background: var(--crm-white);
  color: var(--crm-text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(var(--crm-navy-rgb), 0.14);
}

.evf-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .evf-choices { grid-template-columns: minmax(0, 1fr); }
}

.evf-choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--crm-border-2);
  border-radius: var(--crm-r);
  background: var(--crm-white);
  color: var(--crm-text);
  text-align: left;
  transition: border-color var(--crm-fast) ease, box-shadow var(--crm-fast) ease;
}

.evf-choice:hover { border-color: var(--crm-navy-400); }
.evf-choice:focus-visible { outline: 2px solid var(--crm-teal); outline-offset: 2px; }

.evf-choice[aria-checked="true"] {
  border-color: var(--crm-teal);
  box-shadow: 0 0 0 3px var(--crm-teal-glow);
}

.evf-choice-ring {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--crm-border-2);
}

.evf-choice[aria-checked="true"] .evf-choice-ring { border: 5px solid var(--crm-teal-600); }

.evf-choice-name { display: block; font-size: 0.93rem; font-weight: 600; }
.evf-choice-desc { display: block; font-size: 0.85rem; color: var(--crm-text-2); margin-top: 2px; line-height: 1.4; }

/* ── Calendar ──────────────────────────────────────────── */

.evf-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.evf-cal-month { font-weight: 600; font-size: 0.97rem; }

.evf-cal-nav {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--crm-navy-600);
}

.evf-cal-nav:hover { background: var(--crm-surface-2); }

.evf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.evf-cal-dow {
  font-size: 0.8rem;
  color: var(--crm-text-2);
  text-align: center;
  padding: 0.25rem 0;
}

.evf-cal-day {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.9rem;
  color: var(--crm-text);
  font-variant-numeric: tabular-nums;
}

.evf-cal-day:hover { background: var(--crm-surface-2); }
.evf-cal-day:focus-visible { outline: 2px solid var(--crm-teal); outline-offset: 1px; }
.evf-cal-day.is-past { color: var(--crm-text-3); }
.evf-cal-day.is-today { box-shadow: inset 0 0 0 1px var(--crm-border-2); }

.evf-cal-day[aria-pressed="true"] {
  background: var(--crm-navy);
  color: #fff;
  font-weight: 600;
}

.evf-when-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 2rem;
}

@media (max-width: 860px) {
  .evf-when-grid { grid-template-columns: minmax(0, 1fr); }
}

.evf-summary {
  margin-top: 1.5rem;
  padding: 0.875rem 1rem;
  background: var(--crm-bg);
  border-radius: var(--crm-r);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.evf-summary .bi { color: var(--crm-teal-600); }

/* ── Preview ───────────────────────────────────────────── */

.evf-aside-label { font-size: 0.85rem; font-weight: 600; color: var(--crm-text-2); }

.evf-preview { overflow: hidden; }

.evf-preview-hero {
  background: var(--crm-navy);
  background-size: cover;
  background-position: center;
  padding: 1.6rem 1.4rem 1.4rem;
}

.evf-preview-type {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--crm-navy);
  background: var(--crm-teal);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 0.75rem;
}

.evf-preview-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  line-height: 1.1;
  color: #fff;
  overflow-wrap: anywhere;
}

.evf-preview-title.is-empty { color: rgba(255, 255, 255, 0.55); }

.evf-preview-body {
  padding: 1.1rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.evf-preview-line {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.93rem;
  line-height: 1.45;
}

.evf-preview-line .bi { color: var(--crm-teal-600); margin-top: 1px; }

.evf-next { list-style: none; margin: 0; padding: 0; }

.evf-next li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.93rem;
  line-height: 1.4;
  padding: 0.625rem 0;
  border-top: 1px solid var(--crm-border);
}

.evf-next li:first-child { border-top: 0; }
.evf-next .bi { color: var(--crm-teal-600); }
.evf-next small { display: block; font-size: 0.85rem; color: var(--crm-text-2); }

/* ── Edit page sections ────────────────────────────────── */

.evf-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2rem;
  padding: 1.75rem 2rem;
  border-top: 1px solid var(--crm-border);
}

.evf-section:first-child { border-top: 0; }

.evf-section-name { font-size: 1.02rem; font-weight: 600; margin: 0 0 0.375rem; }
.evf-section-side { font-size: 0.85rem; color: var(--crm-text-2); margin: 0; line-height: 1.5; }

@media (max-width: 860px) {
  .evf-section { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.25rem; }
}

.evf-switch-row { display: flex; gap: 0.625rem; align-items: center; min-height: 40px; }

/* The meeting hosts section is shared with older screens and uses the app's small capital labels;
   inside the event form it speaks like the fields around it. */
.evf-meeting .form-label {
  font-size: 0.85rem;
  color: var(--crm-text);
  letter-spacing: 0;
  text-transform: none;
}

/* Its platform and host columns are sized for a full-width page; in the form they stack. */
.evf-meeting .row > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }
.evf-meeting .form-select { max-width: 26rem; }
