/* Trading Platform Specific Styles */

/* Financial Dashboard Cards */
.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
  margin: 16px 0;
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
  margin-top: 0;
  color: #37474f;
  font-size: 1.2em;
  font-weight: 600;
  border-bottom: 2px solid #ffc107;
  padding-bottom: 8px;
}

/* Stock Price Display */
.stock-price {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 2em;
  font-weight: 700;
  margin: 16px 0;
}

.stock-price.positive {
  color: #00c853;
}

.stock-price.negative {
  color: #d32f2f;
}

.stock-change {
  font-size: 0.9em;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.stock-change.positive {
  background: rgba(0, 200, 83, 0.1);
  color: #00c853;
}

.stock-change.negative {
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
}

/* Portfolio Summary */
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.portfolio-metric {
  background: linear-gradient(135deg, #37474f 0%, #455a64 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.portfolio-metric h4 {
  margin: 0 0 8px 0;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.portfolio-metric .value {
  font-size: 1.8em;
  font-weight: 700;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.portfolio-metric .change {
  font-size: 0.8em;
  margin-top: 4px;
}

/* Market Status Indicators */
.market-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-status.open {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.market-status.closed {
  background: rgba(158, 158, 158, 0.1);
  color: #9e9e9e;
  border: 1px solid #9e9e9e;
}

.market-status.pre-market {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid #ffc107;
}

.market-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

/* Trading Chart Container */
.chart-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 24px 0;
  border: 1px solid #e0e0e0;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.chart-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #37474f;
}

.chart-timeframe {
  display: flex;
  gap: 8px;
}

.timeframe-btn {
  padding: 4px 12px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 4px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeframe-btn:hover,
.timeframe-btn.active {
  background: #37474f;
  color: white;
  border-color: #37474f;
}

/* News and Analysis Cards */
.news-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  border-left: 4px solid #ffc107;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.news-card.bullish {
  border-left-color: #4caf50;
}

.news-card.bearish {
  border-left-color: #f44336;
}

.news-card.neutral {
  border-left-color: #9e9e9e;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.news-title {
  font-weight: 600;
  color: #37474f;
  font-size: 1em;
  line-height: 1.4;
}

.news-time {
  font-size: 0.8em;
  color: #9e9e9e;
  white-space: nowrap;
  margin-left: 12px;
}

.news-source {
  font-size: 0.8em;
  color: #666;
  font-weight: 500;
}

.sentiment-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.sentiment-badge.positive {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.sentiment-badge.negative {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.sentiment-badge.neutral {
  background: rgba(158, 158, 158, 0.1);
  color: #9e9e9e;
}

/* API Documentation Styling */
.endpoint {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  border-left: 4px solid #37474f;
}

.endpoint-method {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.endpoint-method.get {
  background: #4caf50;
  color: white;
}

.endpoint-method.post {
  background: #2196f3;
  color: white;
}

.endpoint-method.put {
  background: #ff9800;
  color: white;
}

.endpoint-method.delete {
  background: #f44336;
  color: white;
}

.endpoint-url {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 600;
  color: #37474f;
}

/* Response Examples */
.response-example {
  background: #1e1e1e;
  color: #f8f8f2;
  padding: 16px;
  border-radius: 8px;
  margin: 12px 0;
  overflow-x: auto;
}

.response-example pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Dark Mode Adjustments */
[data-md-color-scheme="slate"] .dashboard-card {
  background: #2d2d2d;
  border-color: #404040;
  color: #e0e0e0;
}

[data-md-color-scheme="slate"] .dashboard-card h3 {
  color: #e0e0e0;
}

[data-md-color-scheme="slate"] .chart-container {
  background: #2d2d2d;
  border-color: #404040;
}

[data-md-color-scheme="slate"] .news-card {
  background: #2d2d2d;
  color: #e0e0e0;
}

[data-md-color-scheme="slate"] .news-title {
  color: #e0e0e0;
}

[data-md-color-scheme="slate"] .endpoint {
  background: #2d2d2d;
  color: #e0e0e0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .portfolio-summary {
    grid-template-columns: 1fr;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .news-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .news-time {
    margin-left: 0;
    margin-top: 4px;
  }
}

/* Loading animations for real-time data */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

[data-md-color-scheme="slate"] .loading-shimmer {
  background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
  background-size: 200% 100%;
}
