/* COMM — sliding drawer (1-в-1 с APK AndroidComm) */

/* ---------- Drawer (pull-up снизу) ---------- */
.comm-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(100vh - 75px);
  z-index: 101;
  background: transparent;
  color: var(--apk-fg, #e4f1ee);
  display: flex; flex-direction: column;
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: .05em;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  transform: translateY(calc(100% - 49px));   /* закрыт: видно только handle (49px) */
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  box-shadow: none;
  pointer-events: none;
}
.comm-drawer.open {
  transform: translateY(0);
  pointer-events: auto;
}
.comm-drawer__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--apk-bg, #0a0e14);
}

/* Handle сверху drawer'а (pull-up bar) */
/* handle перенесён в comm-handle.css — 1-в-1 с APK */

/* ---------- Tabs (фон #dd264954 как TabHost) ---------- */
.comm__topbar {
  display: flex; align-items: stretch;
  background: rgba(38,73,84,0.867);
  border-bottom: 1px solid #ffd65233;
  min-height: 40px;
  flex-shrink: 0;
}
.comm__back { display: none; }
.comm__tabs {
  display: flex; gap: 0; flex: 1;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.comm__tabs::-webkit-scrollbar { display: none; }
.comm__tab {
  background: none; border: 0;
  color: #8fa8ad;
  padding: 10px 12px;
  font-family: 'Coda', 'Rajdhani', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap; cursor: pointer;
  border-bottom: 2px solid transparent;
  flex: 1;
}
.comm__tab.active {
  color: #ffd652;
  border-bottom-color: #ffd652;
  text-shadow: 0 0 8px #ffd65288;
}
.comm__tab.locked { opacity: .4; cursor: wait; }

/* ---------- RangeFilter (LOCAL / REGION / GLOBAL) ---------- */
.comm__range {
  padding: 8px 14px;
  background: #13303f;
  border-bottom: 1px solid #ffd65222;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.comm__range-slider {
  flex: 1; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: #ffd65244;
  outline: none;
}
.comm__range-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 16px;
  background: #ffd652; cursor: pointer;
  border: 0;
  box-shadow: 0 0 8px #ffd65288;
}
.comm__range-slider::-moz-range-thumb {
  width: 12px; height: 16px;
  background: #ffd652; cursor: pointer; border: 0;
}
.comm__range-value {
  color: #ffd652; font-size: 12px;
  font-weight: 700; letter-spacing: .08em;
  min-width: 56px; text-align: right;
}
.comm__range.hidden { display: none; }

/* ---------- Список сообщений ---------- */
.comm__list {
  flex: 1; overflow-y: auto;
  padding: 8px 12px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.comm__list::-webkit-scrollbar { width: 4px; }
.comm__list::-webkit-scrollbar-thumb { background: #ffd65244; }

.comm__empty {
  text-align: center; padding: 40px 20px;
  color: #5d6b6b; font-size: 13px;
  letter-spacing: .15em; text-transform: uppercase;
  font-weight: 700;
}
.comm__loading {
  text-align: center; padding: 20px;
  color: #ffd652; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Compose (MessagePane) ---------- */
.comm__compose {
  display: flex; align-items: stretch;
  border-top: 1px solid #ffd65233;
  background: #13303f;
  padding: 6px;
  gap: 6px;
  flex-shrink: 0;
}
.comm__input {
  flex: 1; min-width: 0;
  border: 1px solid #5d6b6b55;
  outline: none;
  background: #061018;
  color: #cfe5e5;
  padding: 6px 10px;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 14px;
  letter-spacing: .02em;
}
.comm__input::placeholder { color: #6f6f6f; }
.comm__input:disabled { background: #0a0e14; color: #5d6b6b; }
.comm__send {
  background: #ffd65222;
  border: 1px solid #ffd65266;
  color: #ffd652;
  cursor: pointer;
  padding: 0 14px;
  min-height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Coda', 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .14em;
}
.comm__send svg { width: 18px; height: 18px; stroke-width: 2.5; }
.comm__send:active { background: #ffd65244; }
.comm__send:disabled { opacity: .3; cursor: not-allowed; }
