/* Market Scanner Panel Styles */

/* Placeholder for Market Scanner Panel Image */
.market-scanner-panel-placeholder {
  width: 300px;
  height: 220px;
  background: var(--card-bg, rgba(26, 26, 26, 0.8));
  border: 2px solid var(--border-color, rgba(34, 197, 94, 0.2));
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 1rem;
}

.market-scanner-panel-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.15), transparent);
  animation: shimmer 3s infinite;
}

.market-scanner-panel-placeholder:hover {
  transform: scale(1.05) rotate(-1deg);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.scanner-icon-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.scanner-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scanner-icon:nth-child(2) {
  animation-delay: 0.5s;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.scanner-icon:nth-child(3) {
  animation-delay: 1s;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.scanner-icon:hover {
  transform: scale(1.1) rotate(-5deg);
}

.scanner-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #ffffff);
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.scanner-subtitle {
  font-size: 0.8rem;
  color: var(--secondary-text, #a1a1aa);
  text-align: center;
  opacity: 0.8;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.scanner-metrics {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.375rem;
}

.scanner-metric {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  text-align: center;
  flex: 1;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.scanner-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.1), transparent);
  transition: left 0.5s ease;
}

.scanner-metric:hover::before {
  left: 100%;
}

.scanner-metric:hover {
  transform: translateY(-2px);
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.scanner-metric-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-color, #ffffff);
  display: block;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scanner-metric-label {
  font-size: 0.55rem;
  color: var(--secondary-text, #71717a);
  margin-top: 0.125rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Animated scanning waves */
.scanning-wave {
  position: absolute;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.8), transparent);
  border-radius: 1px;
  animation: scanWave 2.5s linear infinite;
}

.wave-1 {
  top: 30%;
  left: 10%;
  animation-delay: 0s;
}

.wave-2 {
  top: 50%;
  right: 15%;
  animation-delay: 0.8s;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.8), transparent);
}

.wave-3 {
  top: 70%;
  left: 50%;
  animation-delay: 1.6s;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.8), transparent);
}

/* Stock ticker simulation */
.stock-ticker {
  position: absolute;
  top: 25%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(34, 197, 94, 0.3);
  overflow: hidden;
}

.ticker-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #22c55e;
  border-radius: 50%;
  top: -1.5px;
  animation: tickerMove 3s linear infinite;
}

.ticker-dot:nth-child(2) {
  animation-delay: 1s;
  background: #10b981;
}

.ticker-dot:nth-child(3) {
  animation-delay: 2s;
  background: #06b6d4;
}

/* Hide animations on very small screens to reduce clutter */
@media (max-width: 480px) {
  .scanning-wave,
  .stock-ticker {
    display: none;
  }
}

@keyframes scanWave {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100px);
    opacity: 0;
  }
}

@keyframes tickerMove {
  0% {
    left: -10px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: calc(100% + 10px);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
  }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Light mode adjustments */
html.light .market-scanner-panel-placeholder,
[data-theme="light"] .market-scanner-panel-placeholder {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(34, 197, 94, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.light .market-scanner-panel-placeholder:hover,
[data-theme="light"] .market-scanner-panel-placeholder:hover {
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.light .scanner-metric,
[data-theme="light"] .scanner-metric {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.15);
}

html.light .scanner-metric:hover,
[data-theme="light"] .scanner-metric:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

html.light .scanner-title,
[data-theme="light"] .scanner-title {
  color: var(--text-color, #0f172a);
}

html.light .scanner-subtitle,
[data-theme="light"] .scanner-subtitle {
  color: var(--secondary-text, #475569);
}

html.light .scanner-metric-number,
[data-theme="light"] .scanner-metric-number {
  color: var(--text-color, #0f172a);
}

html.light .scanner-metric-label,
[data-theme="light"] .scanner-metric-label {
  color: var(--secondary-text, #64748b);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .market-scanner-panel-placeholder {
    width: 280px;
    height: 200px;
  }
  
  .scanner-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .scanner-title {
    font-size: 0.95rem;
  }
  
  .scanner-subtitle {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .market-scanner-panel-placeholder {
    width: 100%;
    max-width: 320px;
    height: 180px;
    padding: 0.75rem;
    margin: 0 auto;
  }
  
  .scanner-icon-container {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .scanner-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 8px;
  }
  
  .scanner-title {
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
  }
  
  .scanner-subtitle {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }

  
  .scanner-metric {
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
  }
  
  .scanner-metric-number {
    font-size: 0.7rem;
  }
  
  .scanner-metric-label {
    font-size: 0.5rem;
  }
}

@media (max-width: 640px) {
  .market-scanner-panel-placeholder {
    width: 100%;
    max-width: 280px;
    height: 160px;
    padding: 0.625rem;
    margin: 0 auto;
  }
  
  .scanner-icon-container {
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    margin-top: 0.25rem;
  }
  
  .scanner-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    border-radius: 6px;
  }
  
  .scanner-title {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  
  .scanner-subtitle {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
  }
  
  .scanner-metric {
    padding: 0.15rem 0.3rem;
  }
  
  .scanner-metric-number {
    font-size: 0.65rem;
  }
  
  .scanner-metric-label {
    font-size: 0.45rem;
  }
}

@media (max-width: 480px) {
  .market-scanner-panel-placeholder {
    width: 100%;
    max-width: 260px;
    height: 140px;
    padding: 0.5rem;
    margin: 0 auto;
  }
  
  .scanner-icon-container {
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    margin-top: 0.125rem;
  }
  
  .scanner-icon {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    border-radius: 4px;
  }
  
  .scanner-title {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
  }
  
  .scanner-subtitle {
    font-size: 0.6rem;
    margin-bottom: 0.375rem;
  }
  
  .scanner-metric {
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
  }
  
  .scanner-metric-number {
    font-size: 0.6rem;
  }
  
  .scanner-metric-label {
    font-size: 0.4rem;
  }
}

@media (max-width: 360px) {
  .market-scanner-panel-placeholder {
    width: 100%;
    max-width: 240px;
    height: 120px;
    padding: 0.375rem;
    margin: 0 auto;
  }
  
  .scanner-icon-container {
    gap: 0.2rem;
    margin-bottom: 0.2rem;
  }
  
  .scanner-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
  
  .scanner-title {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
  }
  
  .scanner-subtitle {
    font-size: 0.55rem;
    margin-bottom: 0.25rem;
  }
  
  .scanner-metric {
    padding: 0.1rem 0.2rem;
  }
  
  .scanner-metric-number {
    font-size: 0.55rem;
  }
  
  .scanner-metric-label {
    font-size: 0.35rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .market-scanner-panel-placeholder,
  .scanner-icon,
  .scanning-wave,
  .ticker-dot {
    animation: none !important;
  }
  
  .market-scanner-panel-placeholder:hover,
  .scanner-icon:hover {
    transform: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .market-scanner-panel-placeholder {
    border-width: 3px;
    box-shadow: none;
  }
  
  .scanner-metric {
    border-width: 2px;
  }
}