/* ============================================================================
 * events.css — раздел «Мероприятия» в дизайн-системе Preline (preline.co).
 *
 * Подключается глобально (модалка создания события открывается с любой
 * страницы), но все селекторы scoped-префиксом `.ev-`, поэтому не влияют
 * на остальные разделы Sngine. Учитывает тёмную тему (body.night-mode)
 * и мобильные экраны (mobile-first).
 *
 * Используются только классы Preline-разметки, реализованные ниже:
 * rounded-2xl карточки, soft-кнопки, pill-чипы, hs-dropdown, hs-tab и т.п.
 * ========================================================================== */

/* ---------- Tokens ---------- */
.ev-root {
  --ev-primary: #1271c9;            /* фирменный indigo Sngine ≈ preline indigo-500 */
  --ev-primary-hover: #4d61cf;
  --ev-primary-soft: #eef0fe;
  --ev-primary-soft-strong: #dfe4fb;
  --ev-success: #16a34a;
  --ev-success-soft: #ecfdf3;
  --ev-danger: #dc2626;
  --ev-danger-soft: #fef2f2;
  --ev-warning: #d97706;
  --ev-warning-soft: #fffbeb;

  --ev-bg: #f3f5f9;                 /* фон страницы (светлее body) */
  --ev-card: #ffffff;
  --ev-card-hover: #fafbff;
  --ev-border: #e5e9f2;
  --ev-border-strong: #d4dae8;
  --ev-text: #0f172a;
  --ev-text-soft: #334155;
  --ev-muted: #64748b;
  --ev-muted-soft: #94a3b8;

  --ev-radius-sm: 10px;
  --ev-radius: 14px;
  --ev-radius-lg: 20px;
  --ev-radius-pill: 999px;

  --ev-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --ev-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.05);
  --ev-shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.1);

  --ev-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
}

body.night-mode .ev-root {
  --ev-bg: #18212a;
  --ev-card: #1f2833;
  --ev-card-hover: #232e3b;
  --ev-border: #2e3a49;
  --ev-border-strong: #3b4a5d;
  --ev-text: #e6edf4;
  --ev-text-soft: #c1d4e3;
  --ev-muted: #8ea3b8;
  --ev-muted-soft: #6d8299;

  --ev-primary-soft: rgba(94, 114, 228, 0.16);
  --ev-primary-soft-strong: rgba(94, 114, 228, 0.28);
  --ev-success-soft: rgba(22, 163, 74, 0.16);
  --ev-danger-soft: rgba(220, 38, 38, 0.16);
  --ev-warning-soft: rgba(217, 119, 6, 0.16);

  --ev-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.25);
  --ev-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.4), 0 2px 6px -2px rgba(0, 0, 0, 0.3);
}

.ev-root *,
.ev-root *::before,
.ev-root *::after {
  box-sizing: border-box;
}

/* ---------- Hero ---------- */
.ev-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.55)),
    url("../images/background_hero.jpg") center / cover no-repeat;
  padding: 28px 16px 34px;
}

.ev-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
}

.ev-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--ev-radius-pill);
  margin-bottom: 14px;
}

.ev-hero h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.ev-hero__desc {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 20px;
  opacity: 0.92;
  max-width: 560px;
}

/* search */
.ev-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--ev-radius);
  padding: 6px 6px 6px 14px;
  box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.45);
  max-width: 640px;
}

.ev-search .ev-search__icon {
  color: #94a3b8;
  font-size: 15px;
  flex-shrink: 0;
}

.ev-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 10px 0;
  font-size: 14.5px;
  color: #0f172a;
}

.ev-search input::placeholder {
  color: #94a3b8;
}

.ev-search button {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.ev-search button:hover {
  filter: brightness(1.08);
}

.ev-search button:active {
  transform: scale(0.97);
}

.ev-hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ---------- Page body ---------- */
.ev-body {
  margin-top: -18px;
  position: relative;
  z-index: 2;
  max-width: 1120px;
}

.ev-panel {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  box-shadow: var(--ev-shadow-sm);
}

/* ---------- Chips (категории, типы) ---------- */
.ev-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px;
}

.ev-scroll::-webkit-scrollbar {
  display: none;
}

.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--ev-text-soft);
  background: var(--ev-card);
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-pill);
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ev-chip:hover {
  color: var(--ev-primary);
  border-color: var(--ev-primary);
  background: var(--ev-card-hover);
}

.ev-chip.active {
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border-color: var(--ev-primary);
  box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.14);
}

.ev-chip .ev-chip__count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--ev-radius-pill);
  background: var(--ev-border);
  color: var(--ev-muted);
}

.ev-chip.active .ev-chip__count {
  background: var(--ev-primary);
  color: #fff;
}

/* тёмные чипы поверх hero */
.ev-chip--glass {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ev-chip--glass:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.ev-chip--glass.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* ---------- Табы «Мои/Discover/…» ---------- */
.ev-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--ev-border);
}

.ev-tabs::-webkit-scrollbar {
  display: none;
}

.ev-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: var(--ev-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ev-muted);
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.ev-tabs__link:hover {
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

.ev-tabs__link.active {
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border-color: var(--ev-primary-soft-strong);
}

.ev-tabs__link .ev-tabs__count {
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  padding: 2px 6px;
  border-radius: var(--ev-radius-pill);
  background: var(--ev-border);
  color: var(--ev-muted);
}

.ev-tabs__link.active .ev-tabs__count {
  background: var(--ev-primary);
  color: #fff;
}

/* ---------- Фильтры ---------- */
.ev-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
}

.ev-filters__group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ev-filters__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ev-text);
  margin: 0;
}

.ev-filters__title small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ev-muted);
}

/* preline dropdown */
.ev-drop {
  position: relative;
  display: inline-block;
}

.ev-drop__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ev-text-soft);
  background: var(--ev-card);
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ev-drop__btn:hover,
.ev-drop.active .ev-drop__btn {
  color: var(--ev-primary);
  border-color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

.ev-drop__btn .fa,
.ev-drop__btn .svg-inline--fa {
  color: var(--ev-muted);
  font-size: 13px;
}

.ev-drop__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  box-shadow: var(--ev-shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.ev-drop.active .ev-drop__menu,
.ev-drop-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* preline: меню скрыто до инициализации (управляется preline.js) */
.ev-drop .hs-dropdown-menu.hidden {
  display: none !important;
}

.ev-drop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ev-text-soft);
  border-radius: 9px;
  text-decoration: none !important;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ev-drop__item:hover {
  background: var(--ev-primary-soft);
  color: var(--ev-primary);
}

.ev-drop__item.active {
  color: var(--ev-primary);
  font-weight: 600;
  background: var(--ev-primary-soft);
}

.ev-drop__divider {
  height: 1px;
  margin: 5px 8px;
  background: var(--ev-border);
}

.ev-drop__label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ev-muted-soft);
}

/* ---------- Badges ---------- */
.ev-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: var(--ev-radius-pill);
  white-space: nowrap;
}

.ev-badge--primary { color: var(--ev-primary); background: var(--ev-primary-soft); }
.ev-badge--success { color: var(--ev-success); background: var(--ev-success-soft); }
.ev-badge--danger { color: var(--ev-danger); background: var(--ev-danger-soft); }
.ev-badge--warning { color: var(--ev-warning); background: var(--ev-warning-soft); }
.ev-badge--muted { color: var(--ev-muted); background: var(--ev-border); }
.ev-badge--glass {
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Soft buttons ---------- */
.ev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.ev-btn:active {
  transform: scale(0.97);
}

.ev-btn--primary {
  color: #fff;
  font-weight: 400;
  background: #0062cc;
  box-shadow: 0 8px 18px -8px rgba(0, 98, 204, 0.65);
}

.ev-btn--primary:hover {
  filter: brightness(1.07);
  color: #fff;
}

.ev-btn--soft-primary {
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border-color: var(--ev-primary-soft-strong);
}

.ev-btn--soft-primary:hover {
  background: var(--ev-primary-soft-strong);
  color: var(--ev-primary);
}

.ev-btn--soft-success {
  color: var(--ev-success);
  background: var(--ev-success-soft);
  border-color: rgba(22, 163, 74, 0.25);
}

.ev-btn--soft-success:hover {
  color: var(--ev-success);
  filter: brightness(0.96);
}

.ev-btn--soft-danger {
  color: var(--ev-danger);
  background: var(--ev-danger-soft);
  border-color: rgba(220, 38, 38, 0.25);
}

.ev-btn--ghost {
  color: var(--ev-text-soft);
  background: var(--ev-card);
  border-color: var(--ev-border-strong);
}

.ev-btn--ghost:hover {
  color: var(--ev-primary);
  border-color: var(--ev-primary);
}

.ev-btn--sm {
  padding: 7px 13px;
  font-size: 12.5px;
  border-radius: 9px;
}

.ev-btn--lg {
  padding: 13px 22px;
  font-size: 14.5px;
  border-radius: 13px;
}

.ev-btn--block {
  width: 100%;
}

.ev-btn--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
}

/* ---------- Grid карточек ---------- */
.ev-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 576px) {
  .ev-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 992px) {
  .ev-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .ev-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Карточка события ---------- */
.ev-card {
  display: flex;
  flex-direction: column;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  animation: ev-card-in 0.3s ease both;
}

.ev-card:hover {
  box-shadow: var(--ev-shadow);
  border-color: var(--ev-border-strong);
  transform: translateY(-2px);
}

@keyframes ev-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ev-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd);
}

.ev-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ev-card:hover .ev-card__media img {
  transform: scale(1.05);
}

.ev-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 34px;
}

.ev-card__date {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 10px 6px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--ev-radius);
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.35);
  color: #0f172a;
  line-height: 1.1;
}

.ev-card__date b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ev-card__date span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ev-primary);
  margin-top: 2px;
}

/* ---------- Дата в карточке события ленты ---------- */
/*
 * Компактный date badge в духе Preline: glass-карточка, мягкая тень,
 * крупный день и акцентный месяц. Этот вариант не зависит от .ev-root,
 * потому что карточки событий также используются внутри новостной ленты.
 */
.ele_events_list_mid .ev-date-badge {
  --ev-date-primary: #6366f1;
  --ev-date-text: #0f172a;
  --ev-date-surface: rgba(255, 255, 255, 0.96);
  --ev-date-border: rgba(255, 255, 255, 0.72);

  position: relative;
  inset: auto;
  z-index: 1;
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-width: 64px;
  height: 64px;
  margin: 10px;
  padding: 8px 9px 7px;
  overflow: hidden;
  color: var(--ev-date-text);
  background: var(--ev-date-surface);
  border: 1px solid var(--ev-date-border);
  border-radius: 14px;
  box-shadow: 0 8px 18px -8px rgba(15, 23, 42, 0.5), 0 2px 5px -3px rgba(15, 23, 42, 0.25);
  line-height: 1;
  text-align: center;
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ele_events_list_mid .ev-date-badge::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.ele_events_list_mid .ev-date-badge__month {
  position: relative;
  z-index: 1;
  margin: 0 0 5px;
  color: var(--ev-date-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ele_events_list_mid .ev-date-badge__day {
  position: relative;
  z-index: 1;
  color: var(--ev-date-text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.ele_events_list_mid .ev-date-badge:hover {
  box-shadow: 0 12px 22px -9px rgba(15, 23, 42, 0.58), 0 3px 7px -3px rgba(15, 23, 42, 0.3);
  transform: translateY(-2px) translateZ(0);
}

body.night-mode .ele_events_list_mid .ev-date-badge {
  --ev-date-primary: #a5b4fc;
  --ev-date-text: #f8fafc;
  --ev-date-surface: rgba(30, 41, 59, 0.96);
  --ev-date-border: rgba(148, 163, 184, 0.28);

  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7), 0 2px 5px -3px rgba(0, 0, 0, 0.5);
}

@media (max-width: 480px) {
  .ele_events_list_mid .ev-date-badge {
    width: 58px;
    min-width: 58px;
    height: 58px;
    margin: 8px;
  }

  .ele_events_list_mid .ev-date-badge__day {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ele_events_list_mid .ev-date-badge {
    transition: none;
  }
}

/* ---------- Заголовок карточки события ленты ---------- */
.ele_events_list_info h2 {
  font-size: 16px;
  margin: 0 0 1px;
}

.ev-card__badges {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ev-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 13px 14px 14px;
}

.ev-card__title {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ev-card__title a {
  color: var(--ev-text);
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.ev-card__title a:hover {
  color: var(--ev-primary);
}

.ev-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ev-muted);
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev-card__meta .svg-inline--fa,
.ev-card__meta .fa {
  font-size: 12px;
  color: var(--ev-muted-soft);
  flex-shrink: 0;
}

.ev-card__meta--online {
  color: var(--ev-success);
  font-weight: 500;
}

.ev-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ev-muted);
  margin: 6px 0 0;
}

/* ---------- Кнопка «Открыть публикацию» (find.daddy.by → Telegram WebView) ----------
 * CTA на публичную страницу привязанной публикации (Зона интереса / Путеводитель /
 * Геомаршрут / Геоквест). Стиль — preline.co: фирменный градиент, мягкая тень,
 * скругление, лёгкий hover-lift. Клик обрабатывает JS (.js_find-open):
 *   • внутри Telegram WebView — открывает публичную страницу в том же webview
 *     (пробрасывает lang/initData/returnUrl, как в find.daddy.by);
 *   • вне Telegram — открывает deep-link на бота t.me/yoofind_bot?start=…
 *     (бот присылает inline WebApp-кнопку, открывающую страницу в webview).
 * Без JS работает как обычная ссылка на публичную страницу. */
.ev-card__find {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #ffffff;
  background: #0062cc;
  border-radius: var(--ev-radius-sm, 10px);
  box-shadow: 0 6px 14px -8px rgba(0, 98, 204, 0.55);
  text-decoration: none !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ev-card__find:hover {
  color: #ffffff;
  filter: brightness(1.06);
  box-shadow: 0 10px 20px -10px rgba(0, 98, 204, 0.65);
  transform: translateY(-1px);
}

.ev-card__find:active {
  transform: scale(0.98);
}

.ev-card__find > .fa-bookmark {
  font-size: 13px;
  flex-shrink: 0;
}

.ev-card__find-label {
  flex: 1 1 auto;
  text-align: center;
}

.ev-card__find-icon {
  font-size: 12px;
  opacity: 0.85;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ev-card__find {
    transition: none;
  }
}

/* Вариант кнопки для ряда действий в шапке профиля мероприятия
   (.ev-profile__actions): убирает вертикальный отступ карточки и
   подгоняет размеры под соседние action-кнопки (btn-md). */
.ev-card__find--profile {
  margin-top: 0;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 13.5px;
}

@media (max-width: 575.98px) {
  .ev-card__find--profile {
    flex: 1 1 100%;
  }
}

.ev-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.ev-card__stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ev-muted);
}

.ev-card__stats b {
  font-weight: 600;
  color: var(--ev-text-soft);
}

.ev-card__stats .fa,
.ev-card__stats .svg-inline--fa {
  margin-right: 4px;
  font-size: 11.5px;
  color: var(--ev-muted-soft);
}

/* состояние кнопки интереса в карточке: переопределение bootstrap-классов
   JS (user.js) переключает btn-primary ↔ btn-light — стилизуем оба состояния */
.ev-card .btn-primary,
.ev-card .btn-success {
  color: #fff !important;
  background: var(--ev-primary) !important;
  border-color: var(--ev-primary) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}

.ev-card .btn-light {
  color: var(--ev-primary) !important;
  background: var(--ev-primary-soft) !important;
  border-color: var(--ev-primary-soft-strong) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.ev-card .btn-primary:hover,
.ev-card .btn-success:hover {
  filter: brightness(0.94);
}

/* ---------- Promoted ---------- */
.ev-promoted {
  margin-bottom: 16px;
}

.ev-promoted__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ev-muted);
}

.ev-promoted__head .fa-bolt {
  color: var(--ev-warning);
}

.ev-promoted .ev-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .ev-promoted .ev-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .ev-promoted .ev-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Раздел-заголовок ---------- */
.ev-section {
  padding: 16px 14px 14px;
}

.ev-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ev-section__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ev-text);
}

.ev-section__title .ev-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  font-size: 14px;
}

/* ---------- See more ---------- */
.ev-loadmore {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 4px;
  padding: 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border: 1px solid var(--ev-primary-soft-strong);
  border-radius: var(--ev-radius);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.ev-loadmore:hover {
  background: var(--ev-primary-soft-strong);
}

.ev-loadmore.loading {
  cursor: progress;
}

.ev-loadmore .loader {
  width: 18px;
  height: 18px;
}

/* ---------- Empty state ---------- */
.ev-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 20px;
}

.ev-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  font-size: 26px;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border-radius: 18px;
}

.ev-empty h4 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ev-text);
}

.ev-empty p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ev-muted);
  max-width: 320px;
}

/* Несколько кнопок в empty-state (например, «Создать мероприятие»
   + «Мои мероприятия») — вертикальная стопка с отступом */
.ev-empty .ev-btn + .ev-btn {
  margin-top: 10px;
}

/* ---------- Страница мероприятия: профиль ---------- */
.ev-profile__cover {
  position: relative;
  border-radius: var(--ev-radius-lg);
  overflow: hidden;
  background: var(--ev-gradient);
  min-height: 150px;
}

.ev-profile__cover img {
  width: 100%;
  min-height: 150px;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.ev-profile__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}

.ev-profile__cover-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.ev-profile__cover-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 3;
}

/* stats */
.ev-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ev-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 13px 8px;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ev-stats__item:hover {
  border-color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

.ev-stats__item b {
  font-size: 17px;
  font-weight: 700;
  color: var(--ev-text);
}

.ev-stats__item span {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ev-muted);
}

/* ---------- Инфо-строки ---------- */
.ev-info {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.ev-info__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--ev-border);
}

.ev-info__item:last-child {
  border-bottom: 0;
}

.ev-info__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

.ev-info__body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ev-text-soft);
  line-height: 1.5;
  word-break: break-word;
}

.ev-info__body small {
  display: block;
  font-size: 12px;
  color: var(--ev-muted);
  margin-bottom: 1px;
}

.ev-info__body a {
  color: var(--ev-primary);
  text-decoration: none !important;
}

.ev-info__body a:hover {
  text-decoration: underline !important;
}

.ev-info__body .ev-info__value {
  font-weight: 500;
  color: var(--ev-text);
}

/* ============================================================================
 * Фильтр публикаций хронологии (.ele_post_filters → user-select dropdown)
 * ========================================================================== */

/* Внешний контейнер ленты фильтров — больше не нужен горизонтальный
   скролл-чипсов, нужен один селект на всю ширину (моб-first). */
.ele_post_filters_nav.ele_scroll {
  display: block;
  margin: 0;
  padding: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1;
}

.ele_post_filters-select {
  width: 100%;
}

.ele_post_filters-select + .us-wrapper {
  width: 100%;
  margin-bottom: 0;
}

.ele_post_filters-select + .us-wrapper .us-button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

.ele_post_filters-select + .us-wrapper .us-button-label {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Табы страницы мероприятия (user-select dropdown) ---------- */
.ev-profile-tabs-panel {
  margin: 14px 0 0;
  /* Симметричные вертикальные отступы внутри панели, чтобы
     кнопка-селект стояла ровно по центру, а не прижималась
     к верху из-за margin-bottom: 12px у .us-wrapper. */
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: stretch;
  box-sizing: border-box;
}

.ev-profile-tabs-select {
  width: 100%;
}

.ev-profile-tabs-select + .us-wrapper {
  width: 100%;
  align-self: center;
  /* Убираем нижний внешний отступ .us-wrapper — внутри панели
     он создаёт асимметрию и смещает кнопку вверх. */
  margin-bottom: 0;
}

.ev-profile-tabs-select + .us-wrapper .us-button {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Табы-селекты (мероприятия, поиск) (user-select dropdown) ---------- */
/* UserSelect вставляет .us-wrapper ПЕРЕД нативным <select> (insertBefore),
   поэтому стили задаём через контейнер .ev-tabs-select-wrap.
   Вписывается в панель .ev-panel (с горизонтальными паддингами
   и нижним бордером). Используется в events.tpl и search.tpl. */
.ev-tabs-select-wrap {
  max-width: 340px;
  margin: 0 auto;
  padding: 14px 14px 12px;
}

.ev-tabs-select-wrap .us-wrapper {
  width: 100%;
  margin-bottom: 0;
}

.ev-tabs-select-wrap .us-wrapper .us-button {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

/* На мобильных — на всю ширину, как у поиска */
@media (max-width: 575.98px) {
  .ev-tabs-select-wrap {
    max-width: 100%;
  }
}

/* ---------- Табы участников мероприятия (user-select dropdown) ---------- */
/* UserSelect вставляет .us-wrapper ПЕРЕД нативным <select> (insertBefore),
   поэтому стили задаём через контейнер .ev-members-tabs-wrap.
   Блок выводится на отдельной строке во всю ширину панели
   (view going/interested/invited/invites страницы мероприятия). */
.ev-members-tabs-wrap {
  width: 100%;
  /* Прижимаем к заголовку .ev-section__head (у него margin-bottom: 14px) */
  margin: -8px 0 14px;
}

.ev-members-tabs-wrap .us-wrapper {
  width: 100%;
  margin-bottom: 0;
}

.ev-members-tabs-wrap .us-wrapper .us-button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

.ev-members-tabs-wrap .us-wrapper .us-button-label {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Категории (селект в сайдбаре и в шапке каталога) ---------- */
/* Обёртка .ev-categories-select-wrap: UserSelect вставляет
   .us-wrapper ПЕРЕД нативным <select> (insertBefore), поэтому
   стили задаём через контейнер, а не через соседний селектор. */
.ev-categories-select-wrap .us-wrapper {
  width: 100%;
  margin-bottom: 0;
}

.ev-categories-select-wrap .us-wrapper .us-button {
  width: 100%;
  min-height: 40px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

/* Индивидуальные отступы: селект категорий в шапке каталога
   (отступ сверху) и селект категорий в offcanvas-сайдбаре
   (отступ снизу) */
.ev-categories-select-wrap--header .us-wrapper {
  margin-top: 20px;
}

.ev-categories-select-wrap--sidebar .us-wrapper {
  margin-bottom: 10px;
}

/* ---------- Формы (создание/редактирование) ---------- */
.ev-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ev-text-soft);
  margin-bottom: 6px;
}

.ev-form .form-control,
.ev-form .form-select {
  border-radius: 11px;
  border-color: var(--ev-border-strong);
  padding: 9px 13px;
  font-size: 14px;
  color: var(--ev-text);
  background-color: var(--ev-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ev-form .form-control:focus,
.ev-form .form-select:focus {
  border-color: var(--ev-primary);
  box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.14);
}

body.night-mode .ev-form .form-control,
body.night-mode .ev-form .form-select {
  background-color: #17202a;
  border-color: #334155;
  color: #e6edf4;
}

.ev-form .form-text {
  font-size: 12px;
  color: var(--ev-muted);
  margin-top: 5px;
}

.ev-form .form-group {
  margin-bottom: 16px;
}

.ev-form__section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ev-muted);
}

.ev-form__section::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--ev-border);
}

.ev-form__section .ev-form__section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

/* сегменты приватности (radio-карточки preline) — см. секцию «Модалка» ниже */

/* ---------- Листовая карточка (list) ---------- */
.ev-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ev-row:hover {
  border-color: var(--ev-primary);
  box-shadow: var(--ev-shadow-sm);
}

.ev-row__thumb {
  position: relative;
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ev-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ev-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-row__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ev-row__title {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.ev-row__title a {
  color: var(--ev-text);
  text-decoration: none !important;
}

.ev-row__title a:hover {
  color: var(--ev-primary);
}

.ev-row__meta {
  font-size: 12px;
  color: var(--ev-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ev-row__action {
  flex-shrink: 0;
}

.ev-row__action .btn {
  border-radius: 10px !important;
  box-shadow: none !important;
}

.ev-row__action .btn-primary {
  background: var(--ev-primary) !important;
  border-color: var(--ev-primary) !important;
}

.ev-row__action .btn-light {
  color: var(--ev-primary) !important;
  background: var(--ev-primary-soft) !important;
  border-color: var(--ev-primary-soft-strong) !important;
}

/* ---------- Карта ---------- */
.ev-map {
  border-radius: var(--ev-radius);
  overflow: hidden;
  border: 1px solid var(--ev-border);
  margin: 4px 0;
}

/* ---------- Медиа-панели (photos/videos/albums) ---------- */
.ev-media-panel {
  padding: 0;
}

.ev-media-panel__nav {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ev-media-panel__nav::-webkit-scrollbar {
  display: none;
}

.ev-media-panel__nav a {
  white-space: nowrap;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--ev-radius-pill);
  color: var(--ev-muted);
  text-decoration: none !important;
  border: 1px solid var(--ev-border-strong);
}

.ev-media-panel__nav a:hover {
  color: var(--ev-primary);
  border-color: var(--ev-primary);
}

.ev-media-panel__nav a.active {
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
  border-color: var(--ev-primary);
}

/* ---------- Прочее ---------- */
.ev-divider {
  height: 1px;
  background: var(--ev-border);
  margin: 4px 0;
}

.ev-muted {
  color: var(--ev-muted);
}

.ev-text {
  color: var(--ev-text);
}

.ev-center {
  text-align: center;
}

.ev-gap {
  gap: 10px;
}

.ev-mt14 { margin-top: 14px; }
.ev-mb16 { margin-bottom: 16px; }
.ev-mt16 { margin-top: 16px; }
.ev-mt20 { margin-top: 20px; }

/* ============================================================================
 * Страница мероприятия (event.tpl)
 * ========================================================================== */

/* обложка: переопределение Sngine .profile-cover-wrapper (JS-хуки сохранены) */
.ev-profile .profile-cover-wrapper.ev-cover {
  height: 190px;
  min-height: 190px;
  max-height: 300px;
  border-radius: var(--ev-radius-lg);
  background: var(--ev-gradient);
}

.ev-profile .profile-cover-wrapper img.js_position-cover-cropped {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-profile .profile-cover-buttons {
  top: 10px;
  right: 10px;
  left: auto;
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  line-height: 1;
}

.ev-profile .profile-cover-buttons > div {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  line-height: 1;
  vertical-align: middle;
}

.ev-profile .profile-cover-buttons > div > i,
.ev-profile .profile-cover-buttons > div > svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.ev-profile .profile-cover-buttons > div:hover {
  background: rgba(15, 23, 42, 0.75);
}

.ev-profile .profile-cover-buttons .dropdown-menu {
  border-radius: 12px;
  border: 1px solid var(--ev-border);
  box-shadow: var(--ev-shadow-lg);
}

.ev-profile .profile-cover-position-loader {
  border-radius: 10px;
}

/* дата поверх обложки */
.ev-profile .ev-profile__date {
  top: auto;
  bottom: 12px;
  left: 14px;
}

/* шапка */
.ev-profile__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin-top: -34px;
  padding: 0 14px;
  position: relative;
  z-index: 4;
}

.ev-profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 3px solid var(--ev-card);
  background: var(--ev-gradient);
  box-shadow: var(--ev-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.ev-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-profile__info {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 34px;
}

.ev-profile__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ev-text);
  line-height: 1.25;
  word-break: break-word;
}

.ev-profile__title a {
  color: inherit;
  text-decoration: none !important;
}

.ev-profile__host {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ev-muted);
  margin-top: 7px;
  flex-wrap: wrap;
}

.ev-profile__host img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.ev-profile__host a {
  color: var(--ev-text-soft);
  font-weight: 600;
  text-decoration: none !important;
}

.ev-profile__host a:hover {
  color: var(--ev-primary);
}

.ev-profile__chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ev-profile__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 100%;
}

@media (min-width: 992px) {
  .ev-profile__head {
    align-items: center;
    gap: 16px;
  }

  .ev-profile__avatar {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }

  .ev-profile__info {
    padding-top: 0;
  }

  .ev-profile__actions {
    flex: 0 0 auto;
  }
}

/* действия в шапке (JS-кнопки Sngine перестилизованы) */
.ev-profile__actions .btn {
  border-radius: 11px !important;
  box-shadow: none !important;
  font-size: 13.5px;
  padding: 9px 16px;
}

.ev-profile__actions .btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.ev-profile__actions .btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.ev-profile__actions .btn-light {
  color: var(--ev-text-soft) !important;
  background: var(--ev-card) !important;
  border-color: var(--ev-border-strong) !important;
}

.ev-profile__actions .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.ev-profile__actions .btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50% !important;
}

/* меню "•••" (Bootstrap dropdown, стилизовано под preline) */
.ev-profile__more {
  position: relative;
  display: inline-flex;
}

.ev-profile__more .dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--ev-border);
  box-shadow: var(--ev-shadow-lg);
  padding: 6px;
  background: var(--ev-card);
  z-index: 1050;
}

/* По умолчанию (anchor-выравнивание Bootstrap) — у края.
   При show позиционируем по центру viewport, чтобы меню
   не уезжало за границу экрана. */
.ev-profile__more .dropdown-menu.show {
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  margin: 0;
  min-width: 220px;
  max-width: calc(100vw - 32px);
}

.ev-profile__more .dropdown-item {
  border-radius: 10px;
  padding: 8px 12px;
}

.ev-profile__more .dropdown-item:hover {
  background: var(--ev-primary-soft);
  color: var(--ev-primary);
}

.ev-profile__more .dropdown-item .action {
  font-size: 13.5px;
  color: var(--ev-text-soft);
}

.ev-profile__more .dropdown-item:hover .action {
  color: var(--ev-primary);
}

.ev-profile__more .dropdown-item .action-desc {
  font-size: 12px;
  color: var(--ev-muted);
}

.ev-profile__more .dropdown-divider {
  border-color: var(--ev-border);
  margin: 5px 8px;
}

/* статистика */
.ev-profile__stats {
  padding: 14px 14px 0;
}

.ev-profile__stats .ev-stats {
  gap: 10px;
}

@media (min-width: 992px) {
  .ev-profile__stats {
    padding-top: 18px;
  }

  .ev-profile__stats .ev-stats__item {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }
}

/* панель табов (.ev-profile-tabs-panel объявлена выше вместе
   с .ev-profile-tabs-select) */

.ev-profile-content {
  margin-top: 14px;
}

.ev-profile-content > [class*="col-"] {
  padding-bottom: 14px;
}

/* ============================================================================
 * Модалка создания события (ajax.event.publisher.tpl)
 * ========================================================================== */
.ev-modal {
  display: flex;
  flex-direction: column;
}

/* крестик закрытия (BS4/BS5-нейтральный) */
.ev-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--ev-border);
  color: var(--ev-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ev-close:hover {
  background: var(--ev-primary-soft);
  color: var(--ev-primary);
}

.ev-modal .modal-header {
  border-bottom: 1px solid var(--ev-border);
  padding: 16px 20px;
}

.ev-modal .modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ev-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ev-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ev-primary);
  background: var(--ev-primary-soft);
}

.ev-modal .modal-body {
  padding: 18px 20px;
  max-height: 66vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.ev-modal .modal-footer {
  border-top: 1px solid var(--ev-border);
  padding: 14px 20px;
  gap: 10px;
}

.ev-modal .modal-footer .btn {
  border-radius: 11px;
  padding: 10px 20px;
  font-weight: 600;
}

.ev-modal .modal-content {
  border: 0;
  border-radius: var(--ev-radius-lg);
  box-shadow: var(--ev-shadow-lg);
  background: var(--ev-card);
}

@media (min-width: 576px) {
  .ev-modal .modal-content {
    margin: 0 auto;
    max-width: 540px;
  }
}

/* уведомление формы */
.ev-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ev-form-alert--warning {
  color: var(--ev-warning);
  background: var(--ev-warning-soft);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.ev-form-alert--warning a {
  color: inherit;
  font-weight: 600;
}

/* сегменты приватности (radio-карточки preline) */
.ev-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ev-seg__item {
  position: relative;
}

.ev-seg__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ev-seg__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ev-muted);
  background: var(--ev-card);
  border: 1.5px solid var(--ev-border-strong);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.ev-seg__label .fa {
  font-size: 16px;
}

.ev-seg__item input:checked + .ev-seg__label {
  color: var(--ev-primary);
  border-color: var(--ev-primary);
  background: var(--ev-primary-soft);
  box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.12);
}

.ev-seg__item input:focus-visible + .ev-seg__label {
  box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.25);
}

/* small screens: hero content adjustments */
@media (max-width: 575px) {
  .ev-hero {
    padding: 24px 14px 30px;
  }

  .ev-search button {
    padding: 10px 13px;
  }

  .ev-filters__title {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ev-card,
  .ev-hero,
  .ev-drop__menu {
    animation: none;
    transition: none;
  }
}

/* ============================================================================
 * UserSelect — кастомные выпадающие списки раздела «Мероприятия»
 * в стиле find.daddy.by (us-wrapper / us-button). Реализация:
 * content/themes/elengine/js/user-select.js.
 * ========================================================================== */

/* Цветовые токены (светлая тема по умолчанию) */
.us-wrapper,
.us-popover {
  --us-bg: #ffffff;
  --us-bg-elev: #ffffff;
  --us-border: rgba(15, 23, 42, 0.08);
  --us-border-strong: rgba(15, 23, 42, 0.14);
  --us-text: #0f172a;
  --us-text-muted: #64748b;
  --us-accent: #1271c9;               /* --ev-primary */
  --us-accent-soft: rgba(94, 114, 228, 0.10);
  --us-hover: rgba(15, 23, 42, 0.045);
  --us-active: rgba(94, 114, 228, 0.12);
  --us-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 30px -10px rgba(15, 23, 42, 0.18),
    0 20px 50px -20px rgba(15, 23, 42, 0.18);
  --us-radius: 14px;
  --us-radius-sm: 10px;
  --us-ring: 0 0 0 4px rgba(94, 114, 228, 0.18);
  --us-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.night-mode .us-wrapper,
body.night-mode .us-popover {
  --us-bg: #1f2833;                   /* --ev-card */
  --us-bg-elev: #27303d;
  --us-border: rgba(255, 255, 255, 0.08);
  --us-border-strong: rgba(255, 255, 255, 0.16);
  --us-text: #e6edf4;                 /* --ev-text */
  --us-text-muted: #8ea3b8;           /* --ev-muted */
  --us-accent: #8b96f5;
  --us-accent-soft: rgba(139, 150, 245, 0.16);
  --us-hover: rgba(255, 255, 255, 0.06);
  --us-active: rgba(139, 150, 245, 0.18);
  --us-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 10px 30px -10px rgba(0, 0, 0, 0.6),
    0 20px 50px -20px rgba(0, 0, 0, 0.5);
  --us-ring: 0 0 0 4px rgba(139, 150, 245, 0.28);
}

.us-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  font: inherit;
  color: var(--us-text);
  -webkit-tap-highlight-color: transparent;
}

/* ----- Кнопка-триггер ----- */
.us-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  background: var(--us-bg);
  border: 1px solid var(--us-border-strong);
  border-radius: var(--us-radius);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--us-text);
  min-height: 48px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition:
    border-color 160ms var(--us-ease),
    box-shadow 200ms var(--us-ease),
    background 160ms var(--us-ease),
    transform 160ms var(--us-ease);
  -webkit-appearance: none;
  appearance: none;
}

.us-button:hover {
  border-color: var(--us-accent);
  background: var(--us-bg);
}

.us-button:focus-visible {
  outline: none;
  border-color: var(--us-accent);
  box-shadow: var(--us-ring);
}

.us-button.us-button-open {
  border-color: var(--us-accent);
  box-shadow: var(--us-ring);
}

.us-button.us-button-placeholder {
  color: var(--us-text-muted);
}

.us-button:disabled,
.us-button.us-button-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.us-button-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.us-button-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.us-caret {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--us-text-muted);
  transition:
    transform 220ms var(--us-ease),
    background 160ms var(--us-ease),
    color 160ms var(--us-ease);
}

.us-button:hover .us-caret,
.us-button.us-button-open .us-caret {
  color: var(--us-accent);
  background: var(--us-accent-soft);
}

.us-button.us-button-open .us-caret {
  transform: rotate(180deg);
}

/* ----- Аватарка / иконка ----- */
.us-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.us-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.night-mode .us-avatar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.us-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* SVG-иконки в us-button / us-option: без фона, без круга */
.us-button .us-icon-svg,
.us-option .us-icon-svg {
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-block;
  color: var(--us-text-muted);
}

.us-option-selected .us-icon-svg {
  color: var(--us-accent);
}

/* ----- Backdrop ----- */
.us-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(15, 23, 42, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--us-ease);
}

.us-backrop-open,
.us-backdrop.us-backdrop-open {
  opacity: 1;
  pointer-events: auto;
}

body.night-mode .us-backdrop {
  background: rgba(0, 0, 0, 0.55);
}

/* ----- Popover (контейнер дропдауна) ----- */
.us-popover {
  position: fixed;
  z-index: 2147483646;
  background: var(--us-bg-elev);
  border: 1px solid var(--us-border);
  border-radius: var(--us-radius);
  box-shadow: var(--us-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Минимальная ширина: даже если триггер узкий (моб. верстка),
     дропдаун не схлопывается до ширины иконки — текст опций
     помещается полностью. !important — перебивает инлайн
     pop.style.width = rect.width + 'px' из user-select.js. */
  min-width: 240px !important;
  max-width: calc(100vw - 32px);
  /* fallback для браузеров без min() + основное значение */
  max-height: 360px;
  max-height: min(360px, calc(100vh - 24px));
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 160ms var(--us-ease),
    transform 180ms var(--us-ease);
  -webkit-tap-highlight-color: transparent;
}

.us-popover.us-popover-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.us-popover.us-popover-up {
  transform-origin: bottom center;
  transform: translateY(6px) scale(0.98);
}

body.night-mode .us-popover {
  background: var(--us-bg-elev);
  border-color: var(--us-border-strong);
}

/* ----- Поиск ----- */
.us-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid var(--us-border);
  background: var(--us-bg-elev);
  flex: 0 0 auto;
}

.us-search-icon {
  color: var(--us-text-muted);
  flex: 0 0 auto;
}

.us-search-input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--us-text);
  font: inherit;
  font-size: 14px;
  padding: 6px 0;
  min-width: 0;
}

.us-search-input::placeholder {
  color: var(--us-text-muted);
}

.us-search-clear {
  border: 0;
  background: transparent;
  color: var(--us-text-muted);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms var(--us-ease), background 140ms var(--us-ease), color 140ms var(--us-ease);
}

.us-search-clear:hover {
  background: var(--us-hover);
  color: var(--us-text);
}

/* ----- Список ----- */
.us-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  flex: 1 1 auto;
  /* Гарантированная прокрутка длинных списков (страны, языки,
     категории, публикации): жёсткий лимит высоты прямо на списке,
     не зависящий от flex-сжатия родителя. fallback + основное
     значение для браузеров без поддержки min(). */
  min-height: 0;
  max-height: 300px;
  max-height: min(300px, calc(100vh - 130px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--us-border-strong) transparent;
}

.us-list::-webkit-scrollbar {
  width: 8px;
}

.us-list::-webkit-scrollbar-thumb {
  background: var(--us-border-strong);
  border-radius: 8px;
}

.us-list::-webkit-scrollbar-track {
  background: transparent;
}

/* ----- Заголовок группы (<optgroup>) ----- */
.us-group {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--us-text-muted);
  user-select: none;
}

/* ----- Пункт списка ----- */
.us-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--us-radius-sm);
  cursor: pointer;
  user-select: none;
  color: var(--us-text);
  transition: background 120ms var(--us-ease), color 120ms var(--us-ease), transform 120ms var(--us-ease);
  position: relative;
}

.us-option.us-option-active,
.us-option:hover {
  background: var(--us-hover);
}

.us-option.us-option-selected {
  background: var(--us-active);
  color: var(--us-text);
}

.us-option.us-option-selected .us-label {
  font-weight: 600;
}

.us-option.us-option-placeholder {
  color: var(--us-text-muted);
}

.us-option-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.us-option .us-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  /* Текст опции может быть длинным ("Фотографии", "Публикации"),
     а триггер в мобильной верстке узкий. Разрешаем перенос внутри
     опции, чтобы «Ф...» не обрезалось до одной буквы. */
  max-width: 100%;
}

.us-popover .us-option .us-label {
  /* Внутри popover (расширенный min-width) перенос не нужен —
     текст вмещается целиком в одну строку. */
  white-space: nowrap;
}

.us-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--us-accent);
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 140ms var(--us-ease), transform 160ms var(--us-ease);
}

.us-option.us-option-selected .us-check {
  opacity: 1;
  transform: scale(1);
}

.us-check-spacer {
  visibility: hidden;
}

/* ----- Empty state ----- */
.us-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  color: var(--us-text-muted);
  font-size: 14px;
  flex: 1 1 auto;
  text-align: center;
}

/* ----- Адаптация под фильтры раздела «Мероприятия» ----- */
.ev-filters__form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ev-filters__form .us-wrapper {
  width: auto;
  min-width: 168px;
  max-width: 220px;
  margin-bottom: 0;
}

.ev-filters__form .us-button {
  min-height: 40px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.ev-filters__form .us-button-label {
  font-size: 13px;
  font-weight: 500;
}

.ev-filters__form .us-caret {
  width: 24px;
  height: 24px;
}

/* ----- Формы (создание / настройки события) ----- */
.ev-form .us-wrapper {
  margin-bottom: 4px;
}

.ev-form .us-button {
  min-height: 44px;
  border-radius: 10px;
}

/* ----- Адаптив ----- */
@media (max-width: 480px) {
  .us-button {
    min-height: 44px;
  }
  .us-button-label {
    font-size: 14px;
  }
  .us-popover {
    max-height: 420px;
    max-height: min(70vh, 420px);
  }
  .us-list {
    max-height: 340px;
    max-height: min(56vh, 340px);
  }
  .ev-filters__form .us-wrapper {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
    max-width: none;
  }
}

/* ----- Снижение движения ----- */
@media (prefers-reduced-motion: reduce) {
  .us-button,
  .us-caret,
  .us-popover,
  .us-backdrop,
  .us-option,
  .us-check,
  .us-search-clear {
    transition: none !important;
  }
}
