/* ============================================
   FLASHR REUSABLE COMPONENTS
   Pre-built patterns using design system tokens
   ============================================ */

/* === HERO SECTIONS === */
.flashr-hero-section {
  padding: var(--space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.flashr-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.flashr-hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-6);
  color: var(--color-text-primary);
  text-shadow: 0 0 24px rgba(96, 165, 250, 0.25);
  letter-spacing: -0.02em;
}

.flashr-hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.flashr-hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* === STAT GRID === */
.flashr-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.flashr-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-card);
}

.flashr-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow:
    var(--shadow-elevated),
    0 0 0 1px rgba(251, 191, 36, 0.15);
}

.flashr-stat-label {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  font-weight: var(--font-weight-semibold);
}

.flashr-stat-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.flashr-stat-value.positive {
  color: var(--color-success);
}

.flashr-stat-value.negative {
  color: var(--color-danger);
}

.flashr-stat-change {
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
  font-weight: var(--font-weight-medium);
}

/* === METRIC CARDS === */
.flashr-metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.flashr-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow:
    var(--shadow-elevated),
    0 0 0 1px rgba(251, 191, 36, 0.15);
}

.flashr-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.flashr-metric-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.flashr-metric-badge {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--border-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flashr-metric-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.flashr-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.flashr-metric-row:last-child {
  border-bottom: none;
}

/* === DATA TABLES === */
.flashr-table-container {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  overflow: hidden;
}

.flashr-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.85);
}

.flashr-table thead {
  background: rgba(30, 41, 59, 0.9);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.flashr-table th {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flashr-table td {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.flashr-table tbody tr {
  transition: background var(--transition-fast);
}

.flashr-table tbody tr:hover {
  background: rgba(96, 165, 250, 0.12);
}

.flashr-table tbody tr:hover td {
  color: var(--color-text-primary);
}

.flashr-table tbody tr:last-child td {
  border-bottom: none;
}

/* === FORMS === */
.flashr-form-group {
  margin-bottom: var(--space-6);
}

.flashr-form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.flashr-form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  transition: all var(--transition-base);
}

.flashr-form-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.flashr-form-input::placeholder {
  color: var(--color-text-muted);
}

.flashr-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.flashr-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fbbf24' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
}

/* === CTA ROWS === */
.flashr-cta-row {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-8) 0;
}

.flashr-cta-section {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: var(--space-12) var(--space-8);
  text-align: center;
  margin: var(--space-16) 0;
}

.flashr-cta-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
  text-shadow: 0 0 24px rgba(96, 165, 250, 0.25);
}

.flashr-cta-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === FEATURE GRID === */
.flashr-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin: var(--space-12) 0;
}

.flashr-feature-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: var(--space-8);
  transition: all var(--transition-base);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.flashr-feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow:
    0 16px 56px 0 rgba(96, 165, 250, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(96, 165, 250, 0.3);
}

.flashr-feature-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
  display: block;
}

.flashr-feature-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.flashr-feature-description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* === ALERT/STATUS BANNERS === */
.flashr-alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--border-radius-md);
  border: 1px solid;
  margin: var(--space-4) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.flashr-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.flashr-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.flashr-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.flashr-alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-info);
  color: var(--color-info);
}

/* === RESPONSIVE OVERRIDES === */
@media (max-width: 1024px) {
  .flashr-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .flashr-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .flashr-hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .flashr-hero-subtitle {
    font-size: var(--font-size-base);
  }
  
  .flashr-stat-grid {
    grid-template-columns: 1fr;
  }
  
  .flashr-feature-grid {
    grid-template-columns: 1fr;
  }
  
  .flashr-cta-row {
    flex-direction: column;
  }
  
  .flashr-table-container {
    overflow-x: auto;
  }
  
  .flashr-table {
    min-width: 600px;
  }
  
  .flashr-metric-card {
    padding: var(--space-6);
  }
}

/* === DASHBOARD-SPECIFIC COMPONENTS === */

/* Network Icons */
.network-icon-avalanche {
  background: linear-gradient(135deg, #e84142 0%, #ff6b6b 100%);
  color: white;
}

.network-icon-solana {
  background: linear-gradient(135deg, #14f195 0%, #9945ff 100%);
  color: white;
}

/* Network Badges */
.badge-dev {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0f172a;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-soon {
  background: rgba(148, 163, 184, 0.2);
  color: var(--color-text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.logout-name {
  color: #ef4444;
}

/* Hero Band */
.hero-band {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.hero-grid-2 {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hero-stat-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-3);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-stat-box-purple {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(96, 165, 250, 0.45);
  padding: var(--space-3);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-quick-action {
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-btn {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #fcd34d;
  padding: 0.5rem 1rem;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
}

/* Trend Indicator Styles */
.trend-border-bottom {
  justify-content: space-around;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Monetization Sections */
.section-mt-8-mb-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.section-block {
  display: block;
}

.vault-stats-container {
  padding: var(--space-4);
}

.vault-stats-placeholder {
  color: var(--color-text-muted);
  padding: var(--space-8);
}

/* Community Vault Styles */
.community-vault-container {
  padding: var(--space-6);
}

.progress-container {
  margin-bottom: var(--space-8);
}

.progress-bar-bg {
  background: rgba(51, 65, 85, 0.5);
  border-radius: 0;
  height: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 0;
}

.community-stat-box {
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0;
  padding: var(--space-4);
}

.community-stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.community-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.pending-airdrop-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0;
  padding: var(--space-6);
}

.airdrop-claim-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  border: none;
  border-radius: 0;
  padding: var(--space-3) var(--space-8);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.how-it-works-box {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0;
  border-left: 3px solid #f59e0b;
}

/* Word Break Utilities */
.word-break-all {
  word-break: break-all;
}

/* Modal Styles */
.modal-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0;
  color: var(--color-text-primary);
  font-family: 'Inter', sans-serif;
}

.modal-max-w-700 {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-text-left {
  text-align: left;
  line-height: 1.7;
}

.disclaimer-box {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 0;
  padding: var(--space-5);
  margin: var(--space-6) 0;
}

.disclaimer-title {
  color: #fca5a5;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.disclaimer-text {
  margin-bottom: 0.75rem;
  color: #fecaca;
  font-weight: 500;
}

.disclaimer-list {
  padding-left: 1.5rem;
  color: #fecaca;
  margin-bottom: 0.75rem;
}

/* Button Gradients */
.btn-matic-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #6b7280 100%);
}

/* Grid Auto-Fit */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Modal Specific Spacing */
.modal-section-spacing {
  margin: var(--space-6) 0;
}

.modal-button-spacing {
  margin-top: var(--space-6);
}

.modal-btn-full {
  width: 100%;
}

/* Modal Content Styles */
.modal-heading-yellow {
  color: var(--color-accent-yellow);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.modal-paragraph {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

.modal-list {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--color-text-secondary);
}

.disclaimer-final-warning {
  margin: 0;
  color: #fecaca;
  font-weight: 600;
  font-size: 1.05rem;
}

.disclaimer-footer {
  margin-top: var(--space-4);
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.modal-max-w-700 {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-text-left {
  text-align: left;
  line-height: 1.7;
}

.modal-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0;
  color: var(--color-text-primary);
  font-family: 'Inter', sans-serif;
}

/* === TOGGLE SWITCH COMPONENT === */
.toggle-switch {
  position: relative;
  width: 80px;
  height: 40px;
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.toggle-switch.active {
  background: linear-gradient(135deg, var(--color-yellow-bright), #22d3ee);
  border-color: #22d3ee;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.toggle-switch.active .toggle-slider {
  transform: translateX(40px);
}

.toggle-label {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
}

.toggle-label.active {
  color: #22d3ee;
}

/* === AUTOMATION PAGE SPECIFIC === */
.automation-status-info {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.automation-main-grid {
  grid-template-columns: 2fr 1fr;
}

.trade-history-container {
  max-height: 500px;
  overflow-y: auto;
}

.trade-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--border-radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all var(--transition-base);
}

.trade-item:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.trade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.trade-type {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
}

.trade-type.loop {
  color: var(--color-success);
}

.trade-type.unwind {
  color: var(--color-danger);
}

.trade-time {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.trade-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.trade-detail {
  color: var(--color-text-secondary);
}

.trade-detail span {
  color: var(--color-text-muted);
}

.education-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu-list li {
  padding-left: var(--space-6);
  position: relative;
  margin-bottom: var(--space-3);
}

.edu-list li::before {
  content: '-';
  position: absolute;
  left: 0;
}

.empty-state {
  text-align: center;
}

.status-warning {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

@media (max-width: 768px) {
  .automation-main-grid {
    grid-template-columns: 1fr;
  }
}

/* === UTILITY CLASSES FOR TEXT COLORS === */
.text-muted {
  color: var(--color-text-muted);
}

.text-info {
  color: var(--color-info);
}

.text-yellow {
  color: var(--color-yellow-bright);
}

.text-danger {
  color: var(--color-danger);
}

/* === AUTOMATION SPECIFIC UTILITY CLASSES === */
.edu-heading {
  color: var(--color-info);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.edu-content {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.warning-text {
  color: var(--color-danger);
  font-weight: var(--font-weight-semibold);
}
