/**
 * Filename: public/stylesheets/nav-rail.css
 * Revision: 2025-12-18-01
 * Description: 65px icon navigation rail styles
 */

/* ===== NAV RAIL ===== */
.sidebar {
  width: 65px;
  min-width: 65px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  color: #5c6770;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
  z-index: 100;
}

.sidebar-plan {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-plan .plan-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  white-space: nowrap;
}

/* ===== NAVIGATION ===== */
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  color: #5c6770;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #f3f4f6;
  color: #2c3e50;
  text-decoration: none;
}

.nav-item.active {
  background: #e8f4fd;
  color: #0077c5;
  border-left-color: #0077c5;
}

.nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.nav-item.disabled::after {
  content: 'COMING SOON';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 1000;
}

.nav-item.disabled:hover::after {
  color: #6b7280;
}

.nav-has-popup.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-has-popup.disabled .nav-item {
  pointer-events: none;
}

.nav-has-popup.disabled .nav-popup {
  display: none !important;
}

.nav-has-popup.disabled::after {
  content: 'COMING SOON';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 1000;
}

.nav-has-popup.disabled:hover::after {
  color: #6b7280;
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

/* ===== POPUP SUBMENU ===== */
.nav-has-popup {
  position: relative;
}

.nav-has-popup > .nav-item {
  cursor: pointer;
}

.nav-has-popup.active-parent > .nav-item {
  color: #0077c5;
  border-left-color: #0077c5;
}

.nav-popup {
  position: fixed;
  left: 65px;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  padding: 8px 0;
  margin-top: -50px;
}

.nav-has-popup:hover .nav-popup {
  opacity: 1;
  visibility: visible;
}

.nav-popup-header {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.5px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 4px;
}

a.nav-popup-header {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

a.nav-popup-header:hover {
  color: #0077c5;
  text-decoration: none;
}

.nav-popup-item {
  display: block;
  padding: 10px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease;
}

.nav-popup-item:hover {
  background: #f3f4f6;
  color: #0077c5;
  text-decoration: none;
}

.nav-popup-item.active {
  color: #0077c5;
  font-weight: 600;
  background: #e8f4fd;
}

/* ===== SECTION LABELS & DIVIDERS ===== */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  padding: 16px 8px 4px;
  letter-spacing: 0.5px;
}

.nav-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 12px;
}

/* ===== MORE TOGGLE ===== */
.nav-more {
  color: #5c6770;
}

.nav-more:hover {
  background: #f3f4f6;
}

.nav-more.expanded {
  background: #f3f4f6;
  color: #2c3e50;
}

.nav-more-items {
  display: none;
  flex-direction: column;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.nav-more-items.expanded {
  display: flex;
}

.nav-more-items .nav-item {
  padding: 10px 8px;
}

.nav-more-items .nav-icon {
  width: 20px;
  height: 20px;
}

.nav-more-items .nav-label {
  font-size: 10px;
}

/* ===== THEME ICONS IN NAV ===== */
.sidebar .theme-icon-light {
  display: inline;
}

.sidebar .theme-icon-dark {
  display: none;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .sidebar {
  background: #0b1620;
  border-right: none;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .sidebar-plan {
  border-bottom-color: #1e3a5f;
}

[data-theme="dark"] .nav-item {
  color: #9ca3af;
}

[data-theme="dark"] .nav-item:hover {
  background: #1e3a5f;
  color: #f9fafb;
}

[data-theme="dark"] .nav-item.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-left-color: #3b82f6;
}

[data-theme="dark"] .nav-item.disabled {
  opacity: 0.4;
}

[data-theme="dark"] .nav-item.disabled::after,
[data-theme="dark"] .nav-has-popup.disabled::after {
  color: #6b7280;
}

[data-theme="dark"] .nav-section-label {
  color: #6b7280;
}

[data-theme="dark"] .nav-divider {
  background: #1e3a5f;
}

[data-theme="dark"] .nav-more {
  color: #9ca3af;
}

[data-theme="dark"] .nav-more:hover,
[data-theme="dark"] .nav-more.expanded {
  background: #1e3a5f;
  color: #f9fafb;
}

[data-theme="dark"] .nav-more-items {
  background: #0f1927;
  border-top-color: #1e3a5f;
}

[data-theme="dark"] .nav-popup {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

[data-theme="dark"] .nav-popup-header {
  color: #94a3b8;
  border-bottom-color: #334155;
}

[data-theme="dark"] a.nav-popup-header:hover {
  color: #60a5fa;
}

[data-theme="dark"] .nav-popup-item {
  color: #e2e8f0;
}

[data-theme="dark"] .nav-popup-item:hover {
  background: #334155;
  color: #60a5fa;
}

[data-theme="dark"] .nav-popup-item.active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .nav-has-popup.active-parent > .nav-item {
  color: #60a5fa;
  border-left-color: #3b82f6;
}

[data-theme="dark"] .sidebar .theme-icon-light {
  display: none;
}

[data-theme="dark"] .sidebar .theme-icon-dark {
  display: inline;
}
