/* Стили для информационного блока на главной странице */
.info-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.info-bar-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  position: relative;
  z-index: 2;
}

.info-bar-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-height: 44px;
}

/* Стили для компактной кнопки архива */
.archive-item {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

.archive-btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

a.btn.archive-btn {
  color: var(--border-dark) !important;
}

a.btn.archive-btn i.bi,
a.btn.archive-btn .bi {
  color: var(--border-dark) !important;
}

.telegram-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  width: auto;
  min-width: 0;
}

.telegram-buttons.dropdown {
  position: relative;
}

.communities-dropdown-toggle {
  white-space: nowrap;
  animation: communitiesPulse 1.9s ease-in-out infinite;
  will-change: box-shadow, transform;
}

.communities-dropdown-toggle:hover,
.communities-dropdown-toggle:focus,
.communities-dropdown-toggle[aria-expanded="true"] {
  animation-play-state: paused;
  transform: translateY(-1px);
  box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, 0.22);
}

.communities-dropdown-menu {
  min-width: 210px;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  z-index: 1080;
  transform: none !important;
}

@keyframes communitiesPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.2);
  }
  50% {
    transform: translateY(-1px) scale(1.035);
    box-shadow: 0 0 0 0.28rem rgba(13, 110, 253, 0.34);
  }
}

/* Десктопная версия - компактная строка, архив прижат к бейджам */
@media (min-width: 768px) {
  .info-bar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    min-height: 44px;
  }
  
  .info-bar-left {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 520px);
  }
  
  .info-bar-right {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
  }
  
  .info-item {
    flex-wrap: nowrap;
    white-space: nowrap;
    min-height: auto;
  }
  
  .archive-item {
    flex-wrap: nowrap;
  }
  
  .archive-item .small {
    font-size: 0.8125rem;
  }
  
  .archive-btn {
    padding: 0.3rem 0.5rem;
  }
  
  .telegram-buttons {
    justify-content: flex-end;
    width: auto;
    flex-shrink: 0;
  }
  
  .telegram-buttons .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
  }
}

/* На больших экранах - чуть больше зазора, без налезания */
@media (min-width: 1200px) {
  .info-bar {
    gap: 1.25rem;
    padding: 0.6rem 1.25rem;
  }
  
  .info-bar-left {
    gap: 1rem;
    max-width: calc(100% - 540px);
  }
  
  .info-bar-right {
    gap: 1rem;
  }
}

/* Стили для компонента серверов внутри info-bar */
.info-bar .server-status-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.info-bar .server-status-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  overflow: visible;
}

.info-bar .server-status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 260px;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: relative;
  overflow: visible;
}

.info-bar .server-status-item--link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.info-bar .server-status-item--link:hover {
  text-decoration: none;
  filter: brightness(0.98);
}

.info-bar .server-status-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.info-bar .server-status-title {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.info-bar .server-status-track {
  max-width: 120px;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-bar .server-status-online {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Улучшения для мобильной версии */
@media (max-width: 767px) {
  .info-bar {
    padding: 0.5rem;
  }
  
  .info-bar-left,
  .info-bar-right {
    gap: 0.5rem;
  }
  
  .info-item {
    min-height: 40px;
    font-size: 0.875rem;
  }
  
  .info-item i {
    font-size: 1rem;
  }
  
  .archive-item .small {
    font-size: 0.8125rem;
  }
  
  .archive-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
  }
  
  .telegram-buttons .btn {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }

  .info-bar .server-status-list {
    width: 100%;
    flex-wrap: wrap;
  }

  .info-bar .server-status-item {
    max-width: 100%;
  }

  .info-bar .server-status-track {
    max-width: 110px;
  }

  .telegram-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .communities-dropdown-toggle {
    width: 100%;
  }

  .communities-dropdown-menu {
    width: 100%;
    min-width: 0;
    right: auto;
    left: 0;
  }
}

