/* Sağ hızlı menü — dar pencerede görünür */
.chat-rail {
  display: none;
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 125;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

html.layout-compact .chat-rail {
  display: flex;
  z-index: 1400;
  align-items: stretch;
  padding: 4px;
  gap: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.chat-rail-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

html.layout-compact .chat-rail.is-open .chat-rail-menu {
  display: flex;
}

html.layout-compact .chat-rail.is-open .rail-btn-toggle {
  background: var(--accent-l, #e3f0ff);
  color: var(--accent, #2979ff);
}

.rail-btn {
  width: 42px;
  height: 42px;
  border: none;
  background: #fff;
  border-radius: 10px;
  font-size: 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  flex-shrink: 0;
}

html.layout-compact .rail-btn-toggle {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.rail-btn-toggle[aria-expanded='true'] .icon {
  opacity: 0.85;
}

.rail-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
  font-weight: 700;
  background: #2979ff;
  color: #fff;
  border-radius: 8px;
  line-height: 16px;
  text-align: center;
}

.rail-badge.hidden {
  display: none;
}

html.layout-compact .chat-rail-has-notify .rail-btn-toggle::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2979ff;
  border: 2px solid #fff;
}

html.dark-mode.layout-compact .rail-btn-toggle,
html.dark-mode .chat-rail-menu {
  background: rgba(30, 36, 51, 0.96);
}

html.dark-mode .rail-btn {
  background: #2a3142;
  color: #e8eaed;
}

html.layout-compact .chat-rail-menu .rail-btn {
  color: #fff;
}

html.layout-compact .rail-btn-settings {
  background: linear-gradient(145deg, #7c4dff, #536dfe);
}

html.layout-compact .rail-btn-chats {
  background: linear-gradient(145deg, #00bfa5, #00c853);
}

html.layout-compact .rail-btn-rooms {
  background: linear-gradient(145deg, #ff6d00, #ff9100);
}

html.layout-compact .rail-btn-members {
  background: linear-gradient(145deg, #e91e63, #f50057);
}

html.layout-compact .rail-btn-room {
  background: linear-gradient(145deg, #00897b, #00acc1);
}

html.layout-compact .rail-btn-mod {
  background: linear-gradient(145deg, #7b1fa2, #9c27b0);
}

html.layout-compact .rail-btn-settings .icon,
html.layout-compact .rail-btn-chats .icon,
html.layout-compact .rail-btn-rooms .icon,
html.layout-compact .rail-btn-members .icon,
html.layout-compact .rail-btn-mod .icon,
html.layout-compact .rail-btn-room .icon {
  color: #fff;
  stroke: #fff;
}

html.layout-compact .rail-btn-toggle .icon {
  color: #3b4a54;
  stroke: #3b4a54;
}
