/* ============================================================
 * rooms.css — Discord kanal listesi (birebir)
 * ============================================================ */

.rooms-panel { display: flex; flex-direction: column; }

/* ---- Sunucu adı başlığı ---- */
.rooms-head {
  display: flex; align-items: center;
  padding: 0 16px;
  height: 48px; min-height: 48px; flex-shrink: 0;
  font-size: 15px; font-weight: 700;
  color: var(--head);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
  user-select: none;
}

/* ---- Kanal arama ---- */
.channel-search {
  display: block;
  width: calc(100% - 16px); margin: 8px;
  padding: 6px 8px;
  background: var(--panel3); border: none; border-radius: var(--radius-xs);
  color: var(--muted); font-size: 14px; font-weight: 500;
  cursor: pointer; flex-shrink: 0; outline: none;
}
.channel-search::placeholder { color: var(--muted); }
.channel-search:hover { color: var(--text); }

/* ---- Kanal listesi kaydırma alanı ---- */
.rooms-list {
  flex: 1; overflow-y: auto;
  padding: 0 0 8px;
}
.rooms-list::-webkit-scrollbar { width: 30px; }

/* ---- Kategori başlığı ---- */
.rooms-sep {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--muted); padding: 16px 8px 4px 8px;
  letter-spacing: .02em; line-height: 16px;
  display: flex; align-items: center; gap: 4px;
  cursor: pointer; user-select: none;
}
.rooms-sep:hover { color: var(--head); }
/* .rooms-title eski alias — artık .rooms-sep kullan */

/* ---- Kanal satırı ---- */
.room-item {
  display: flex; align-items: center;
  padding: 6px 8px; margin: 1px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer; user-select: none;
  color: var(--muted); font-size: 13px; font-weight: 500; line-height: 20px;
  min-height: 34px;
  transition: background .1s, color .08s;
  position: relative;
}
.room-item:hover { background: var(--room-hover); color: var(--text); }
.room-item.active {
  background: var(--room-active);
  color: var(--head);
  font-weight: 600;
}
.room-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 20%;
  height: 60%;
  width: 4px;
  background-color: var(--accent-purple);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--accent-purple);
}
.room-item.private { }
.room-item.private.active { background: var(--dm-active); }

/* ---- # / 🔊 ikonu ---- */
.room-item .r-icon {
  width: 20px; height: 20px;
  font-size: 20px; font-weight: 400;
  color: var(--muted); flex-shrink: 0;
  margin-right: 8px;
  display: flex; align-items: center; justify-content: center;
}
.room-item:hover .r-icon,
.room-item.active .r-icon { color: var(--head); }

/* ---- Okunmadı noktası ---- */
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--head); margin-left: auto; flex-shrink: 0;
}

/* ---- DM kapat butonu ---- */
.room-close {
  margin-left: auto; opacity: 0; font-size: 14px;
  color: var(--muted); line-height: 1; padding: 0 2px; flex-shrink: 0;
}
.room-item:hover .room-close { opacity: 1; }
.room-close:hover { color: var(--danger); }

/* ---- Yeni oda ekle ---- */
.room-add {
  display: flex; align-items: center;
  margin: 2px 8px; padding: 6px 8px; border-radius: var(--radius-xs);
  font-size: 16px; font-weight: 500; color: var(--muted); cursor: pointer;
  line-height: 20px;
}
.room-add:hover { background: var(--room-hover); color: var(--text); }

/* ---- Kapalı oda yeniden aç ---- */
.closed-room .reopen-btn {
  margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; flex-shrink: 0;
}
.closed-room:hover .reopen-btn { color: var(--online); }

/* ════════ B2: Kategori başlıkları (katlanabilir) ════════ */
.cat-head {
  display: flex; align-items: center; gap: 4px;
  padding: 16px 8px 4px 6px; cursor: pointer; user-select: none;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.cat-head:hover { color: var(--head); }
.cat-chev { font-size: 10px; transition: transform var(--dur-1, .12s) var(--ease, ease); }
.cat-head.collapsed .cat-chev { transform: rotate(-90deg); }
.cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-act { display: none; gap: 2px; }
.cat-head:hover .cat-act { display: flex; }
.cat-btn {
  width: 20px; height: 20px; border: none; background: none; cursor: pointer;
  color: var(--muted); border-radius: 5px; font-size: 12px; line-height: 1;
}
.cat-btn:hover { color: var(--head); background: var(--hover); }
.cat-add {
  margin: 6px 6px 2px; padding: 7px 10px; border: 1px dashed var(--border);
  border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600;
  transition: color var(--dur-1, .12s), border-color var(--dur-1, .12s);
}
.cat-add:hover { color: var(--accent); border-color: var(--accent); }
