/* ==========================================
   MY STUFF PAGE (WATCHLIST) STYLES
   Minimalistic design following website theme
   ========================================== */

/* ==========================================
   NOTE: All color variables are defined in palette.css
   This file uses those variables for styling
   ========================================== */

/* ==========================================
   Section Headers
   ========================================== */
.stocks-listing-section .section-header {
  margin-bottom: var(--margin-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.stocks-listing-section .section-header h3 {
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stocks-listing-section .section-header h3 i {
  color: var(--color-primary);
  font-size: 1.35rem;
}

.stocks-listing-section .section-header .badge {
  background: rgba(203, 157, 240, 0.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(203, 157, 240, 0.25);
  font-size: 0.8125rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-family: ui-monospace, 'SF Mono', 'Monaco', monospace;
}

/* ==========================================
   Stats Sidebar - Right Column (Compact)
   ========================================== */
.watchlist-stats-sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 140px; /* Tight to content */
  margin-left: auto; /* Push to right edge */
}

.watchlist-stat-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.watchlist-stat-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.watchlist-stat-card .card-body {
  padding: var(--space-4) var(--space-3);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.watchlist-stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0;
  display: block;
  opacity: 0.9;
  transition: all var(--transition-fast);
}

.watchlist-stat-card:hover .stat-icon {
  transform: scale(1.1);
  opacity: 1;
}

.watchlist-stat-card .stat-icon.stocks {
  color: var(--color-highlight-purple);
}

.watchlist-stat-card .stat-icon.etfs {
  color: var(--color-highlight-pink);
}

.watchlist-stat-card .stat-icon.mutual-funds {
  color: var(--color-highlight-peach);
}

.watchlist-stat-card h3 {
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 1.375rem;
  margin-bottom: 0;
  font-family: ui-monospace, 'SF Mono', 'Monaco', monospace;
  letter-spacing: -0.02em;
  line-height: 1;
}

.watchlist-stat-card small {
  color: var(--color-text-tertiary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ==========================================
   ETFs & Mutual Funds Grid Integration
   ========================================== */
.stocks-listing-section .stocks-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

/* ==========================================
   Empty State Styling
   ========================================== */
.stocks-listing-section .empty-state-enhanced {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--color-bg-elevated);
  border: 2px dashed var(--color-border-default);
  border-radius: var(--radius-2xl);
  margin: var(--margin-8) 0;
}

.stocks-listing-section .empty-state-enhanced .empty-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, 
    rgba(203, 157, 240, 0.1), 
    rgba(240, 193, 225, 0.1)
  );
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--margin-6);
  color: var(--color-primary-light);
  font-size: 2.5rem;
  border: 1px solid var(--color-border-subtle);
}

.stocks-listing-section .empty-state-enhanced h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--margin-4);
  font-size: 1.5rem;
  font-weight: 600;
}

.stocks-listing-section .empty-state-enhanced p {
  color: var(--color-text-secondary);
  margin-bottom: var(--margin-6);
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  line-height: 1.6;
}

.stocks-listing-section .empty-state-enhanced .btn {
  font-size: 0.9375rem;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.stocks-listing-section .empty-state-enhanced .btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  color: white;
  box-shadow: var(--shadow-sm);
}

.stocks-listing-section .empty-state-enhanced .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stocks-listing-section .empty-state-enhanced .btn-outline-primary {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.stocks-listing-section .empty-state-enhanced .btn-outline-primary:hover {
  background: rgba(203, 157, 240, 0.1);
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
}

/* ==========================================
   Responsive Design - Mobile Optimization
   ========================================== */
@media (max-width: 991.98px) {
  /* Stack stats sidebar horizontally on tablets */
  .watchlist-stats-sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    justify-content: center;
    margin-bottom: var(--margin-8);
    gap: var(--space-4);
    max-width: 100%; /* Full width on mobile/tablet */
    margin-left: 0;
  }
  
  .watchlist-stat-card {
    flex: 0 1 auto; /* Don't grow, shrink if needed */
    min-width: 90px;
    max-width: 120px;
  }
  
  .watchlist-stat-card .card-body {
    padding: var(--space-4) var(--space-3);
  }
  
  .watchlist-stat-card .stat-icon {
    font-size: 1.35rem;
  }
  
  .watchlist-stat-card h3 {
    font-size: 1.25rem;
  }
  
  .watchlist-stat-card small {
    font-size: 0.65rem;
  }
}

@media (max-width: 767.98px) {
  /* Single column layout on mobile */
  .stocks-listing-section .section-header h3 {
    font-size: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  
  .watchlist-stat-card .stat-icon {
    font-size: 1.35rem;
  }
  
  .watchlist-stat-card h3 {
    font-size: 1.125rem;
  }
  
  .stocks-listing-section .empty-state-enhanced {
    padding: var(--space-12) var(--space-6);
  }
  
  .stocks-listing-section .empty-state-enhanced .empty-icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }
  
  .stocks-listing-section .empty-state-enhanced .d-flex {
    flex-direction: column !important;
    width: 100%;
  }
  
  .stocks-listing-section .empty-state-enhanced .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  /* Extra small screens - stack everything */
  .watchlist-stats-sidebar {
    flex-direction: column;
  }
  
  .watchlist-stat-card {
    max-width: 100%;
  }
}
