/* =====================================================================
   Kartrite Hours Manager — Frontend CSS v1.6.1
   Uses CSS Custom Properties from wp_head output.
   Kartrite Brand Palette: DarkAqua #0081A7 · BrightAqua #00AFB9
   AccentMagenta #FA0E7C · KartriteStone #AEA299 · Menu #58514A
   ===================================================================== */

/* ── Reset / Base ──────────────────────────────────────────────────── */
.khm-hours,
.khm-hours *,
.khm-venues-grid,
.khm-venues-grid *,
.khm-venue-hours,
.khm-venue-hours *,
.khm-tl,
.khm-tl *,
.khm-cal,
.khm-cal * {
  box-sizing: border-box;
}
/* Kill theme p margins inside cards */
.khm-card p,
.khm-hours p,
.khm-next-table p {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

/* ── Main container ────────────────────────────────────────────────── */
.khm-hours,
.khm-venues-grid,
.khm-venue-hours {
  font-family: var(--khm-font-family);
  font-size:   var(--khm-font-size-body);
  color:       var(--khm-color-text);
  padding:     24px 0;
  width:       100%;
  max-width:   100%;
  min-width:   0;
  box-sizing:  border-box;
  overflow:    hidden;
}

/* ── Header ────────────────────────────────────────────────────────── */
.khm-hours__header   { margin-bottom: 24px; }
.khm-hours__title    { font-size: var(--khm-font-size-heading); font-weight: 700; margin: 0 0 4px; }
.khm-hours__date     { font-size: 18px; font-weight: 900; color: var(--khm-color-text-muted); display: block; margin-bottom: 0 !important; margin-top: 10px; }

/* ── Group headings ────────────────────────────────────────────────── */
.khm-group { margin-bottom: 32px; }
.khm-group__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px !important;
  font-weight: 600;
  margin: 20px 0 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--khm-color-text-muted);
}
.khm-group__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.khm-group__dot--open         { background: #00AFB9; }
.khm-group__dot--opens_later  { background: #FA0E7C; }
.khm-group__dot--later        { background: #FA0E7C; }
.khm-group__dot--closed       { background: #AEA299; }

/* ── Category sub-divider (light, between grids inside a status group) */
.khm-cat-divider {
  font-size: 15px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--khm-color-text-light, #94A3B8);
  margin-top: 15px !important;
  margin-bottom: 0 !important;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.khm-cat-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,175,185,0.15);
}
.khm-group__heading + .khm-cat-divider { margin-top: 0; }

/* ── Temporarily closed section ─────────────────────────────────────── */
.khm-group--temp-closed { opacity: 0.7; }
.khm-group--temp-closed .khm-card { opacity: 1; }

/* ── Grid — auto-fill adapts to any container width ───────────────── */
.khm-grid {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.khm-grid--1 { grid-template-columns: 1fr; }
.khm-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.khm-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.khm-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ── Card ──────────────────────────────────────────────────────────── */
.khm-card {
  background:    var(--khm-color-bg-card);
  border-radius: var(--khm-border-radius);
  box-shadow:    var(--khm-shadow);
  border:        1px solid transparent;
  padding:       20px;
  transition:    transform var(--khm-transition), box-shadow var(--khm-transition);
  display:       flex;
  flex-direction:column;
  gap:           12px;
  min-width:     0;
  overflow:      visible;
  word-break:    break-word;
}
.khm-card:hover {
  transform:  translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.khm-card--open   { border-color: color-mix(in srgb, var(--khm-card-open-border, #00AFB9) 30%, transparent);  background: rgba(0,129,167,0.05); }
.khm-card--later  { border-color: color-mix(in srgb, var(--khm-card-later-border, #FA0E7C) 20%, transparent); background: transparent; }
.khm-card--closed { border-color: rgba(174,162,153,0.15); opacity: 0.85; }
.khm-card--perm-closed { opacity: 0.6; }

.khm-card__header {
  display:     flex;
  align-items: flex-start;
  gap:         8px;
  min-width:   0;
}
.khm-card__title-group{ flex: 1; min-width: 0; overflow: hidden; }
.khm-card__name       { font-size: var(--khm-font-size-heading) !important; font-weight: 700; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--khm-card-venue-name, #58514A); }
.khm-card__subtitle   { font-size: 12px; color: var(--khm-card-subtitle, #AEA299); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.khm-card__body  { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.khm-card__today { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.khm-card__label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--khm-color-text-muted); }
.khm-card__slot-label { font-size: 12px; color: var(--khm-color-text-muted); }
.khm-card__hours { font-size: 15px; font-weight: 600; }
.khm-card__next-open { font-size: 13px; color: var(--khm-color-text-muted); margin: 0; }

/* Sub-venues */
.khm-card__sub-venues { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #E2E8F0; padding-top: 10px; }
.khm-sub-venue        { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.khm-sub-venue__name  { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Weekly days indicator (compact) with tooltip ─────────────────── */
.khm-week-dots {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-top: 2px;
}
.khm-week-dots__day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--khm-color-text-light);
  background: #F1F5F9;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.khm-week-dots__day:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 2;
}
.khm-week-dots__day--open {
  background: var(--khm-color-open-bg);
  color: color-mix(in srgb, var(--khm-color-open) 80%, #000);
  border-color: var(--khm-color-open-border);
}
.khm-week-dots__day--today {
  outline: 2px solid var(--khm-color-primary);
  outline-offset: 1px;
  font-weight: 800;
}
.khm-week-dots__day--today.khm-week-dots__day--open {
  color: #fff;
  background: var(--khm-color-open);
}

/* Tooltip — appears on hover / tap */
.khm-week-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: block !important;
  background: var(--khm-color-text, #1E293B);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.khm-week-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--khm-color-text, #1E293B);
}
.khm-week-dots__day:hover .khm-week-tip,
.khm-week-dots__day--tip-visible .khm-week-tip {
  opacity: 1;
}
/* First 2 dots — align tooltip left so it doesn't clip */
.khm-week-dots__day:first-child .khm-week-tip,
.khm-week-dots__day:nth-child(2) .khm-week-tip {
  left: 0;
  transform: none;
}
.khm-week-dots__day:first-child .khm-week-tip::after,
.khm-week-dots__day:nth-child(2) .khm-week-tip::after {
  left: 11px;
  transform: none;
}
/* Last 2 dots — align tooltip right */
.khm-week-dots__day:nth-last-child(1) .khm-week-tip,
.khm-week-dots__day:nth-last-child(2) .khm-week-tip {
  left: auto;
  right: 0;
  transform: none;
}
.khm-week-dots__day:nth-last-child(1) .khm-week-tip::after,
.khm-week-dots__day:nth-last-child(2) .khm-week-tip::after {
  left: auto;
  right: 11px;
  transform: none;
}

/* ── All-Closed Banner ────────────────────────────────────────────── */
.khm-allclosed-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--khm-color-closed-bg);
  border: 1px solid var(--khm-color-closed-border);
  border-radius: var(--khm-border-radius);
  padding: 18px 22px;
  margin-bottom: 28px;
}
.khm-allclosed-banner__icon {
  font-size: 22px;
  color: var(--khm-color-closed);
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--khm-color-closed) 12%, transparent);
}
.khm-allclosed-banner__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.khm-allclosed-banner__text strong {
  font-size: 16px;
  color: var(--khm-color-text);
}
.khm-allclosed-banner__text span {
  font-size: 14px;
  color: var(--khm-color-text-muted);
}

/* ── Next Opening Times Table (compact) ──────────────────────────── */
.khm-next-table-section { margin-bottom: 24px !important; }
.khm-next-table-wrap { overflow-x: auto; }
.khm-next-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
}
.khm-next-table thead th {
  font-size: 10px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--khm-color-text-muted);
  padding: 6px 10px !important;
  border-bottom: 2px solid #E2E8F0;
  text-align: left;
  background: var(--khm-color-bg-section);
}
.khm-next-table tbody td {
  padding: 8px 10px !important;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 13px !important;
  line-height: 1.3 !important;
}
.khm-next-table__row:last-child td { border-bottom: none; }
.khm-next-table__row--perm {
  background: #F8F7F6;
}
/* Category divider row inside table */
.khm-next-table__cat-cell {
  font-size: 11px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--khm-color-text-light, #94A3B8);
  padding: 12px 10px 4px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  background: transparent !important;
}
.khm-next-table__cat-row:first-child .khm-next-table__cat-cell {
  padding-top: 4px !important;
}
.khm-next-table__name {
  font-size: 13px !important;
  font-weight: 700;
  display: block;
  color: var(--khm-color-text);
}
.khm-next-table__cell-reopens {
  font-size: 13px !important;
  color: var(--khm-color-text);
}
.khm-next-table__cell-hours {
  font-size: 13px !important;
  color: var(--khm-color-text-muted);
}
.khm-next-table__tbd {
  color: var(--khm-color-text-light);
  font-style: italic;
}

/* ── Badge ─────────────────────────────────────────────────────────── */
.khm-badge {
  display:        inline-flex;
  align-items:    center;
  gap:            5px;
  padding:        4px 10px;
  border-radius:  999px;
  font-size:      12px;
  font-weight:    600;
  white-space:    nowrap;
  flex-shrink:    0;
}
.khm-badge--sm { font-size: 11px; padding: 2px 8px; }
.khm-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.khm-badge--open   { background: #4EADB7;   color: #fff; border: 1px solid transparent; }
.khm-badge--open   .khm-badge__dot { background: #fff; }
.khm-badge--later  { background: rgba(250,14,124,0.1);  color: #FA0E7C; border: 1px solid rgba(250,14,124,0.3); }
.khm-badge--later  .khm-badge__dot { background: #FA0E7C; }
.khm-badge--closed { background: rgba(174,162,153,0.1); color: #AEA299; border: 1px solid rgba(174,162,153,0.2); }
.khm-badge--closed .khm-badge__dot { background: #AEA299; }

/* ── Countdown ─────────────────────────────────────────────────────── */
.khm-countdown      { font-size: 13px; color: var(--khm-color-text-muted); }
.khm-card__countdown{ margin-top: -6px; }

/* ── Filters ───────────────────────────────────────────────────────── */
.khm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.khm-filter {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       6px 14px;
  border:        1px solid #CBD5E1;
  border-radius: 999px;
  background:    #fff;
  font-size:     13px;
  font-weight:   500;
  cursor:        pointer;
  color:         var(--khm-color-text);
  transition:    all var(--khm-transition);
}
.khm-filter:hover            { border-color: var(--khm-color-primary); color: var(--khm-color-primary); }
.khm-filter--active          { background: var(--khm-color-primary); color: #fff; border-color: var(--khm-color-primary); }
.khm-filter__dot             { width: 7px; height: 7px; border-radius: 50%; }
.khm-filter__dot--open       { background: #00AFB9; }
.khm-filter__dot--later      { background: #FA0E7C; }
.khm-filter__dot--closed     { background: #AEA299; }

/* ── Inline / compact list ─────────────────────────────────────────── */
.khm-inline-list     { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.khm-inline-item     { display: inline-flex; align-items: center; gap: 6px; }
.khm-inline-sep      { color: var(--khm-color-text-light); }

.khm-list-compact    { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.khm-compact-item    { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--khm-color-bg-card); border-radius: 8px; box-shadow: var(--khm-shadow); }
.khm-compact-name    { flex: 1; font-weight: 600; }
.khm-compact-hours   { font-size: 12px; color: var(--khm-color-text-muted); }

.khm-list            { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.khm-list-item       { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--khm-color-bg-card); border-bottom: 1px solid #F1F5F9; }
.khm-list-item:last-child { border-bottom: none; }
.khm-list-item__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.khm-list-item__right{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.khm-list-name       { font-weight: 600; font-size: var(--khm-font-size-body); }
.khm-list-subtitle   { font-size: 12px; color: var(--khm-color-text-muted); display: block; }
.khm-list-hours      { font-size: 13px; }

/* ── Hours table ───────────────────────────────────────────────────── */
.khm-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--khm-font-size-body);
}
.khm-hours-table th,
.khm-hours-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #F1F5F9; }
.khm-hours-table th  { font-weight: 600; background: var(--khm-color-bg-section); }
.khm-hours-row--today { background: color-mix(in srgb, var(--khm-color-primary) 8%, #fff); font-weight: 600; }
.khm-hours-cell--open   { color: color-mix(in srgb, var(--khm-color-open)   80%, #000); }
.khm-hours-cell--closed { color: var(--khm-color-text-light); }
.khm-today-marker { font-size: 11px; font-weight: normal; color: var(--khm-color-primary); margin-left: 4px; }

/* Hours list layout */
.khm-hours-list { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.khm-hours-list__item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F1F5F9; }
.khm-hours-list__item--today { background: color-mix(in srgb, var(--khm-color-primary) 6%, #fff); font-weight: 600; padding-left: 8px; border-radius: 4px; }
.khm-hours-list__day { min-width: 100px; font-weight: 600; }
.khm-hours-list__hours { color: var(--khm-color-text-muted); }

/* ── Week table ────────────────────────────────────────────────────── */
.khm-week-table-wrapper { overflow-x: auto; max-width: 100%; }
.khm-week-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.khm-week-table th,
.khm-week-table td { padding: 8px 10px; text-align: center; border: 1px solid #E2E8F0; }
.khm-week-table th   { background: var(--khm-color-bg-section); font-weight: 600; }
.khm-week-venue-col  { text-align: left; min-width: 160px; }
.khm-week-day-col    { min-width: 80px; }
.khm-week-day-col--today { background: color-mix(in srgb, var(--khm-color-primary) 10%, #fff); font-weight: 700; }
.khm-week-cell--open   { background: var(--khm-color-open-bg); }
.khm-week-cell--closed { background: #F8F7F6; color: #AEA299; }
.khm-week-cell--today  { outline: 2px solid var(--khm-color-primary); outline-offset: -2px; }
.khm-week-time { font-size: 11px; white-space: nowrap; }
.khm-week-closed { color: #AEA299; }
.khm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.khm-dot--open   { background: #00AFB9; }
.khm-dot--closed { background: #AEA299; }

/* ── Upcoming dates ────────────────────────────────────────────────── */
.khm-upcoming-dates         { background: var(--khm-color-bg-section); border-radius: var(--khm-border-radius); padding: 20px 24px; margin: 16px 0; }
.khm-upcoming-dates__title  { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.khm-upcoming-dates__list   { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.khm-upcoming-dates__item   { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 14px; }
.khm-upcoming-dates__label  { font-weight: 700; color: var(--khm-color-primary); }
.khm-upcoming-dates__date   { font-weight: 600; }
.khm-upcoming-dates__desc   { color: var(--khm-color-text-muted); }

/* ── Disclaimer ────────────────────────────────────────────────────── */
.khm-disclaimer { font-size: 12px; color: var(--khm-color-text-muted); margin-top: 16px; }

/* ── Search ────────────────────────────────────────────────────────── */
.khm-search       { margin-bottom: 16px; }
.khm-search__input{
  width: 100%;
  max-width: 320px;
  padding: 8px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  font-size: 14px;
  outline: none;
}
.khm-search__input:focus { border-color: var(--khm-color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--khm-color-primary) 20%, transparent); }

/* ── Special note ──────────────────────────────────────────────────── */
.khm-special-note { font-size: 13px; color: var(--khm-color-text-muted); margin-top: 12px; padding: 12px 16px; background: var(--khm-color-bg-section); border-radius: 8px; }

/* ── Overrides ─────────────────────────────────────────────────────── */
.khm-venue-overrides { margin-top: 16px; padding: 12px 16px; background: rgba(0,129,167,0.06); border: 1px solid rgba(0,175,185,0.15); border-radius: 8px; }
.khm-venue-overrides__title { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.khm-venue-overrides ul { margin: 0; padding-left: 18px; font-size: 13px; }

/* ── Compact Schedule [khm_compact_schedule] ──────────────────────── */
.khm-cs {
  font-family: var(--khm-font-family) !important;
  font-size: 14px !important;
  color: #1E293B !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08) !important;
  overflow: hidden !important;
}
.khm-cs *,
.khm-cs *::before,
.khm-cs *::after {
  box-sizing: border-box !important;
}
.khm-cs p,
.khm-cs h2 {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}
.khm-cs h3 {
  margin-bottom: 5px !important;
  margin-top: 0 !important;
}

/* ─ Header ─ */
.khm-cs__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, var(--khm-cs-header-from, #0081A7), var(--khm-cs-header-to, #00AFB9)) !important;
  min-height: 50px !important;
}
.khm-cs__header-left {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}
.khm-cs__today-label {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  color: rgba(255,255,255,0.7) !important;
}
.khm-cs__date {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #fff !important;
  line-height: 1.2 !important;
}
.khm-cs__full-link {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.khm-cs__full-link:hover {
  text-decoration: underline !important;
  color: rgba(255,255,255,0.8) !important;
}

/* ─ Section ─ */
.khm-cs__section {
  padding: 0 !important;
  border-top: 1px solid rgba(0,175,185,0.15) !important;
}
.khm-cs__section:first-of-type {
  border-top: none !important;
}
.khm-cs__section-label {
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  color: var(--khm-cs-section-label, #FA0E7C) !important;
  padding: 16px 16px 8px !important;
  line-height: 1.2 !important;
  border-left: 4px solid var(--khm-cs-section-label, #FA0E7C) !important;
}

/* ─ Grid (div-based layout, replaces table) ─ */
.khm-cs__grid {
  width: 100% !important;
  margin-bottom: 0 !important;
}

/* ─ Row header + data row — CSS Grid for consistent columns ─ */
.khm-cs__row-header,
.khm-cs__row {
  display: grid !important;
  grid-template-columns: 42% 26% 32% !important;
  align-items: center !important;
}

/* ─ Column headers ─ */
.khm-cs__row-header {
  background: rgba(0,129,167,0.08) !important;
}
.khm-cs__col {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #0081A7 !important;
  padding: 6px 16px !important;
  line-height: 24px !important;
  white-space: nowrap !important;
}

/* ─ Data row ─ */
.khm-cs__row {
  min-height: 38px !important;
  border-bottom: 1px solid rgba(0,175,185,0.08) !important;
  transition: background-color 150ms ease !important;
  cursor: default !important;
}
.khm-cs__row:last-child {
  border-bottom: none !important;
}
.khm-cs__row[data-href] {
  cursor: pointer !important;
}
.khm-cs__row:hover {
  background-color: rgba(0,129,167,0.04) !important;
}
.khm-cs__row:focus-visible {
  outline: 2px solid #00AFB9 !important;
  outline-offset: -2px !important;
}

/* ─ Cells ─ */
.khm-cs__cell {
  padding: 0 16px !important;
  font-size: 13px !important;
  line-height: 38px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* ─ Row backgrounds by status ─ */
.khm-cs__row--open   { background: rgba(0,129,167,0.05) !important; }
.khm-cs__row--later  { background: transparent !important; }
.khm-cs__row--closed { background: #F8F7F6 !important; opacity: 0.7 !important; }
.khm-cs__row--temp   { background: #F8F7F6 !important; opacity: 0.5 !important; }

.khm-cs__row--open:hover   { background: rgba(0,129,167,0.08) !important; }
.khm-cs__row--later:hover  { background: rgba(0,129,167,0.04) !important; }
.khm-cs__row--closed:hover { background: rgba(0,129,167,0.04) !important; opacity: 0.8 !important; }
.khm-cs__row--temp:hover   { background: rgba(0,129,167,0.04) !important; opacity: 0.6 !important; }

/* ─ Venue cell: dot + icon + name ─ */
.khm-cs__cell--venue {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.khm-cs__dot {
  display: inline-block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.khm-cs__dot--open   { background: #00AFB9 !important; }
.khm-cs__dot--later  { background: #FA0E7C !important; }
.khm-cs__dot--closed { background: #AEA299 !important; }
.khm-cs__dot--temp   { background: #C4BBB3 !important; }

.khm-cs__icon {
  font-size: 14px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}
.khm-cs__name {
  font-weight: 600 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* Name weight/color by status */
.khm-cs__row--open .khm-cs__name   { font-weight: 700 !important; color: var(--khm-cs-venue-name, #58514A) !important; }
.khm-cs__row--later .khm-cs__name  { font-weight: 600 !important; color: var(--khm-cs-venue-name, #58514A) !important; }
.khm-cs__row--closed .khm-cs__name { font-weight: 600 !important; color: #AEA299 !important; }
.khm-cs__row--temp .khm-cs__name   { font-weight: 500 !important; color: #C4BBB3 !important; }

/* ─ Status badge (pill) ─ */
.khm-cs__badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 12px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
}
.khm-cs__badge--open {
  background: #4EADB7 !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.khm-cs__badge--later {
  background: rgba(250,14,124,0.1) !important;
  color: #FA0E7C !important;
  border-color: rgba(250,14,124,0.3) !important;
}
.khm-cs__badge--closed {
  background: rgba(174,162,153,0.1) !important;
  color: #AEA299 !important;
  border-color: rgba(174,162,153,0.2) !important;
}
.khm-cs__badge--temp {
  background: rgba(196,187,179,0.1) !important;
  color: #C4BBB3 !important;
  border-color: rgba(196,187,179,0.2) !important;
}

/* ─ Hours cell ─ */
.khm-cs__cell--hours {
  font-size: 12.5px !important;
  white-space: nowrap !important;
}
.khm-cs__hours--open   { font-weight: 600 !important; color: #58514A !important; }
.khm-cs__hours--later  { font-weight: 500 !important; color: #7A7068 !important; }
.khm-cs__hours--closed { font-weight: 400 !important; color: #AEA299 !important; }
.khm-cs__hours--temp   { font-weight: 400 !important; color: #C4BBB3 !important; font-style: italic !important; }

/* ─ All-Closed Banner ─ */
.khm-cs__closed-banner {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  background: #F8F7F6 !important;
  border: 1px solid rgba(174,162,153,0.2) !important;
  border-radius: 8px !important;
  padding: 18px 16px !important;
  margin: 16px !important;
}
.khm-cs__closed-x {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(174,162,153,0.15) !important;
  color: #AEA299 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}
.khm-cs__closed-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.khm-cs__closed-body strong {
  font-size: 14px !important;
  color: #1E293B !important;
}
.khm-cs__closed-body span {
  font-size: 13px !important;
  color: #64748B !important;
}
.khm-cs__closed-link {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #339CB8 !important;
  text-decoration: none !important;
  margin-top: 4px !important;
}
.khm-cs__closed-link:hover {
  text-decoration: underline !important;
}

/* ─ Disclaimer ─ */
.khm-cs__disclaimer {
  font-size: 10px !important;
  font-weight: 400 !important;
  font-style: italic !important;
  color: rgba(0,129,167,0.6) !important;
  padding: 10px 16px !important;
  line-height: 1.2 !important;
  border-top: 1px solid rgba(0,175,185,0.15) !important;
  background: rgba(0,129,167,0.06) !important;
  margin: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   Timeline  [khm_timeline]
   ══════════════════════════════════════════════════════════════════════ */

/* ── Root ──────────────────────────────────────────────────────────── */
.khm-tl {
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  overflow: hidden !important;
  font-family: var(--khm-font-family) !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #333 !important;
  position: relative !important;
}
.khm-tl *,
.khm-tl *::before,
.khm-tl *::after { box-sizing: border-box; }

/* ── Header ────────────────────────────────────────────────────────── */
.khm-tl__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 20px !important;
  background: linear-gradient(135deg, var(--khm-tl-header-from, #0081A7), var(--khm-tl-header-to, #00AFB9)) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}
.khm-tl__header-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}
.khm-tl__today-label {
  font-weight: 800 !important;
  font-size: 13px !important;
  letter-spacing: 0.08em !important;
}
.khm-tl__sep {
  opacity: 0.5 !important;
}
.khm-tl__date {
  font-weight: 500 !important;
}
.khm-tl__clock {
  font-variant-numeric: tabular-nums !important;
}
.khm-tl__full-link {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  opacity: 0.9 !important;
  white-space: nowrap !important;
  transition: opacity 0.15s ease !important;
}
.khm-tl__full-link:hover {
  opacity: 1 !important;
  text-decoration: underline !important;
}

/* ── Body (position context for NOW overlay) ───────────────────────── */
.khm-tl__body {
  position: relative !important;
  padding: 0 0 12px !important;
}

/* ── Time axis ─────────────────────────────────────────────────────── */
.khm-tl__axis {
  position: relative !important;
  height: 32px !important;
  margin: 0 20px 0 180px !important;
  border-bottom: 1px solid rgba(0,175,185,0.12) !important;
}
.khm-tl__axis-tick {
  position: absolute !important;
  top: 10px !important;
  transform: translateX(-50%) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #AEA299 !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
  user-select: none !important;
}
/* Vertical grid lines */
.khm-tl__axis-tick::after {
  content: '' !important;
  position: absolute !important;
  top: 18px !important;
  left: 50% !important;
  width: 1px !important;
  height: 2000px !important;
  background: rgba(0,175,185,0.06) !important;
  pointer-events: none !important;
}

/* ── NOW indicator ─────────────────────────────────────────────────── */
.khm-tl__now {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  z-index: 10 !important;
  pointer-events: none !important;
}
.khm-tl__now-dot {
  position: absolute !important;
  top: 4px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: var(--khm-tl-now, #FA0E7C) !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
.khm-tl__now-line {
  position: absolute !important;
  top: 22px !important;
  left: 50% !important;
  width: 2px !important;
  bottom: 0 !important;
  transform: translateX(-50%) !important;
  background: repeating-linear-gradient(
    to bottom,
    var(--khm-tl-now, #FA0E7C) 0px,
    var(--khm-tl-now, #FA0E7C) 4px,
    transparent 4px,
    transparent 8px
  ) !important;
}

/* ── Section label (category heading) ──────────────────────────────── */
.khm-tl__section {
  margin: 0 !important;
}
.khm-tl__section-label {
  padding: 10px 20px 4px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  color: var(--khm-tl-bar-later, #FA0E7C) !important;
  border-left: 4px solid var(--khm-tl-bar-later, #FA0E7C) !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

/* ── Venue row ─────────────────────────────────────────────────────── */
.khm-tl__row {
  display: flex !important;
  align-items: center !important;
  min-height: 36px !important;
  padding: 0 20px !important;
  border-bottom: 1px solid rgba(0,175,185,0.06) !important;
  transition: background 0.15s ease !important;
}
.khm-tl__row:hover {
  background: rgba(0,129,167,0.03) !important;
}
.khm-tl__row:last-child {
  border-bottom: none !important;
}

/* ── Venue name ────────────────────────────────────────────────────── */
.khm-tl__name {
  width: 160px !important;
  min-width: 160px !important;
  padding-right: 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #58514A !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.khm-tl__name--open {
  font-weight: 700 !important;
  color: #333 !important;
}
.khm-tl__name--closed {
  color: #AEA299 !important;
}

/* ── Track (bar container) ─────────────────────────────────────────── */
.khm-tl__track {
  flex: 1 !important;
  position: relative !important;
  height: 24px !important;
  background: rgba(0,175,185,0.03) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

/* ── Bars ──────────────────────────────────────────────────────────── */
.khm-tl__bar {
  position: absolute !important;
  top: 2px !important;
  bottom: 2px !important;
  border-radius: 3px !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  transition: opacity 0.3s ease !important;
}
.khm-tl__bar--open {
  background: var(--khm-tl-bar-open, #00AFB9) !important;
}
.khm-tl__bar--later {
  background: color-mix(in srgb, var(--khm-tl-bar-later, #FA0E7C) 18%, transparent) !important;
  border: 1.5px dashed var(--khm-tl-bar-later, #FA0E7C) !important;
}
.khm-tl__bar--past {
  background: rgba(0,175,185,0.2) !important;
}
.khm-tl__bar--closed {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  background: transparent !important;
  border: 1.5px dashed var(--khm-tl-bar-closed, #C4BBB3) !important;
}

/* Bar text label */
.khm-tl__bar-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  padding: 0 6px !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.khm-tl__bar--open .khm-tl__bar-label {
  color: #fff !important;
}
.khm-tl__bar--later .khm-tl__bar-label {
  color: var(--khm-tl-bar-later, #FA0E7C) !important;
}
.khm-tl__bar--past .khm-tl__bar-label {
  color: #0081A7 !important;
}
.khm-tl__bar--closed .khm-tl__bar-label {
  color: #AEA299 !important;
  font-weight: 500 !important;
  font-style: italic !important;
}

/* ── Legend ─────────────────────────────────────────────────────────── */
.khm-tl__legend {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 10px 20px !important;
  border-top: 1px solid rgba(0,175,185,0.1) !important;
  font-size: 11px !important;
  color: #7A7068 !important;
}
.khm-tl__legend-item {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}
.khm-tl__legend-swatch {
  display: inline-block !important;
  width: 14px !important;
  height: 8px !important;
  border-radius: 2px !important;
}
.khm-tl__legend-swatch--open  { background: var(--khm-tl-bar-open, #00AFB9) !important; }
.khm-tl__legend-swatch--later { background: color-mix(in srgb, var(--khm-tl-bar-later, #FA0E7C) 18%, transparent) !important; border: 1px dashed var(--khm-tl-bar-later, #FA0E7C) !important; }
.khm-tl__legend-swatch--closed { background: transparent !important; border: 1px dashed var(--khm-tl-bar-closed, #C4BBB3) !important; }
.khm-tl__legend-swatch--now   { background: var(--khm-tl-now, #FA0E7C) !important; }

/* ── Timeline responsive (mobile) ──────────────────────────────────── */
@media (max-width: 768px) {
  .khm-tl__header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 12px 14px !important;
  }
  .khm-tl__axis {
    margin-left: 100px !important;
    margin-right: 14px !important;
  }
  .khm-tl__axis-tick {
    font-size: 9px !important;
  }
  .khm-tl__row {
    padding: 0 14px !important;
  }
  .khm-tl__name {
    width: 80px !important;
    min-width: 80px !important;
    font-size: 11px !important;
    padding-right: 6px !important;
  }
  .khm-tl__legend {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    font-size: 10px !important;
  }
  .khm-tl__section-label {
    padding: 8px 14px 3px !important;
    font-size: 10px !important;
  }
  .khm-tl__now-dot {
    font-size: 8px !important;
    padding: 1px 4px !important;
  }
}
@media (max-width: 480px) {
  .khm-tl__header-left { font-size: 11px !important; }
  .khm-tl__axis { margin-left: 70px !important; }
  .khm-tl__name { width: 52px !important; min-width: 52px !important; font-size: 10px !important; }
  .khm-tl__bar-label { font-size: 8px !important; }
  .khm-tl__track { height: 20px !important; }
  .khm-tl__row { min-height: 28px !important; }
}

/* =====================================================================
   Calendar  [khm_calendar]
   ===================================================================== */

/* ── Calendar Root ────────────────────────────────────────────────── */
.khm-cal {
  font-family: inherit;
  max-width: 960px;
  margin: 0 auto 24px;
  color: #333;
}

/* ── Navigation Header ───────────────────────────────────────────── */
.khm-cal__nav {
  background: linear-gradient(135deg,
    var(--khm-tl-header-from, #0081A7),
    var(--khm-tl-header-to,   #00AFB9));
  border-radius: 12px 12px 0 0;
  padding: 14px 18px;
}
.khm-cal__nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.khm-cal__nav-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
  line-height: 1;
}
.khm-cal__nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.32);
}
.khm-cal__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.khm-cal__nav-btn--today {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}
.khm-cal__nav-btn--prev,
.khm-cal__nav-btn--next {
  font-size: 22px;
  font-weight: 700;
}
.khm-cal__nav-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0 4px;
  min-width: 160px;
  text-align: center;
}
.khm-cal__view-toggle {
  margin-left: auto;
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.35);
}
.khm-cal__view-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.khm-cal__view-btn--active {
  background: rgba(255,255,255,0.28);
  color: #fff;
}
.khm-cal__view-btn:hover:not(.khm-cal__view-btn--active) {
  background: rgba(255,255,255,0.12);
}

/* ── Venue Filters ───────────────────────────────────────────────── */
.khm-cal__filters {
  background: #f8f7f6;
  border-left: 1px solid #e8e4e0;
  border-right: 1px solid #e8e4e0;
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.khm-cal__filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #58514A;
  cursor: pointer;
  user-select: none;
}
.khm-cal__filter-input {
  display: none;
}
.khm-cal__filter-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}
.khm-cal__filter-input:checked + .khm-cal__filter-swatch {
  border-color: #333;
}
.khm-cal__filter-input:not(:checked) + .khm-cal__filter-swatch {
  opacity: 0.4;
}
.khm-cal__filter-name {
  white-space: nowrap;
}
/* Venue swatch colours (8 slots) */
.khm-cal__filter-swatch--v0 { background: var(--khm-cal-venue-0, #0081A7); }
.khm-cal__filter-swatch--v1 { background: var(--khm-cal-venue-1, #00AFB9); }
.khm-cal__filter-swatch--v2 { background: var(--khm-cal-venue-2, #FA0E7C); }
.khm-cal__filter-swatch--v3 { background: var(--khm-cal-venue-3, #AEA299); }
.khm-cal__filter-swatch--v4 { background: var(--khm-cal-venue-4, #339CB8); }
.khm-cal__filter-swatch--v5 { background: var(--khm-cal-venue-5, #58514A); }
.khm-cal__filter-swatch--v6 { background: var(--khm-cal-venue-6, #7A7068); }
.khm-cal__filter-swatch--v7 { background: var(--khm-cal-venue-7, #C4BBB3); }

/* ── Month Grid ──────────────────────────────────────────────────── */
.khm-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid #e8e4e0;
  border-bottom: 1px solid #e8e4e0;
  background: #fff;
}
.khm-cal__grid--hidden {
  display: none;
}
.khm-cal__dow {
  background: #f3f1ef;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #7A7068;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 4px;
  border-right: 1px solid #e8e4e0;
  border-top: 1px solid #e8e4e0;
}
/* .khm-cal__cells removed — day cells render directly into .khm-cal__grid */

/* Day Cell */
.khm-cal__day {
  min-height: 90px;
  border-right: 1px solid #e8e4e0;
  border-top: 1px solid #e8e4e0;
  padding: 4px 5px;
  position: relative;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.khm-cal__day--empty {
  background: #faf9f8;
}
.khm-cal__day--past {
  opacity: 0.4;
}
.khm-cal__day--today {
  background: #f0fbfc;
}
.khm-cal__day-num {
  font-size: 13px;
  font-weight: 600;
  color: #58514A;
  margin-bottom: 3px;
  line-height: 1;
}
.khm-cal__day--today .khm-cal__day-num {
  background: var(--khm-cal-venue-0, #0081A7);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Venue Block inside day cell — two-line layout (name + time) */
.khm-cal__block {
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 4px;
  margin-bottom: 2px;
  border-radius: 3px;
  border-left: 3px solid transparent;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
}
/* Colour variants */
.khm-cal__block--v0 { background: color-mix(in srgb, var(--khm-cal-venue-0, #0081A7) 15%, transparent); border-left-color: var(--khm-cal-venue-0, #0081A7); color: #333; }
.khm-cal__block--v1 { background: color-mix(in srgb, var(--khm-cal-venue-1, #00AFB9) 15%, transparent); border-left-color: var(--khm-cal-venue-1, #00AFB9); color: #333; }
.khm-cal__block--v2 { background: color-mix(in srgb, var(--khm-cal-venue-2, #FA0E7C) 15%, transparent); border-left-color: var(--khm-cal-venue-2, #FA0E7C); color: #333; }
.khm-cal__block--v3 { background: color-mix(in srgb, var(--khm-cal-venue-3, #AEA299) 15%, transparent); border-left-color: var(--khm-cal-venue-3, #AEA299); color: #333; }
.khm-cal__block--v4 { background: color-mix(in srgb, var(--khm-cal-venue-4, #339CB8) 15%, transparent); border-left-color: var(--khm-cal-venue-4, #339CB8); color: #333; }
.khm-cal__block--v5 { background: color-mix(in srgb, var(--khm-cal-venue-5, #58514A) 15%, transparent); border-left-color: var(--khm-cal-venue-5, #58514A); color: #333; }
.khm-cal__block--v6 { background: color-mix(in srgb, var(--khm-cal-venue-6, #7A7068) 15%, transparent); border-left-color: var(--khm-cal-venue-6, #7A7068); color: #333; }
.khm-cal__block--v7 { background: color-mix(in srgb, var(--khm-cal-venue-7, #C4BBB3) 15%, transparent); border-left-color: var(--khm-cal-venue-7, #C4BBB3); color: #333; }

/* Override block */
.khm-cal__block--override {
  border-left-style: dashed;
  position: relative;
}
.khm-cal__block--override::after {
  content: '!';
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 9px;
  font-weight: 800;
  color: var(--khm-cal-override-border, #FA0E7C);
  line-height: 1;
}
/* Closed block */
.khm-cal__block--closed {
  background: #f5f4f3 !important;
  border-left-color: #ccc !important;
  color: #999;
  text-decoration: line-through;
}

.khm-cal__block-name {
  display: block;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.khm-cal__block-time {
  display: block;
  font-weight: 400;
  color: #666;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── Week Grid ───────────────────────────────────────────────────── */
.khm-cal__week {
  background: #fff;
  border-left: 1px solid #e8e4e0;
  border-bottom: 1px solid #e8e4e0;
}
.khm-cal__week--hidden {
  display: none;
}
/* Week header row (days) */
.khm-cal__week-header {
  display: grid;
  grid-template-columns: 140px repeat(7, minmax(0, 1fr));
}
.khm-cal__week-header-label {
  background: #f3f1ef;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #7A7068;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 4px;
  border-right: 1px solid #e8e4e0;
  border-top: 1px solid #e8e4e0;
}
.khm-cal__week-header-label--name {
  text-align: left;
  padding-left: 12px;
}
.khm-cal__week-header-label--today {
  background: #e8f8fa;
}
/* Week venue row */
.khm-cal__week-row {
  display: grid;
  grid-template-columns: 140px repeat(7, minmax(0, 1fr));
}
.khm-cal__week-venue-name {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #58514A;
  border-right: 1px solid #e8e4e0;
  border-top: 1px solid #e8e4e0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #faf9f8;
}
.khm-cal__week-venue-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.khm-cal__week-cell {
  padding: 6px 8px;
  font-size: 12px;
  color: #333;
  border-right: 1px solid #e8e4e0;
  border-top: 1px solid #e8e4e0;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.khm-cal__week-cell--today {
  background: #f0fbfc;
}
.khm-cal__week-cell--past {
  opacity: 0.4;
}
.khm-cal__week-cell--closed {
  color: #999;
  text-decoration: line-through;
}
.khm-cal__week-cell--override {
  border-left: 2px dashed var(--khm-cal-override-border, #FA0E7C);
}
.khm-cal__week-time {
  font-weight: 600;
}
.khm-cal__week-label {
  font-size: 10px;
  color: #999;
}

/* ── Legend ───────────────────────────────────────────────────────── */
.khm-cal__legend {
  padding: 10px 18px;
  background: #faf9f8;
  border: 1px solid #e8e4e0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.khm-cal__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #7A7068;
}
.khm-cal__legend-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}
.khm-cal__legend-icon--override {
  border: 2px dashed var(--khm-cal-override-border, #FA0E7C);
  background: color-mix(in srgb, var(--khm-cal-override-border, #FA0E7C) 10%, transparent);
}
.khm-cal__legend-icon--closed {
  background: #f0efee;
  border: 2px solid #ccc;
}

/* ── Calendar Loading State ──────────────────────────────────────── */
.khm-cal__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #AEA299;
  font-size: 14px;
}
.khm-cal__loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e8e4e0;
  border-top-color: var(--khm-cal-venue-0, #0081A7);
  border-radius: 50%;
  animation: khm-cal-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes khm-cal-spin {
  to { transform: rotate(360deg); }
}

/* ── Calendar Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .khm-cal__nav-title { font-size: 15px; min-width: 120px; }
  .khm-cal__nav-btn { width: 30px; height: 30px; font-size: 14px; }
  .khm-cal__nav-btn--prev, .khm-cal__nav-btn--next { font-size: 18px; }
  .khm-cal__nav-btn--today { font-size: 12px; padding: 0 8px; }
  .khm-cal__view-btn { font-size: 11px; padding: 5px 10px; }
  .khm-cal__day { min-height: 65px; padding: 3px 3px; }
  .khm-cal__day-num { font-size: 11px; }
  .khm-cal__block { font-size: 9px; padding: 1px 3px; }
  .khm-cal__block-name { display: none; }

  /* Week view stacks on mobile */
  .khm-cal__week-header { grid-template-columns: 100px repeat(7, 1fr); }
  .khm-cal__week-row { grid-template-columns: 100px repeat(7, 1fr); }
  .khm-cal__week-venue-name { padding: 6px 8px; font-size: 11px; }
  .khm-cal__week-cell { padding: 4px 4px; font-size: 10px; }
}

@media (max-width: 480px) {
  .khm-cal__nav-row { gap: 4px; }
  .khm-cal__nav-title { font-size: 13px; min-width: 100px; }
  .khm-cal__day { min-height: 50px; padding: 2px; }
  .khm-cal__day-num { font-size: 10px; }
  .khm-cal__day--today .khm-cal__day-num { width: 20px; height: 20px; font-size: 10px; }
  .khm-cal__block { font-size: 8px; padding: 1px 2px; border-left-width: 2px; }
  .khm-cal__block-name { display: none; }
  .khm-cal__block-time { font-size: 7px; }
  .khm-cal__filters { padding: 8px 10px; gap: 4px 10px; }
  .khm-cal__filter-name { font-size: 11px; }

  /* Week: stack to full-width venue blocks */
  .khm-cal__week-header { grid-template-columns: 1fr; }
  .khm-cal__week-header-label:not(.khm-cal__week-header-label--name) { display: none; }
  .khm-cal__week-row {
    grid-template-columns: 1fr;
  }
  .khm-cal__week-venue-name {
    border-bottom: 1px solid #e8e4e0;
  }
  .khm-cal__week-cell {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 4px;
    padding: 4px 12px;
  }
  .khm-cal__week-cell::before {
    content: attr(data-day-label);
    font-size: 10px;
    font-weight: 700;
    color: #7A7068;
    text-transform: uppercase;
  }
}

/* ── Elementor Widget Wrapper ──────────────────────────────────────── */
.khm-el-wrap {
  width: 100%;
}

/* ── Animations ────────────────────────────────────────────────────── */
@keyframes khm-pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.02); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
.khm-card--transitioning { animation: khm-pulse 0.6s ease; }

@keyframes khm-tick {
  0%   { opacity: 1; }
  50%  { opacity: 0.6; }
  100% { opacity: 1; }
}
.khm-countdown--tick { animation: khm-tick 0.3s ease; }

@media (prefers-reduced-motion: reduce) {
  .khm-card--transitioning,
  .khm-countdown--tick { animation: none; }
  .khm-card { transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .khm-grid--2, .khm-grid--3, .khm-grid--4 { grid-template-columns: 1fr; }
  .khm-filters { flex-wrap: wrap; overflow-x: auto; padding-bottom: 4px; }
  .khm-list-item { flex-direction: column; align-items: flex-start; }
  .khm-list-item__right { justify-content: flex-start; }
  .khm-week-table { font-size: 11px; }
  .khm-week-table th,
  .khm-week-table td { padding: 6px 6px; }
  .khm-week-dots__day { width: 20px; height: 20px; font-size: 8px; }
  /* Next table responsive */
  .khm-next-table tbody td { padding: 6px 8px !important; font-size: 12px !important; }

  /* Compact schedule responsive — mobile: 2-row stacked layout (CSS Grid) */
  .khm-cs__row-header { display: none !important; }
  .khm-cs__row {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    padding: 8px 12px !important;
    min-height: auto !important;
  }
  .khm-cs__cell {
    line-height: 1.4 !important;
    padding: 0 !important;
  }
  .khm-cs__cell--venue {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  .khm-cs__cell--status {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding-left: 8px !important;
  }
  .khm-cs__cell--hours {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    padding-left: 16px !important;
    padding-top: 2px !important;
    font-size: 12px !important;
    color: #AEA299 !important;
  }
  .khm-cs__header { flex-direction: column !important; align-items: flex-start !important; padding: 12px !important; }
  .khm-cs__name { white-space: normal !important; font-size: 12px !important; }
  .khm-cs__badge { font-size: 9px !important; padding: 3px 8px !important; }
  .khm-cs { border-radius: 10px !important; }
}
@media (max-width: 480px) {
  .khm-card { padding: 14px; }
  .khm-hours__title { font-size: 16px; }
  .khm-allclosed-banner { padding: 14px 16px; gap: 10px; }
  .khm-allclosed-banner__text strong { font-size: 14px; }
  .khm-cs__section-label { padding: 12px 12px 6px !important; }
}

/* ── Page builder compatibility (Elementor, Divi, Beaver, Gutenberg) ─ */
.elementor-shortcode,
.elementor-widget-container,
.elementor-element,
.elementor-widget-wrap,
.e-con-inner,
.ast-container,
.entry-content,
.site-content {
  min-width: 0;
}
