/* WorkspaceSidebar CSS - High Fidelity "Prafrota" Style (Blue Theme) */

:root {
  /* Light Theme Variables (Prafrota Style) */
  --ws-bg: #ffffff;
  --ws-text: #475569;
  --ws-text-active: #0f172a;
  --ws-text-muted: #64748b;
  --ws-border: #f1f5f9;
  --ws-bg-search: #f8fafc;
  --ws-bg-hover: rgba(0, 0, 0, 0.03);
  --ws-tree-line: #e2e8f0;
  --ws-footer-bg: #f8fafc;
  --ws-user-card-bg: rgba(0, 0, 0, 0.01);
  --ws-toggle-bg: #ffffff;
  --ws-toggle-border: #e2e8f0;
  --ws-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  --ws-accent: #26b1c7; /* Workspace Blue */
  --ws-shadow-accent: rgba(38, 177, 199, 0.25);
}

.dark .ws-container {
  /* Dark Theme Variables (Prafrota Style) */
  --ws-bg: #1a1a1a;
  --ws-text: #ffffff;
  --ws-text-active: #141414;
  --ws-text-muted: #a0a0a0;
  --ws-border: rgba(255, 255, 255, 0.03);
  --ws-bg-search: #252525;
  --ws-bg-hover: rgba(255, 255, 255, 0.03);
  --ws-tree-line: #262626;
  --ws-footer-bg: #181818;
  --ws-user-card-bg: rgba(255, 255, 255, 0.02);
  --ws-toggle-bg: #262626;
  --ws-toggle-border: #333;
  --ws-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ws-container {
  width: 260px;
  height: calc(100vh - 20px);
  background: var(--ws-bg);
  color: var(--ws-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: var(--ws-shadow);
  border: 1px solid var(--ws-border);
}

/* Subtle Top Glow - Workspace Blue */
.ws-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ws-accent), transparent);
  opacity: 0.3;
}

.ws-container.collapsed {
  width: 80px;
}

/* Toggle Area */
.ws-toggle-container {
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
  min-height: 56px;
  align-items: center;
}

.collapsed .ws-toggle-container {
  justify-content: center;
}

.ws-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--ws-toggle-bg);
  border: 1px solid var(--ws-toggle-border);
  color: var(--ws-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ws-toggle-btn:hover {
  background: var(--ws-bg-search);
  color: var(--ws-accent);
  border-color: var(--ws-accent);
  transform: scale(1.05);
}

/* Search Box */
.ws-search-wrapper {
  padding: 0.5rem 1.25rem 1.5rem;
  transition: all 0.3s ease;
}

.collapsed .ws-search-wrapper {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
}

.ws-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--ws-bg-search);
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  color: var(--ws-text);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.ws-search-input:focus {
  border-color: var(--ws-accent);
  background: var(--ws-bg);
  box-shadow: 0 0 0 3px rgba(38, 177, 199, 0.1);
}

/* Navigation Content */
.ws-nav-content {
  flex: 1;
  padding: 0.5rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.ws-nav-content::-webkit-scrollbar {
  width: 3px;
}

.ws-nav-content::-webkit-scrollbar-thumb {
  background: var(--ws-border);
  border-radius: 10px;
}

/* Menu Item Wrapper */
.ws-item-wrapper {
  margin-bottom: 6px;
}

/* Links & Tree Structure */
.ws-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--ws-text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  gap: 14px;
}

.ws-link:hover:not(.active) {
  background: var(--ws-bg-hover);
  color: var(--ws-text);
}

.ws-link.active {
  background: var(--ws-accent) !important;
  color: var(--ws-text-active) !important;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--ws-shadow-accent);
}

.ws-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ws-link:hover .ws-icon:not(.active) {
  transform: scale(1.1);
}

.ws-label {
  flex: 1;
  font-size: 0.9rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.collapsed .ws-label,
.collapsed .ws-chevron {
  display: none;
}

.ws-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--ws-text-muted);
}

.ws-chevron.expanded {
  transform: rotate(180deg);
}

/* Submenu */
.ws-submenu {
  margin-left: 0.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--ws-tree-line);
  margin-top: 4px;
  margin-bottom: 8px;
}

.ws-sublink {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  color: var(--ws-text-muted);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
  gap: 12px;
}

.ws-sublink::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 0.75rem;
  height: 2px;
  background: var(--ws-tree-line);
}

.ws-sublink:hover {
  color: var(--ws-text);
  background: var(--ws-bg-hover);
}

.ws-sublink.active {
  color: var(--ws-accent);
  font-weight: 700;
}

/* Icons in sublink */
.ws-sublink.active .ws-icon {
  color: var(--ws-accent);
}

/* Footer Section */
.ws-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--ws-border);
  background: var(--ws-footer-bg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.collapsed .ws-footer {
  padding: 1.25rem 0.5rem;
  align-items: center;
}

/* Brand Area in Footer */
.ws-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-brand-logo {
  width: 36px;
  height: 36px;
  background: var(--ws-accent);
  color: var(--ws-text-active);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 0 15px var(--ws-shadow-accent);
  flex-shrink: 0;
}

.ws-brand-info {
  display: flex;
  flex-direction: column;
}

.ws-brand-name {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ws-text);
}

.ws-brand-name span {
  color: var(--ws-accent);
}

.ws-app-sub {
  font-size: 0.7rem;
  color: var(--ws-text-muted);
  font-weight: 600;
}
