/* I Kindred Spirit — общие стили нижнего хедера (bottom bar).
   Подключается на страницах, где нижняя панель встроена в разметку. */

/* --- Панель --- */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(16px);
  background: var(--header-bg, rgba(255, 255, 255, 0.96));
  border-top: 1px solid var(--border-color, rgba(30, 64, 175, 0.12));
  box-shadow: 0 -4px 30px rgba(30, 64, 175, 0.1);
}

[data-theme="dark"] .bottom-bar {
  background: rgba(11, 17, 32, 0.98);
}

/* Отступ под фиксированную панель, чтобы контент не перекрывался */
body.has-bottom-nav {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
}

/* --- Кнопки: плоские круглые иконки без рамок (референс Pinterest) --- */
.bottom-bar .header-right > .catalog-btn,
.bottom-bar .header-right > .icon-btn,
.bottom-bar .header-right .lang-btn,
.bottom-bar .header-right > .user-btn-wrap {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  color: var(--text-main, #1e293b) !important;
  transform: none !important;
  transition: background 0.18s ease, color 0.18s ease !important;
}

.bottom-bar .header-right > .catalog-btn:hover,
.bottom-bar .header-right > .icon-btn:hover,
.bottom-bar .header-right .lang-btn:hover,
.bottom-bar .header-right > .user-btn-wrap:hover {
  background: rgba(17, 17, 17, 0.06) !important;
  color: var(--text-main, #1e293b) !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

[data-theme="dark"] .bottom-bar .header-right > .catalog-btn:hover,
[data-theme="dark"] .bottom-bar .header-right > .icon-btn:hover,
[data-theme="dark"] .bottom-bar .header-right .lang-btn:hover,
[data-theme="dark"] .bottom-bar .header-right > .user-btn-wrap:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.bottom-bar .header-right svg {
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  filter: none !important;
}

.bottom-bar .header-right .lang-btn {
  font-size: 20px !important;
  gap: 0 !important;
  line-height: 1 !important;
}

/* Кнопка пользователя: круглая подложка + имя */
.bottom-bar .user-btn-wrap {
  overflow: visible !important;
}

.bottom-bar .user-btn-wrap.expanded {
  max-width: 180px !important;
  border-radius: 999px !important;
}

.bottom-bar .user-btn-wrap .user-btn-letter {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text-main, #1e293b) !important;
  background: rgba(17, 17, 17, 0.08) !important;
}

[data-theme="dark"] .bottom-bar .user-btn-wrap .user-btn-letter {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

/* --- Счётчик непрочитанных на колокольчике --- */
.iks-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--header-bg, rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

.iks-notif-badge.iks-notif-badge-visible {
  display: inline-flex;
}

/* --- Панель уведомлений --- */
.iks-notif-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 120px));
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
  background: var(--card-bg, rgba(255, 255, 255, 0.98));
  border: 1px solid var(--border-color, rgba(30, 64, 175, 0.14));
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.22);
}

[data-theme="dark"] .iks-notif-panel {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
}

.iks-notif-panel.iks-notif-panel-open {
  display: flex;
}

.iks-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, rgba(30, 64, 175, 0.14));
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
}

.iks-notif-head button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--neon, #1e40af);
  text-decoration: underline;
  cursor: pointer;
}

.iks-notif-list {
  overflow-y: auto;
  max-height: min(340px, calc(100dvh - 190px));
}

.iks-notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, rgba(30, 64, 175, 0.1));
  cursor: pointer;
  transition: background 0.15s ease;
}

.iks-notif-item:hover {
  background: rgba(30, 64, 175, 0.07);
}

.iks-notif-item.iks-notif-unread {
  background: rgba(34, 197, 94, 0.08);
}

.iks-notif-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main, #1e293b);
}

.iks-notif-item-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted, #64748b);
}

.iks-notif-item-time {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted, #64748b);
}

.iks-notif-empty {
  padding: 22px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}
