/* ===================================
   ОТЕЛЬ ГИЛЬДИИ — barracks_upgrades.css
   Стиль: Inter + rgba-glass (hotel.css palette)
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Оверлей ── */
.gh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ghFadeIn 0.25s ease both;
  overflow-y: auto;
}

@keyframes ghFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Контейнер ── */
.gh-container {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  background: linear-gradient(145deg, #18201b, #111118);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  animation: ghSlideUp 0.3s ease both;
}

@keyframes ghSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Шапка ── */
.gh-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 28px 28px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

/* Заголовок — крупный, по центру, лёгкое свечение */
.gh-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
  text-shadow:
    0 0 28px rgba(255, 255, 255, 0.16),
    0 2px 8px rgba(0, 0, 0, 0.7);
}

/* ── Кнопка закрытия ── */
.gh-close-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gh-close-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.gh-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) rotate(90deg);
}

/* ── Контент ── */
.gh-content {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  
  border-radius: 0 0 18px 18px;       /* ← нижние углы = контейнер */
}


/* ── Секция ── */
.gh-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;  
}

.gh-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gh-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.gh-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.gh-section-count--npc {
  color: rgba(160, 140, 255, 0.8);
  border-color: rgba(160, 140, 255, 0.2);
  background: rgba(160, 140, 255, 0.08);
}

.gh-section-count--dead {
  color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.07);
}

/* ── Тоггл ── */
.gh-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.gh-toggle-btn:hover,
.gh-toggle-btn.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}

.gh-toggle-btn--npc.active  { border-color: rgba(160, 140, 255, 0.25); }
.gh-toggle-btn--dead.active { border-color: rgba(255, 255, 255, 0.1); }

.gh-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

/* ── Список ── */
.gh-list {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.gh-list::-webkit-scrollbar { display: none; }

.gh-list.visible {
  display: flex;
  max-height: 296px;          /* ровно ~5 карточек (56px + 6px gap) */
  overflow-y: auto;
  flex-shrink: 0;
  animation: ghListIn 0.25s ease both;
}

@keyframes ghListIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Карточка постояльца ── */
/* overflow:hidden — предотвращает выход transform за бордербокс */
.gh-resident {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  will-change: transform;
}

.gh-resident:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.gh-resident--npc:hover { border-color: rgba(160, 140, 255, 0.2); }

.gh-resident--dead { opacity: 0.65; }
.gh-resident--dead:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.09);
  transform: none;
}

/* ── Аватар ── */
.gh-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.gh-avatar--dead {
  filter: grayscale(1);
  opacity: 0.6;
}

/* ── Инфо ── */
.gh-resident-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gh-resident-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-resident-name--dead {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
}

.gh-resident--npc .gh-resident-name {
  color: rgba(185, 175, 255, 0.9);
}

.gh-resident-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Бейджи ── */
.gh-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.gh-badge--npc {
  background: rgba(160, 140, 255, 0.1);
  border-color: rgba(160, 140, 255, 0.2);
  color: rgba(185, 175, 255, 0.8);
}

.gh-badge--dead {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  padding: 2px 6px;
}

/* ── Пустое состояние ── */
.gh-empty {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

/* ── УЛУЧШЕНИЯ — временно отключены ──────────────────────────────

.gh-morale-bar { ... }
.gh-upgrades-grid { ... }
.gh-upgrade-card { ... }
.gh-invest-btn { ... }
.gh-done-badge { ... }

── конец блока улучшений ── */

/* ── Адаптив ── */
@media (max-width: 600px) {
  .gh-container {
    max-width: 100%;
    max-height: 100dvh;
    
  }

  .gh-header  { padding: 20px 20px 16px; }
  .gh-title   { font-size: 20px; }
  .gh-content { padding: 18px 20px; gap: 22px; }
}

.gh-resident {
  flex-shrink: 0;
  min-height: 58px;
}

