/**
 * eFiling Calendar (MU) — Component Stylesheet
 *
 * Everything is namespaced under .efc or .efc-single to avoid clashing with
 * the WordPress theme. Do not use bare element selectors at the top level.
 *
 * Section map:
 *   1. Base container
 *   2. Buttons
 *   3. Loading / Error states
 *   4. Search bar + tabs
 *   5. Toolbar (prev / title / next)
 *   6. Month picker dropdown
 *   7. Month grid view
 *   8. Event bubbles + hover preview card
 *   9. List view
 *  10. Day view
 *  11. Latest Past Events strip
 *  12. Single event page (.efc-single)
 *  13. Responsive overrides (≤720px)
 */

/* =============================================================================
   1. BASE CONTAINER
   ============================================================================= */

/**
 * The outermost wrapper output by the [efiling_calendar] shortcode.
 * Uses border-radius and background set by admin theme (output_theme_css in PHP).
 * overflow:visible allows the month-picker dropdown to escape the container.
 */
.efc {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  overflow: visible;
}

/* Apply border-box sizing to all children to prevent layout blowout. */
.efc *,
.efc *::before,
.efc *::after {
  box-sizing: border-box;
}

/**
 * The body wraps the loading indicator, error message, and view panels.
 * overflow-x:hidden clips horizontal bleed; overflow-y:visible allows
 * hover-cards on the bottom week row to extend beyond the container.
 */
.efc__body {
  overflow-x: hidden;
  overflow-y: visible;
}

/* =============================================================================
   2. BUTTONS
   ============================================================================= */

/**
 * Base button reset — applied to all interactive controls inside the calendar.
 * Overridden by modifier classes (.efc__btn--ghost, --primary, --tab).
 */
.efc__btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, .14);
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  user-select: none;
}
.efc__btn:hover  { background: rgba(0, 0, 0, .03); }
.efc__btn:active { transform: translateY(1px); }

/** Ghost variant: transparent border and background (used for nav arrows). */
.efc__btn--ghost {
  border-color: transparent;
  background: transparent;
}

/**
 * Remove ALL visual feedback from ghost buttons (hover, active, focus).
 * !important needed to win over the base .efc__btn:hover rule above.
 */
.efc .efc__btn--ghost,
.efc .efc__btn--ghost:hover,
.efc .efc__btn--ghost:active,
.efc .efc__btn--ghost:focus,
.efc .efc__btn--ghost:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/** Primary variant: uses accent color from admin theme settings. */
.efc__btn--primary {
  border-color: rgba(0, 0, 0, .14);
  background: var(--efc-accent, #3f4b00);
  color: #fff;
}
.efc__btn--primary:hover {
  filter: brightness(0.95);
}

/**
 * Tab variant: used for the List / Month / Day view switcher.
 * Underline-style active indicator instead of a pill background.
 */
.efc__btn--tab {
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--efc-accent, #3f4b00);
  cursor: pointer;
}
.efc__btn--tab:hover,
.efc__btn--tab:active {
  background: transparent;
}
.efc__btn--tab:focus,
.efc__btn--tab:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Active tab: bold text + accent-colored underline bar. */
.efc__view .is-active {
  position: relative;
  color: var(--efc-accent, #3f4b00);
  font-weight: 700;
}
.efc__view .is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 3px;
  background: var(--efc-accent, #3f4b00);
  border-radius: 2px;
}

/* Suppress active tab background applied by admin theme override. */
.efc [data-efc-view].is-active { background: transparent !important; }

/* =============================================================================
   3. LOADING / ERROR STATES
   ============================================================================= */

.efc__loading,
.efc__error {
  padding: 10px 12px;
  font-size: .95rem;
}

.efc__error { color: #b00020; }

/* =============================================================================
   4. SEARCH BAR + TABS
   ============================================================================= */

/**
 * .efc__top wraps the search bar row and the toolbar row.
 * Background is transparent to let the page/card background show through.
 */
.efc__top { background: transparent; }

/**
 * Search bar row: contains search input, clear button, "Find Events" button,
 * and the List/Month/Day tab switcher.
 */
.efc__searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--efc-border, #dcdcdc);
  border-bottom: none;  /* toolbar row sits directly below, shares the border */
  border-radius: var(--efc-radius, 10px) var(--efc-radius, 10px) 0 0;
  background: #fff;
}

/**
 * Search input wrapper — flex:1 makes it expand to fill remaining space.
 * position:relative anchors the clear (×) button inside it.
 */
.efc__search {
  position: relative;
  flex: 1;
}

/** Suppress any ::before pseudo-element (some themes add a magnifying-glass icon). */
.efc__search::before {
  content: none !important;
  display: none !important;
}

/** Full-width text input with left padding for the future icon area. */
.efc__search-input {
  width: 100%;
  /* Right padding accounts for the mic + clear buttons */
  padding: 10px 76px 10px 40px;
  border: 1px solid var(--efc-border, #dcdcdc);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  outline: none;
}
.efc__search-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.efc__voice-btn {
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: .75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.efc__voice-btn:hover { opacity: .95; }
.efc__voice-btn.is-listening { opacity: .55; }
.efc__voice-btn[hidden] { display: none !important; }

.efc__voice-ico {
  width: 18px;
  height: 18px;
}

/**
 * Clear (×) button: absolutely positioned at the right edge of the input.
 * Transparent by default; appears on hover via opacity.
 */
.efc__search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
  opacity: .6;
  cursor: pointer;
}
.efc__search-clear:hover { opacity: .85; }

/** "Find Events" button styling. */
.efc__search-submit {
  padding: 10px 18px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}

/** Tab group separator: visual divider between "Find Events" and the view tabs. */
.efc__view--tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-left: 1px solid var(--efc-border, #dcdcdc);
  margin-left: 6px;
  padding-left: 6px;
}

/** Padding on tabs creates space between text and the active underline. */
.efc__view .efc__btn {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 8px 10px 28px; /* extra bottom padding = gap above underline */
}

/* =============================================================================
   5. TOOLBAR (PREV / TITLE / NEXT)
   ============================================================================= */

/**
 * Navigation toolbar: prev arrow | month title + picker | next arrow.
 * Uses flex (not grid) so the title is naturally centered between fixed-width arrows.
 * !important overrides admin theme which might set background:transparent.
 */
.efc__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  background: #fff !important;
  color: #111 !important;
}

/** Arrow nav buttons use the accent color for the SVG icon. */
.efc__arrow {
  padding: 10px 14px;
  font-size: 28px;
  color: var(--efc-accent, #3f4b00);
}

/** Navigation PNG images sized to match the surrounding text. */
.efc__navimg {
  width: 24px;
  height: 24px;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/**
 * Title button wrapper allows the picker to be positioned relative to it.
 */
.efc__titlewrap { position: relative; }

/**
 * The clickable month/year title button.
 * Styled as large bold text with no pill/bubble — remove ALL state backgrounds.
 */
.efc__titlebtn,
.efc__titlebtn:hover,
.efc__titlebtn:active,
.efc__titlebtn:focus,
.efc__titlebtn:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border-color: transparent !important;
  border: none;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.efc__title {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

/** Chevron down icon beside the month title. */
.efc__chev     { font-size: 18px; opacity: .7; }
.efc__chevdown { width: 14px; height: 10px; display: inline-block; vertical-align: middle; }
.efc__chevsvg  { width: 10px; height: 16px; display: block; }

/* =============================================================================
   6. MONTH PICKER DROPDOWN
   ============================================================================= */

/**
 * Dropdown panel anchored below the title button.
 * z-index:50 keeps it above grid cells but below site-level overlays.
 * Uses CSS custom property --efc-accent for color theming.
 */
.efc__picker {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  background: #fff;
  border: 1px solid var(--efc-border, #dcdcdc);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
  padding: 14px;
  z-index: 50;
  color: var(--efc-accent, #3f4b00);
}

/** Picker header row: prev-year chevron | year number | next-year chevron. */
.efc__picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.efc__picker-year {
  font-weight: 700;
  color: var(--efc-accent, #3f4b00);
}

/** 4-column grid of month buttons (Jan–Dec). */
.efc__picker-months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/** Individual month button: transparent border by default, accent on hover. */
.efc__picker-month {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 6px;
  padding: 10px 8px;
  cursor: pointer;
  color: var(--efc-accent, #3f4b00);
}
.efc__picker-month:hover {
  border-color: var(--efc-accent, #3f4b00);
}
.efc__picker-month.is-selected,
.efc__picker-month:active {
  background: var(--efc-accent, #3f4b00);
  color: #fff;
  border-color: var(--efc-accent, #3f4b00);
}

/* =============================================================================
   7. MONTH GRID VIEW — week-row architecture
   ============================================================================= */

.efc__month { width: 100%; }

/**
 * Outer grid wrapper.
 * Each child is a .efc__week-row — NOT a flat 42-cell CSS grid.
 */
.efc__grid {
  border-top: 1px solid rgba(0, 0, 0, .08);
}

/** Day-of-week header row (Mon Tue … Sun). */
.efc__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(0, 0, 0, .03);
  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.efc__dow div {
  padding: 8px;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}

/**
 * One row of 7 days + its event bars.
 * Uses flex-column so the day-numbers strip and the events strip stack
 * vertically and the row height expands naturally with event count.
 */
.efc__week-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  position: relative;
  overflow: visible;
  z-index: 0;
}
/* Raise the whole row when hovered so its hovercard clears ALL subsequent rows */
.efc__week-row:hover,
.efc__week-row:focus-within { z-index: 1000; }
.efc__week-row:last-child { border-bottom: none; }

/** 7-column grid holding the date-number cells. */
.efc__week-daynums {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/**
 * Individual day-number cell — shows the date and "Today" badge.
 * Does NOT contain event bubbles.
 */
.efc__day-cell {
  min-height: 38px;
  padding: 6px 8px 4px;
  border-right: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
}
.efc__day-cell:last-child { border-right: none; }
.efc__day-cell--muted {
  background: rgba(0, 0, 0, .02);
  color: rgba(0, 0, 0, .55);
}
.efc__day-cell--today strong {
  color: var(--efc-accent, #3f4b00);
}

/** Day number layout (number left, "Today" badge right). */
.efc__daynum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.efc__daynum strong { font-size: .95rem; }

/** "Today" badge. */
.efc__badge {
  font-size: .72rem;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .06);
}

/**
 * Event layer for a week row.
 *
 * KEY ELEMENT — this is a 7-column CSS Grid.
 * Each event <a> uses  grid-column: start / span N  so it genuinely spans
 * multiple columns inside a single DOM element, no hacks needed.
 *
 * grid-auto-rows controls the height of each stacked event row (slot).
 * overflow:visible lets hover-cards escape the layer boundary.
 */
.efc__week-events {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 44px;  /* fixed height — prevents row from expanding when hovercard appears */
  padding: 3px 0 5px;
  min-height: 8px;
  overflow: visible;
  position: relative;
  /* 6 vertical column-separator lines matching .efc__day-cell border-right positions */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08)),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08)),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08)),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08)),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08)),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08));
  background-repeat: no-repeat;
  background-size: 1px 100%;
  background-position:
    calc(1 * 100% / 7) 0,
    calc(2 * 100% / 7) 0,
    calc(3 * 100% / 7) 0,
    calc(4 * 100% / 7) 0,
    calc(5 * 100% / 7) 0,
    calc(6 * 100% / 7) 0;
}

/* =============================================================================
   8. EVENT BUBBLES + HOVER PREVIEW CARD
   ============================================================================= */

/** Stacking container used in list / day views. */
.efc__events { display: grid; gap: 6px; }

/**
 * Base event bubble — list view and day view.
 * position:relative anchors the hover card.
 */
.efc__event,
.efc__event:hover,
.efc__event:focus {
  display: block;
  position: relative;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .10);
  text-decoration: none !important;
  color: inherit;
  background: rgba(0, 0, 0, .02);
}
.efc__event:hover { background: rgba(0, 0, 0, .05); }
.efc__event * { text-decoration: none !important; }

/**
 * .efc__event--bar  — spanning pill used in the month grid.
 *
 * IMPORTANT: overflow must be VISIBLE here so the absolutely-positioned
 * hovercard can escape. Text clipping is handled by .efc__event-bar-inner.
 */
.efc__event--bar {
  display: block;
  position: relative;   /* anchor for hovercard */
  padding: 0;
  border-radius: 6px;
  margin: 2px 3px;
  overflow: visible;    /* ← must NOT be hidden — hovercard lives here */
  cursor: pointer;
  z-index: 1;
  min-height: 38px;
}
/* Raise above all sibling bars when hovered so the hovercard is never obscured */
.efc__event--bar:hover,
.efc__event--bar:focus,
.efc__event--bar:focus-within {
  z-index: 100;
}

/**
 * Inner text wrapper — clips the time + title text without clipping
 * the hovercard which is a sibling, not a child, of this element.
 */
.efc__event-bar-inner {
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 8px;
  height: 100%;
  border-radius: inherit;
}

/** Continues from the previous week row — no left radius, flush left edge. */
.efc__event--bar.efc__event--bar-open-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
}
.efc__event--bar.efc__event--bar-open-left .efc__event-bar-inner {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/** Continues into the next week row — no right radius, flush right edge. */
.efc__event--bar.efc__event--bar-open-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: 0;
}
.efc__event--bar.efc__event--bar-open-right .efc__event-bar-inner {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/** "+N more" overflow label shown per column when MAX_SLOTS is exceeded. */
.efc__event-overflow {
  font-size: .75rem;
  opacity: .7;
  padding: 2px 6px;
  align-self: center;
  white-space: nowrap;
  cursor: default;
}

.efc__event-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inside a spanning bar, allow the title to wrap to avoid invisible text */
.efc__event--bar .efc__event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.efc__event-time {
  font-size: .75rem;
  opacity: .85;
  margin-top: 0;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
}

/**
 * Hover preview card.
 * The <a> bar has position:relative, so top:100% places this just below it.
 * z-index:9999 ensures it floats above all grid/week-row layers.
 * white-space:normal overrides the inner wrapper's nowrap.
 * Explicit color + background resets prevent the bar's theme colors bleeding in.
 */
.efc__hovercard {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  width: 300px;
  max-width: 360px;
  background: #fff !important;
  color: #333 !important;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 6px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  z-index: 99999;
  white-space: normal;
  overflow: visible;
  pointer-events: auto;
}

.efc__event:hover .efc__hovercard,
.efc__event:focus .efc__hovercard,
.efc__event:focus-within .efc__hovercard {
  display: block;
}

.efc__hovercard-when {
  font-size: 12px;
  color: #9fa695;
  opacity: .85;
  margin-bottom: 8px;
}

.efc__hovercard-title {
  font-size: 15px;
  font-weight: 700;
  color: #9fa695;
  line-height: 1.25;
  margin-bottom: 8px;
}

.efc__hovercard-desc {
  font-size: 13px;
  line-height: 1.35;
  opacity: .9;
  color: #9fa695;
}

.efc__hovercard-more {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

/* =============================================================================
   9. LIST VIEW
   ============================================================================= */

.efc__list {
  padding: 8px 12px 14px;
}

.efc__list-item {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.efc__list-item:last-child { border-bottom: none; }

.efc__list-date { font-weight: 700; }
.efc__list-meta { font-size: .9rem; opacity: .75; }

/* =============================================================================
   10. DAY VIEW
   ============================================================================= */

.efc__day-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--efc-border, #e6e6e6);
}

/**
 * Empty-state message shown when no events exist for the selected day.
 * Includes a calendar icon and a link to the next upcoming events.
 */
.efc__day-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f2f3f3;
  border: 1px solid #e2e6e6;
  border-radius: 6px;
  margin: 12px 0;
  color: #111;
}

.efc__day-message-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
}
.efc__day-message-icon svg { width: 24px; height: 24px; }

.efc__day-message-text { line-height: 1.4; }

.efc__day-message-link {
  color: var(--efc-accent, #4b5b14);
  text-decoration: underline;
}

/* =============================================================================
   11. LATEST PAST EVENTS STRIP
   ============================================================================= */

/**
 * Rendered below the calendar widget by PHP (render_latest_past_events_section).
 * Uses TEC (The Events Calendar) class names so it inherits TEC theme styles
 * when that plugin is active. Scoped fallback styles are provided here.
 */
.efc__latest-past {
  margin-top: 22px;
}

.efc__latest-past .tribe-events-calendar-latest-past__heading {
  margin: 0 0 14px;
  font-weight: 700;
}

.efc__latest-past .tribe-events-calendar-latest-past__event-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
.efc__latest-past .tribe-events-calendar-latest-past__event-row:first-of-type {
  border-top: 0;
}

/** Date tag column (shows month abbreviation, day number, year stacked). */
.efc__latest-past .tribe-events-calendar-latest-past__event-date-tag        { min-width: 74px; }
.efc__latest-past .tribe-events-calendar-latest-past__event-date-tag-datetime { display: inline-block; line-height: 1.05; }
.efc__latest-past .tribe-events-calendar-latest-past__event-date-tag-month  { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.efc__latest-past .tribe-events-calendar-latest-past__event-date-tag-daynum { display: block; font-size: 24px; font-weight: 700; }
.efc__latest-past .tribe-events-calendar-latest-past__event-date-tag-year   { display: block; font-size: 12px; opacity: .8; }

.efc__latest-past .tribe-events-calendar-latest-past__event-title { margin: 6px 0 0; }
.efc__latest-past .tribe-events-calendar-latest-past__event-title-link {
  text-decoration: none;
  color: #3f4b00;
}
.efc__latest-past .tribe-events-calendar-latest-past__event-title-link:hover {
  text-decoration: underline;
}

/* =============================================================================
   12. SINGLE EVENT PAGE (.efc-single)
   ============================================================================= */

/** Applied to the <main> element of virtual event detail pages. */
.efc-single__wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.efc-single__title   { margin: 0 0 8px; }
.efc-single__meta    { display: flex; flex-wrap: wrap; gap: 6px; opacity: .85; }
.efc-single__meta-item { white-space: nowrap; }
.efc-single__section { margin-top: 18px; }
.efc-single__h2      { margin: 0 0 8px; font-size: 1.1rem; }
.efc-single__nav     { margin-top: 18px; }

/** Scoped fallbacks for btn-green/btn-grey used on the event page. */
.efc-single .btn-green,
.efc-single .btn-grey {
  display: inline-block;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
}
.efc-single .btn-grey {
  border: 1px solid rgba(0, 0, 0, .12);
}

/**
 * Fix: "Other Calendar Events" button container.
 * The .tab-btn theme class may apply flex/column layout that pushes the button
 * to the left and stacks it oddly. Force it to be a full-width block so the
 * theme's btn-block class (which sets width:100%) and text-align:center work.
 */
.efc-single .tab-btn {
  display: block;
  width: 100%;
  text-align: center;
}
.efc-single .tab-btn .btn-grey,
.efc-single .tab-btn .btn-block {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/** Force "Add to Calendar" links to stack vertically on the single-event page. */
.efc-single .calendar_custom_links .tribe-events-cal-links {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.efc-single .calendar_custom_links .tribe-events-cal-links a {
  display: flex !important;
  width: 100% !important;
  margin-bottom: 12px !important;
}

/** Calendar icon used in "Add to Calendar" buttons. */
.efc-single .efc__calicon {
  width: 25px;
  height: 18px;
  flex: 0 0 auto;
}

/* =============================================================================
   13. RESPONSIVE OVERRIDES (≤720px)
   ============================================================================= */

@media (max-width: 720px) {
  /** Stack toolbar into a single column on narrow screens. */
  .efc__toolbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .efc__title  { text-align: left; }
  .efc__view   { justify-content: flex-start; flex-wrap: wrap; }

  /** Tighten day-of-week headers and day cells on small screens. */
  .efc__dow div    { font-size: .75rem; padding: 6px 4px; }
  .efc__day        { min-height: 92px; padding: 6px; }
  .efc__event-title { font-size: .84rem; }
}

@media (max-width: 520px) {
  /** Constrain hover card width on very small viewports. */
  .efc__hovercard { width: min(320px, 90vw); }
}