/* ==========================================================================
   Server Rail Styles
   72px left rail with VampChat home icon
   ========================================================================== */

.server-rail {
  width: var(--rail-width);
  height: 100%;
  background-color: var(--bg-server-rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
  z-index: 10;
  user-select: none;
}

.server-rail-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}

.server-rail-list::-webkit-scrollbar {
  display: none;
}

/* Separator Line */
.rail-divider {
  width: 32px;
  height: 2px;
  background-color: var(--bg-divider);
  border-radius: 1px;
  margin: 2px 0;
  flex-shrink: 0;
}

/* Rail Item Container */
.rail-item {
  position: relative;
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* White Pill on Far Left Edge */
.rail-pill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0px;
  background-color: #ffffff;
  border-radius: 0 4px 4px 0;
  transition: height 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s ease;
  pointer-events: none;
}

.rail-item:hover .rail-pill {
  height: 20px;
}

.rail-item.unread .rail-pill {
  height: 8px;
}

.rail-item.active .rail-pill {
  height: 40px;
}

/* Server Icon Button (Circle to Squircle animation) */
.rail-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  transition: border-radius 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, transform 0.12s ease;
  position: relative;
  overflow: visible;
}

.rail-icon-btn:active {
  transform: scale(0.94);
}

.rail-item:hover .rail-icon-btn,
.rail-item.active .rail-icon-btn {
  border-radius: 16px;
}

/* VampChat Home Button */
.rail-icon-btn.home-btn {
  background-color: #1a1216;
  color: #ffffff;
  padding: 0;
  overflow: hidden;
}

.rail-icon-btn.home-btn .vamp-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
}

.rail-icon-btn.home-btn:hover {
  filter: brightness(1.12);
}

/* Action Buttons (+ and Compass) */
.rail-icon-btn.action-btn {
  background-color: var(--bg-card);
  color: var(--brand-green);
}

.rail-icon-btn.action-btn.explore {
  color: var(--brand-green);
}

.rail-icon-btn.action-btn:hover {
  background-color: var(--brand-green);
  color: #ffffff;
}

.rail-icon-btn.action-btn.explore:hover {
  background-color: var(--brand-green);
  color: #ffffff;
}

/* Unread Badge */
.rail-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background-color: var(--brand-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  border: 3px solid var(--bg-server-rail);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
