/**
 * Filename: public/stylesheets/sidebar.css
 * Revision: 2025-12-04-03
 * Description: Centralized sidebar styles - adjusted badge for longer plan names
 */

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}

/* Sidebar Container - STICKY */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* Plan Badge */
.sidebar-plan {
  padding: 10px 16px 0;
  text-align: center;
}

.plan-wrapper {
  position: relative;
  display: inline-block;
}

.plan-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.plan-badge:hover {
  background: rgba(255,255,255,0.25);
}

/* Plan Tooltip */
.plan-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: white;
  color: #1f2937;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  padding: 12px 16px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 200;
  text-align: left;
}

.plan-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid white;
}

.plan-wrapper:hover .plan-tooltip {
  opacity: 1;
  visibility: visible;
}

.plan-tooltip-header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

.plan-tooltip-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.plan-tooltip-row .label {
  color: #6b7280;
}

.plan-tooltip-row .value {
  font-weight: 600;
  color: #1f2937;
}

.plan-tooltip-row.trial .value {
  color: #f59e0b;
}

.plan-change-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: #3b82f6;
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s;
}

.plan-change-btn:hover {
  background: #2563eb;
  color: white;
  text-decoration: none;
}

/* Sidebar Header */
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.logo-img {
  max-width: 180px;
  height: auto;
  object-fit: contain;
  margin-left: 10px;
  margin-top: 10px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-top: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,1);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  text-decoration: none;
}

.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
  border-left-color: #3b82f6;
}

.nav-icon {
  font-size: 24px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content Area - offset for fixed sidebar */
.main-content {
  flex: 1;
  background: #f8fafc;
  padding: 24px 32px;
  overflow-y: auto;
  margin-left: 240px;
  min-height: 100vh;
}