/* =====================================================
   Zhokl Team Cards — Frontend Styles v2.7.1
   ===================================================== */

.zhokl-tc-section-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #555;
  margin: 32px 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.zhokl-tc-section-title::before,
.zhokl-tc-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #d0d0d0;
}

/* --- Grid --- */
.zhokl-tc-grid {
  display: grid;
  grid-template-columns: repeat(var(--zhokl-cols, 4), 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
@media (max-width: 1024px) { .zhokl-tc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .zhokl-tc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .zhokl-tc-grid { grid-template-columns: 1fr; } }

/* --- Card --- */
.zhokl-tc-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow .2s, transform .2s;
}
.zhokl-tc-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.zhokl-tc-card--passive {
  cursor: default;
}
.zhokl-tc-card--passive:hover {
  box-shadow: none;
  transform: none;
}

.zhokl-tc-photo {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #f0f4f8;
  flex-shrink: 0;
}
.zhokl-tc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zhokl-tc-photo--empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: #ccc;
}

.zhokl-tc-info { padding: 14px 16px; flex: 1; }
.zhokl-tc-name {
  display: block;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase;
  color: #222; margin-bottom: 6px; line-height: 1.3;
}
.zhokl-tc-field { font-size: 13px; color: #666; margin: 3px 0; line-height: 1.4; }
.zhokl-tc-field-label { font-weight: 600; color: #444; }

.zhokl-tc-btn {
  display: block;
  padding: 11px 16px;
  background: #1a3a5c; color: #fff;
  text-align: center; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none; width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: background .2s;
}
.zhokl-tc-btn:hover { background: #0f2540; color: #fff; }

/* =====================================================
   MODAL  — повноекранний overlay, перекриває тему
   ===================================================== */

#zhokl-tc-modal {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important; height: 100% !important;
  min-width: 100vw !important; min-height: 100vh !important;
  margin: 0 !important; padding: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}
#zhokl-tc-modal[hidden] { display: none !important; }

/* Затемнений фон */
#zhokl-tc-modal .zhokl-tc-modal-overlay {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  background: rgba(0,0,0,0.7) !important;
  cursor: pointer !important;
  z-index: 0 !important;
  margin: 0 !important; padding: 0 !important;
  transform: none !important;
}

/* Вікно діалогу */
#zhokl-tc-modal .zhokl-tc-modal-box {
  position: relative !important;
  background: #fff !important;
  border-radius: 10px !important;
  width: calc(100vw - 32px) !important;
  max-width: 860px !important;
  max-height: calc(100vh - 40px) !important;
  min-height: 200px !important;
  z-index: 1 !important;
  box-shadow: 0 20px 80px rgba(0,0,0,.5) !important;
  animation: zhokl-tc-in .22s cubic-bezier(.2,.8,.3,1) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 16px !important;
  transform: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

@keyframes zhokl-tc-in {
  from { opacity: 0; transform: scale(.95) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Верхня панель кнопок */
#zhokl-tc-modal .zhokl-tc-modal-topbar {
  position: absolute !important;
  top: 12px !important; right: 14px !important;
  display: flex !important;
  gap: 6px !important;
  z-index: 10 !important;
  align-items: center !important;
  padding: 0 !important; margin: 0 !important;
  transform: none !important;
}

/* Кнопка розгортання */
#zhokl-tc-modal .zhokl-tc-modal-fs-btn {
  background: rgba(0,0,0,.08) !important;
  border: none !important; border-radius: 50% !important;
  width: 38px !important; height: 38px !important;
  font-size: 18px !important; line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  color: #333 !important; transition: background .15s !important;
  padding: 0 !important; transform: none !important;
}
#zhokl-tc-modal .zhokl-tc-modal-fs-btn:hover  { background: rgba(0,0,0,.18) !important; }
#zhokl-tc-modal .zhokl-tc-modal-fs-btn.active { background: rgba(26,58,92,.15) !important; color: #1a3a5c !important; }

/* Кнопка ✕ */
#zhokl-tc-modal .zhokl-tc-modal-close {
  background: rgba(0,0,0,.1) !important;
  border: none !important; border-radius: 50% !important;
  width: 38px !important; height: 38px !important;
  font-size: 20px !important; line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  color: #333 !important; transition: background .15s !important;
  padding: 0 !important; transform: none !important;
}
#zhokl-tc-modal .zhokl-tc-modal-close:hover { background: rgba(0,0,0,.22) !important; }

/* Скрол-контейнер */
#zhokl-tc-modal .zhokl-tc-modal-scroll {
  flex: 1 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  min-height: 0 !important;
}

/* Тіло модалки */
#zhokl-tc-modal .zhokl-tc-modal-body {
  padding: 32px 36px 32px !important;
  box-sizing: border-box !important;
}

/* Фото — float left, розмір задається через JS inline style */
#zhokl-tc-modal .zhokl-tc-modal-photo {
  display: block !important;
  margin: 0 !important;
}
#zhokl-tc-modal .zhokl-tc-modal-photo img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-position: top center !important;
  margin: 0 !important; padding: 0 !important;
  border-radius: inherit !important;
}
#zhokl-tc-modal .zhokl-tc-modal-photo--empty {
  min-height: 140px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 64px !important;
  color: #ccc !important;
}

/* Clearfix */
#zhokl-tc-modal .zhokl-tc-modal-clearfix {
  clear: both !important;
  display: block !important;
  height: 0 !important;
}

/* Заголовок */
#zhokl-tc-modal .zhokl-tc-modal-name {
  font-size: 18px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #1a3a5c !important;
  margin: 0 0 12px !important;
  line-height: 1.3 !important;
  padding-right: 88px !important;
}
#zhokl-tc-modal .zhokl-tc-modal-fields { margin-bottom: 14px !important; }
#zhokl-tc-modal .zhokl-tc-modal-fields p {
  font-size: 14px !important; color: #555 !important; margin: 5px 0 !important;
}
#zhokl-tc-modal .zhokl-tc-modal-fields .zhokl-tc-field-label {
  font-weight: 700 !important; color: #333 !important;
}
#zhokl-tc-modal .zhokl-tc-modal-desc {
  font-size: 14px !important; color: #444 !important; line-height: 1.75 !important;
}
#zhokl-tc-modal .zhokl-tc-modal-desc h2,
#zhokl-tc-modal .zhokl-tc-modal-desc h3 {
  font-size: 16px !important; color: #1a3a5c !important; margin: 16px 0 6px !important;
}
#zhokl-tc-modal .zhokl-tc-modal-desc ul,
#zhokl-tc-modal .zhokl-tc-modal-desc ol {
  padding-left: 20px !important; margin: 8px 0 !important;
}
#zhokl-tc-modal .zhokl-tc-modal-desc a { color: #1a3a5c !important; }

/* ---- Повноекранний режим ---- */
#zhokl-tc-modal.zhokl-modal--fullscreen .zhokl-tc-modal-box {
  width: 100vw !important; max-width: 100vw !important;
  height: 100vh !important; max-height: 100vh !important;
  margin: 0 !important; border-radius: 0 !important;
}
#zhokl-tc-modal.zhokl-modal--fullscreen .zhokl-tc-modal-body {
  padding: 48px 60px 48px !important;
}

/* Мобільна адаптація */
@media (max-width: 640px) {
  #zhokl-tc-modal .zhokl-tc-modal-box {
    max-height: calc(100vh - 16px) !important;
    border-radius: 8px !important;
    margin: 8px !important;
  }
  #zhokl-tc-modal .zhokl-tc-modal-body {
    padding: 20px 18px 24px !important;
  }
  #zhokl-tc-modal .zhokl-tc-modal-photo {
    float: none !important;
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    max-height: 260px !important;
    overflow: hidden !important;
  }
  #zhokl-tc-modal .zhokl-tc-modal-photo img {
    width: 100% !important;
    height: 260px !important;
    object-fit: cover !important;
  }
  #zhokl-tc-modal .zhokl-tc-modal-name { padding-right: 88px !important; }
  #zhokl-tc-modal.zhokl-modal--fullscreen .zhokl-tc-modal-body {
    padding: 20px 18px 24px !important;
  }
}


/* =====================================================
   ПОШУК
   ===================================================== */
.zhokl-tc-search-wrap,
.zhokl-tc-global-search-wrap {
  margin-bottom: 20px;
}
.zhokl-tc-global-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.zhokl-tc-search-input {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 10px 16px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: inherit;
  background: #fff;
}
.zhokl-tc-search-input:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

.zhokl-tc-global-filter-wrap {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.zhokl-tc-filter-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 200px;
  min-width: 160px;
}
.zhokl-tc-filter-col label {
  font-size: 12px;
  color: #666;
}
.zhokl-tc-filter-label-select,
.zhokl-tc-filter-value-select {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}
.zhokl-tc-filter-label-select:focus,
.zhokl-tc-filter-value-select:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
  outline: none;
}

/* Пошук і фільтр в один рядок коли поруч */
.zhokl-tc-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}
.zhokl-tc-controls-row .zhokl-tc-global-search-wrap,
.zhokl-tc-controls-row .zhokl-tc-global-filter-wrap {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.zhokl-tc-search-count {
  font-size: 13px;
  color: #888;
}
.zhokl-tc-search-empty {
  text-align: center;
  color: #888;
  font-size: 14px;
  padding: 24px 0;
  margin: 0;
}

/* =====================================================
   SEARCH BAR  [zhokl_tc_bar_N]
   ===================================================== */
.zhokl-tc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.zhokl-tc-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 180px;
  min-width: 140px;
}

.zhokl-tc-bar-item label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Пошук — ширший */
.zhokl-tc-bar-search-item {
  flex: 2 1 220px;
}

.zhokl-tc-bar-search-item input[type="search"] {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: inherit;
  background: #fff;
}
.zhokl-tc-bar-search-item input[type="search"]:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

/* Фільтр-дропдаун */
.zhokl-tc-bar select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .2s;
  cursor: pointer;
}
.zhokl-tc-bar select:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
  outline: none;
}
.zhokl-tc-bar select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Лічильник */
.zhokl-tc-bar-count-item {
  flex: 0 1 auto;
  justify-content: flex-end;
}
.zhokl-tc-bar-count {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  padding: 10px 0;
}

/* Кнопка скидання */
.zhokl-tc-bar-reset-item {
  flex: 0 1 auto;
  min-width: unset;
}
.zhokl-tc-bar-reset-btn {
  padding: 10px 16px;
  background: #f3f4f5;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #555;
  transition: background .15s, border-color .15s, opacity .2s;
  white-space: nowrap;
}
.zhokl-tc-bar-reset-btn:hover {
  background: #fee;
  border-color: #e99;
  color: #c00;
}

/* Мобільна адаптація */
@media (max-width: 640px) {
  .zhokl-tc-bar-item {
    flex: 1 1 100%;
  }
  .zhokl-tc-bar-reset-item,
  .zhokl-tc-bar-count-item {
    flex: 1 1 auto;
  }

/* =====================================================
   CAROUSEL  [carousel_enabled]
   ===================================================== */

/* Обгортка — position relative для абсолютних стрілок */
.zhokl-tc-carousel {
  position: relative;
  margin-bottom: 24px;
  padding: 0 44px; /* місце для стрілок */
  box-sizing: border-box;
}

/* Viewport — приховує що виходить за межі */
.zhokl-tc-carousel-viewport {
  overflow: hidden;
  width: 100%;
  display: block;
}

/* Track — горизонтальний flex, НЕ переноситься */
.zhokl-tc-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Картки в каруселі — ширина задається JS через inline style */
.zhokl-tc-carousel-track > .zhokl-tc-card {
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
  margin: 0 6px;
  /* JS встановлює card.style.width і card.style.minWidth */
}

/* Стрілки — абсолютно по боках */
.zhokl-tc-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%); /* трохи вище центру через dots */
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #333;
  transition: background .15s, border-color .15s;
}
.zhokl-tc-carousel-btn:hover {
  background: #1a3a5c;
  color: #fff;
  border-color: #1a3a5c;
}
.zhokl-tc-carousel-btn[disabled] {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}
.zhokl-tc-carousel-prev { left: 0; }
.zhokl-tc-carousel-next { right: 0; }

/* Точки */
.zhokl-tc-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.zhokl-tc-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.zhokl-tc-carousel-dot.active {
  background: #1a3a5c;
  transform: scale(1.3);
}

/* Адаптив */
@media (max-width: 640px) {
  .zhokl-tc-carousel { padding: 0 36px; }
  .zhokl-tc-carousel-btn { width: 28px; height: 28px; font-size: 16px; }
}
