/* ============================================================
   CS-TOP.UZ — Аддон стилей v4
   Тулбар, скелетон, анимации, фильтр-теги, активная карта
   ============================================================ */

/* --- Тулбар фильтров --- */
.cst-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f5f7fa;
  border: 1px solid #dbe4ea;
  border-bottom: none;
  flex-wrap: wrap;
  margin-bottom: 23px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.03);
}

.cst-toolbar__search {
  flex: 1 1 200px;
  min-width: 140px;
  position: relative;
  top: 5px;
}

.cst-toolbar__search input {
  width: 100%;
  box-sizing: border-box !important;
  padding: 5px 10px 5px 30px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 2px;
  font-size: 13px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  background: #fff;
  color: #515456;
  transition: all linear .2s;
  outline: none;
  height: 33px;
}

.cst-toolbar__search input:focus {
  border-color: #52a9ca;
  box-shadow: 0 0 0 2px rgba(82,169,202,.15);
}

.cst-toolbar__search::before {
  content: '\f002';
  font-family: FontAwesome;
  position: absolute;
  left: 10px;
  top: 38%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #92969a;
  pointer-events: none;
}

.cst-toolbar__filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cst-toolbar__btn {
  padding: 4px 10px;
  font-size: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 2px;
  background: #fff;
  background-image: linear-gradient(to bottom, #f9f9f9, #f0f0f0) !important;
  color: #515456;
  cursor: pointer;
  transition: all linear .2s;
  white-space: nowrap;
  line-height: 20px;
}

.cst-toolbar__btn:hover {
  border-color: rgba(0,0,0,.2);
  background: #eee;
  background-image: none;
}

.cst-toolbar__btn.active {
  background: #52a9ca !important;
  background-image: linear-gradient(to bottom, #66b2d1, #44a3c6) !important;
  color: #fff !important;
  border-color: #52a9ca !important;
}

.cst-toolbar__btn--tasix {
  border-color: #086a3d;
  color: #086a3d;
  background: #e8f5ef;
  background-image: none;
}

.cst-toolbar__btn--tasix:hover {
  background: #d0ebdb;
}

.cst-toolbar__btn--tasix.active {
  background: linear-gradient(to bottom, #086a3d, #065a34);
  color: #fff;
  border-color: #086a3d;
}

.cst-toolbar__sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cst-toolbar__sort select {
  padding: 4px 8px;
  font-size: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 2px;
  background: #fff;
  color: #515456;
  cursor: pointer;
  outline: none;
  height: 33px;
  margin-top: 8px;
}

.cst-toolbar__count {
  font-size: 12px;
  color: #92969a;
  white-space: nowrap;
  font-weight: 300;
}

/* --- Активный фильтр тег --- */
.cst-active-filter {
  padding: 6px 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-top: none;
  display: flex;
  gap: 8px;
  margin-top:-22px;
  margin-bottom:22px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
}

.cst-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid #e0c97a;
  border-radius: 3px;
  color: #5c4400;
  cursor: pointer;
  transition: all .15s;
  font-size: 12px;
}

.cst-filter-tag:hover {
  background: #ffeeba;
  border-color: #d4ac0d;
}

.cst-filter-tag i {
  font-size: 10px;
  opacity: .6;
}

.cst-filter-tag:hover i {
  opacity: 1;
  color: #c0392b;
}

/* --- Карта: активное состояние --- */
.map-col--active {
  outline: 2px solid #52a9ca;
  outline-offset: -1px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(82,169,202,.4);
}

.map-col--active .map-col-strip {
  filter: brightness(1.2) !important;
}

/* --- Скелетон загрузки --- */
.cst-skel {
  animation: cst-shimmer 1.4s infinite ease-in-out;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  border-radius: 2px;
  display: inline-block;
}

.cst-skel--text { height: 13px; }
.cst-skel--dot  { width: 8px; height: 8px; border-radius: 50%; }
.cst-skel--icon { width: 18px; height: 18px; }
.cst-skel--ip   { height: 28px; width: 170px; border-radius: 4px; }
.cst-skel--btn  { width: 20px; height: 20px; border-radius: 2px; }
.cst-skel--badge { width: 36px; height: 20px; border-radius: 2px; }
.cst-skel--bar  { height: 5px; width: 100%; margin-top: 4px; border-radius: 100px; }

@keyframes cst-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Плавное появление строк --- */
#all_servers tbody tr.cst-appear {
  animation: cst-row-in .25s ease both;
}

@keyframes cst-row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Пустое состояние --- */
.cst-empty-state {
  padding: 30px 20px;
  text-align: center;
  color: #92969a;
  font-size: 14px;
  font-weight: 300;
}

.cst-empty-state i {
  display: block;
  font-size: 32px;
  margin-bottom: 8px;
  opacity: .4;
}

/* --- Пагинация обёртка --- */
.cst-pagination-wrap {
  margin-top: 0px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.03);
}

#cst_pag .uk-width-1-1 {
	margin-bottom: 0px;
}

.cst-pagination-wrap .uk-pagination {
  padding: 10px 0;
}

.uk-grid:not(.uk-grid-preserve)>[class*='uk-width-'] {
	margin-bottom: 20px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .cst-toolbar {
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }
  .cst-toolbar__search { flex: 1 1 100%; }
  .cst-toolbar__sort   { margin-left: 0; }
}
