/* ==========================================================================
   css/components/folder-rail.css
   Split from app.html (build 2026.10.08.9-beta), original lines 376-537.
   Rules are in their ORIGINAL order; load order is defined in index.html.
   ========================================================================== */
/* -- SECONDARY FOLDER RAIL --------------------------------------- */
.folder-secondary-rail {
  /* Same width as .server-rail. At 72px it centred the same 48px icons with 12px either
     side against the main rail's 8px, so every icon in this rail sat 4px off the one beside
     it. */
  width: var(--rail-width);
  flex-shrink: 0;
  /* Frame rung, same as the server rail - the folder rail is part of the app frame
     (the reference keeps one colour across rail + folders + top bar). */
  background: var(--bg-void);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 0 0 68px;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}
.folder-secondary-rail::-webkit-scrollbar { display: none; }
.folder-secondary-rail.visible { display: flex; }
.folder-rail-header {
  width: 100%;
  padding: 10px 6px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  box-sizing: border-box;
}
/* Each open folder is its own stacked section in the secondary rail: a rounded,
   folder-coloured tinted column (modern-style), tint set inline per folder. */
/* Tinted folder column: snugly wraps the folder icon + its 48px server icons (not a
   stretched round pill) - narrow width, small gaps, modest corners. */
.folder-rail-section { width: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 6px; margin: 5px 0; border-radius: 14px; }
.folder-rail-section:last-child { margin-bottom: 0; }
.folder-rail-sec-header { display: flex; align-items: center; justify-content: center; padding: 3px 0 2px; line-height: 0; }

.server-item {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 2px;
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  transition: border-radius 0.25s var(--ease-out, ease), background 0.25s var(--ease-out, ease), color 0.2s, box-shadow 0.25s var(--ease-out, ease), transform 0.25s var(--ease-spring, ease);
  overflow: hidden;
  user-select: none;
}
.server-item:hover .server-icon { box-shadow: 0 4px 16px var(--accent-glow); }

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
/* Rift home/DM button: small logo sitting on a themed backdrop (like a server icon).
   Always a rounded squircle (consistent rounding), never the circle. */
/* Home button: the shield sits on the SAME colour as the server rail (--bg-void), so the
   backdrop blends into the rail instead of showing as a lighter grey box. */
.rift-home-icon { background: var(--bg-void); padding: 4px; box-sizing: border-box; border-radius: var(--radius-md); }

.server-item:hover .server-icon,
.server-item.active .server-icon {
  border-radius: var(--radius-md);
}

.server-item.active .server-icon {
  background: linear-gradient(135deg, var(--accent-bright, var(--accent)) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow), 0 2px 6px rgba(0,0,0,.35);
}
/* Home button keeps its grey backdrop when selected - no purple accent wash.
   Selection is shown by the white pip on the left + the squircle shape. */
.server-item.active .rift-home-icon { background: var(--bg-void); box-shadow: 0 2px 8px rgba(0,0,0,.35); }

.server-pip {
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  background: var(--text-primary);
  border-radius: 0 4px 4px 0;
  transition: transform 0.3s var(--ease-spring, ease), height 0.3s var(--ease-spring, ease);
  height: 8px;
}

.server-item:hover .server-pip { transform: translateY(-50%) scaleY(1); height: 20px; }
.server-item.active .server-pip { transform: translateY(-50%) scaleY(1); height: 40px; background: #fff; }

.server-sep {
  width: 32px;
  height: 1px;
  background: var(--border-strong);
  margin: 6px 0;
}

.server-add {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 24px;
  cursor: pointer;
  transition: border-radius 0.2s, background 0.2s;
}
.server-add:hover { border-radius: var(--radius-md); background: var(--green); color: #fff; }
.server-add.active { border-radius: var(--radius-md); background: var(--accent); color: #fff; }
#discoveryRailBtn { color: var(--text-muted); }
#discoveryRailBtn:hover { background: var(--accent); color: #fff; }
#adminRailBtn { color: var(--text-muted); }
#adminRailBtn:hover { background: var(--accent); color: #fff; }
#discoveryRailBtn.active { background: var(--accent); border-radius: var(--radius-md); color: #fff; }

.server-notif {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-void);
  animation: badge-pop 0.3s var(--ease-spring, ease);
}

