/* =======================================================================
   hosts-list.css — HOSTS LIST PAGE (GRID + SEARCH + PAGINATION)
   ======================================================================= */

/* =======================================================================
   PAGE WRAPPER
   ======================================================================= */

.hosts-page {
  padding-top: 14px;
}

/* =======================================================================
   HEADER (TITLE + FILTER BAR)
   ======================================================================= */

.hosts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  position: relative;
}

/* =======================================================================
   FILTER BAR (SEARCH + CLEAR)
   ======================================================================= */

.hosts-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.hosts-filters input,
.hosts-filters button {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font-size: 14px;
  background: #fff;
}

.hosts-filters input[type="search"] {
  min-width: 220px;
}

.hosts-clear-btn {
  background: #fff;
  color: var(--accent, #7c3aed);
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
}

.hosts-clear-btn:hover {
  background: rgba(124,58,237,0.06);
}

/* =======================================================================
   MOBILE SEARCH TOGGLE ICON
   ======================================================================= */

.search-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

/* =======================================================================
   HOSTS GRID
   ======================================================================= */

#hosts-grid.grid {
  gap: 18px;
}

/* =======================================================================
   HOST NAME (ONE LINE + ELLIPSIS)  ✅ NEW
   ======================================================================= */

.hosts-page .item-title {
  font-weight: 600;
  line-height: 1.3;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  max-width: 100%;
}

/* =======================================================================
   HOST META TEXT
   ======================================================================= */

.hosts-page .item-sub {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  color: #6b7280;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =======================================================================
   PAGINATION
   ======================================================================= */

#hosts-pagination.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0;
  flex-wrap: wrap;
}

#hosts-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

#hosts-pagination button:hover {
  background: rgba(124,58,237,.08);
  border-color: var(--accent, #7c3aed);
}

#hosts-pagination button.active {
  background: var(--accent, #7c3aed);
  color: #fff;
  border-color: var(--accent, #7c3aed);
  cursor: default;
}

#hosts-pagination button.nav {
  font-weight: 700;
}

/* =======================================================================
   MOBILE LAYOUT (≤ 768px)
   ======================================================================= */

@media (max-width: 768px) {

  .hosts-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-toggle {
    display: block;
    position: absolute;
    top: 6px;
    right: 0;
  }

  .hosts-filters {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
    display: none;
    flex-direction: column;
  }

  .hosts-filters.mobile-active {
    display: flex;
    gap: 10px;
  }

  .hosts-filters input,
  .hosts-filters button {
    width: 100%;
  }

  #hosts-pagination {
    margin: 20px 0;
  }

  #hosts-pagination button {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }
}
