/* 
* technical-indicators.css
* أنماط المؤشرات الفنية لتطبيق TradingView API
*/

.technical-indicators {
  margin-top: 30px;
  border: 1px solid #e1e1e8;
  border-radius: 5px;
  padding: 20px;
}

.technical-indicators h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 10px;
}

.indicator-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
}

.indicator-tab {
  padding: 8px 15px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-weight: bold;
  transition: all 0.3s ease;
}

.indicator-tab:hover {
  color: #0088cc;
  background-color: rgba(0, 136, 204, 0.05);
}

.indicator-tab.active {
  color: #0088cc;
  border-bottom: 2px solid #0088cc;
}

.indicator-content {
  display: none;
  padding: 20px 0;
}

.indicator-content.active {
  display: block;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.indicator-card {
  background: white;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.indicator-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.indicator-card h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1em;
}

.indicator-value {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 15px 0;
}

.indicator-value.bullish {
  color: #22ab94;
}

.indicator-value.bearish {
  color: #f23645;
}

.indicator-value.neutral {
  color: #f39c12;
}

.indicator-scale {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #22ab94, #ffcf0f, #f23645);
  margin: 8px 0;
}

.indicator-explanation {
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
  line-height: 1.4;
}

.chart-canvas-container {
  position: relative;
  height: 120px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.indicator-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.indicator-value-row:last-child {
  border-bottom: none;
}

.indicator-label {
  color: #666;
  font-size: 0.9em;
}

.indicator-value-display {
  font-weight: bold;
  font-size: 0.9em;
}

.indicator-value-display.positive {
  color: #22ab94;
}

.indicator-value-display.negative {
  color: #f23645;
}

.chart-container {
  position: relative;
  height: 120px;
  margin-top: 15px;
}

.chart-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #e74c3c;
  font-size: 14px;
  text-align: center;
  background-color: #f8f8f8;
  border-radius: 4px;
  padding: 10px;
}

.indicator-chart-container {
  margin-top: 15px;
  height: 150px;
  width: 100%;
}

/* التصميم المستجيب */
@media (max-width: 768px) {
  .indicator-grid {
    grid-template-columns: 1fr;
  }
  
  .indicator-tabs {
    flex-wrap: wrap;
  }
  
  .indicator-tab {
    padding: 8px 10px;
    font-size: 0.9em;
  }
}

/* أنماط توضيحية للمؤشرات */
.rsi-explanation,
.macd-explanation,
.bollinger-explanation {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #777;
  margin-top: 5px;
}

.rsi-zones span {
  text-align: center;
}

/* أنماط للرسوم البيانية الصغيرة للمؤشرات */
.mini-chart {
  height: 40px;
  margin: 5px 0;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.indicator-info {
  margin-top: 15px;
  font-size: 0.9em;
  color: #666;
  text-align: center;
}

.indicator-list {
  padding-left: 20px;
  margin-top: 5px;
  list-style-type: disc;
}

.indicator-list li {
  color: #555;
  margin-bottom: 5px;
}

.indicator-chart {
  position: relative;
  height: 120px;
  margin-top: 15px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #777;
  margin-top: 5px;
}
