/* ─────────────────────────────────────────────────────────────
   KasaneTowns · панель городов на веб-карте (правая полоска)
   Также стилизует тултипы (kt-*) внутри карты.
   ───────────────────────────────────────────────────────────── */

#kt-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  z-index: 500;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 14, 36, .93), rgba(12, 8, 22, .96));
  border-right: 2px solid #7e57c2;
  box-shadow: 8px 0 28px rgba(0, 0, 0, .55);
  color: #d8d0e8;
  font-family: "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  box-sizing: border-box;
}

#kt-panel-content {
  width: 100%;
}

/* ─── Состояние «Дикие земли» ─── */

.kt-wild {
  text-align: center;
}

.kt-wild img {
  width: 72px;
  image-rendering: pixelated;
  opacity: .75;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
}

.kt-wild-title {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #9d90b8;
  letter-spacing: .5px;
}

.kt-wild-sub {
  margin-top: 8px;
  font-size: 12px;
  color: #6f6488;
  line-height: 1.5;
}

/* ─── Общий контент (тултип + панель) ─── */

.kt-tip {
  min-width: 230px;
  max-width: 260px;
  font-size: 12px;
  line-height: 1.55;
  color: #b0a8c0;
}

#kt-panel .kt-tip {
  max-width: none;
  font-size: 13px;
}

.kt-logo {
  max-width: 52px;
  max-height: 52px;
  border-radius: 8px;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.kt-title {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, #c77dff, #9d4edd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kt-badge {
  display: inline-block;
  margin: 3px 0 4px;
  padding: 1px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #e0d3ff;
  background: linear-gradient(90deg, rgba(199, 125, 255, .22), rgba(90, 24, 154, .35));
  border: 1px solid #5a189a;
  border-radius: 10px;
}

.kt-sub {
  font-size: 12px;
  color: #9d90b8;
}

.kt-desc {
  margin: 6px 0;
  font-size: 12px;
  font-style: italic;
  color: #d8d0e8;
}

.kt-label {
  margin-top: 8px;
  font-size: 11px;
  color: #8a7fa8;
}

.kt-line {
  font-size: 12px;
  color: #b0a8c0;
}

.kt-line b {
  color: #e0d3ff;
  font-weight: 600;
}

.kt-ally { color: #7ddba3; }
.kt-enemy { color: #e08a8a; }
.kt-muted { color: #6f6488; font-size: 11px; }

.kt-hint {
  margin-top: 8px;
  font-size: 10px;
  color: #5f5678;
}

/* ─── HTML-прогрессбары ─── */

.kt-bar {
  margin: 4px 0;
  height: 10px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid #5a189a;
  border-radius: 6px;
  overflow: hidden;
}

.kt-fill {
  height: 100%;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, #c77dff, #7b2d8e);
  box-shadow: 0 0 8px rgba(199, 125, 255, .55);
  transition: width .25s ease;
}

.kt-fill-xp {
  background: linear-gradient(90deg, #4df3ff, #8a2aff);
  box-shadow: 0 0 8px rgba(77, 243, 255, .45);
}

.kt-bar-caption {
  font-size: 11px;
  color: #8a7fa8;
  margin-bottom: 2px;
}

/* ─── Правая полоска городов ─────────────────────────────────────────────── */

#kt-cities {
  position: fixed;
  top: 54px;
  right: 10px;
  width: 240px;
  max-height: calc(100vh - 120px);
  z-index: 510;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(22, 14, 36, .94), rgba(12, 8, 22, .96));
  border: 1px solid #7e57c2;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
  font-family: "Segoe UI", Roboto, sans-serif;
  color: #d8d0e8;
  padding: 6px;
  box-sizing: border-box;
}

.kt-cities-title {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b39ddb;
  text-align: center;
  padding: 4px 6px 6px;
  border-bottom: 1px solid rgba(126, 87, 194, .35);
  margin-bottom: 4px;
}

.kt-cities-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.kt-cities-item:hover {
  background: rgba(126, 87, 194, .22);
}

.kt-cities-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: 0 0 auto;
}

.kt-cities-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 5px rgba(126, 87, 194, .8);
}

.kt-cities-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kt-cities-name-text {
  font-size: 13px;
  color: #efe6ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kt-cities-level {
  font-size: 10.5px;
  color: #8a7fa8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kt-cities-empty {
  text-align: center;
  font-size: 12px;
  color: #8a7fa8;
  padding: 10px 4px;
}

/* ─── Кнопка сворачивания полоски городов (справа сверху) ─── */

#kt-cities-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 520;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  font-size: 17px;
  color: #e0d3ff;
  background: linear-gradient(180deg, rgba(56, 28, 84, .95), rgba(28, 12, 46, .95));
  border: 1px solid #7e57c2;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  font-family: "Segoe UI", Roboto, sans-serif;
}

#kt-cities-toggle:hover {
  filter: brightness(1.2);
}

#kt-cities-toggle.is-collapsed {
  opacity: .85;
}

body.kt-cities-hidden #kt-cities {
  display: none !important;
}

