/* US Market specific styles */
.us-market-symbols {
  display: flex;
  flex-wrap: wrap;
  margin-top: 15px;
  gap: 8px;
}

.symbol-tag {
  background-color: #f0f4f8;
  color: #2962ff;
  border: 1px solid #dbe1e8;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}

.symbol-tag:hover {
  background-color: #e3e9f2;
  border-color: #2962ff;
}

.symbol-tag::before {
  content: '$';
  font-weight: bold;
  color: #43a047;
  margin-left: 4px;
  font-size: 0.9em;
}

.exchange-selector {
  margin-bottom: 15px;
}

.exchange-selector button {
  background-color: #f0f4f8;
  color: #333;
  border: 1px solid #dbe1e8;
  border-radius: 4px;
  padding: 8px 15px;
  margin-right: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.exchange-selector button.active {
  background-color: #2962ff;
  color: white;
  border-color: #1e45e8;
}

.market-info {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.market-info h3 {
  color: #333;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 10px;
}

.market-info p {
  margin: 10px 0;
  line-height: 1.5;
}

.market-info strong {
  color: #0066cc;
}

.market-info.info-box {
  background-color: #f5f9ff;
  border-left: 4px solid #0066cc;
}

.market-info.info-box h3 {
  color: #0066cc;
}

.market-info ul {
  padding-left: 20px;
  margin: 10px 0;
}

.market-info li {
  margin-bottom: 8px;
  color: #444;
}

.stock-chart-placeholder {
  width: 100%;
  height: 180px;
  background-color: #f5f5f7;
  border: 1px dashed #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  color: #666;
}

/* US Sectors styling */
.us-sectors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sector-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sector-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  font-size: 1.2em;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 8px;
}

/* Make sector symbols a bit smaller than the main ones */
.sector-item .us-market-symbols {
  margin-top: 10px;
}

.sector-item .symbol-tag {
  font-size: 0.85em;
  padding: 4px 10px;
}

.chart-container {
  margin-top: 30px;
  margin-bottom: 30px;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h3 {
  margin: 0;
  font-size: 1.2em;
  color: #333;
}

.chart-wrapper {
  width: 100%;
  height: 400px;
  position: relative;
}

canvas#priceChart {
  width: 100% !important;
  height: 100% !important;
}

/* Data Sources Control Panel */
.data-sources-control-panel {
  background-color: #fff;
  border-radius: 8px;
  margin-top: 20px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.data-sources-control-panel h4 {
  color: #333;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #eaeaea;
}

.data-sources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.data-source-item {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  transition: all 0.3s ease;
}

.data-source-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.data-source-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.data-source-item-name {
  font-weight: bold;
  color: #2962ff;
}

.data-source-item-status {
  font-size: 0.85em;
  padding: 4px 8px;
  border-radius: 12px;
  background-color: #e8f5e9;
  color: #2e7d32;
}

.data-source-item-status.disconnected {
  background-color: #ffebee;
  color: #c62828;
}

.data-source-item-info {
  color: #666;
  font-size: 0.9em;
  margin: 10px 0;
  line-height: 1.4;
}

.data-source-item-actions {
  margin-top: 15px;
}

.data-source-select-btn {
  width: 100%;
  padding: 8px;
  background-color: #fff;
  border: 1px solid #2962ff;
  border-radius: 4px;
  color: #2962ff;
  cursor: pointer;
  transition: all 0.2s;
}

.data-source-select-btn:hover {
  background-color: #2962ff;
  color: #fff;
}

.data-source-select-btn.active {
  background-color: #2962ff;
  color: #fff;
}

/* Data Source Indicator in Chart Header */
.data-source-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #666;
}

.data-source-status {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  background-color: #e3f2fd;
  color: #1976d2;
}

.data-sources-dropdown {
  position: relative;
  margin-right: 15px;
}

.switch-data-source {
  padding: 6px 12px;
  background-color: #fff;
  border: 1px solid #2962ff;
  border-radius: 4px;
  color: #2962ff;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.switch-data-source:hover {
  background-color: #2962ff;
  color: #fff;
}

.data-sources-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  z-index: 1000;
  margin-top: 5px;
}

.data-source-option {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
}

.data-source-option:hover {
  background-color: #f5f9ff;
}

.data-source-name {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}

.data-source-desc {
  display: block;
  font-size: 0.85em;
  color: #666;
}
