/* ===================================
   WIDGETS CSS
   Styles for external widgets and charts
   =================================== */

/* Widget Container */
.widget-container {
  height: 100%;
  min-height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #212529;
  position: relative;
}

/* Simplize Widget */
.simplize-widget-chart-overview {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.simplize-widget-chart-overview iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Widget Loading States */
.widget-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  background-color: #212529;
  color: #fff;
  font-size: 1.1rem;
}

.widget-loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #495057;
  border-top: 4px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Widget Error States */
.widget-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  background-color: #212529;
  color: #fff;
}

.widget-error .alert {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
  max-width: 80%;
}

/* TradingView Widget */
.tradingview-widget-container {
  height: 100%;
  min-height: 400px;
}

/* Responsive Widget Adjustments */
@media (max-width: 768px) {
  .widget-container {
    min-height: 350px;
  }

  .simplize-widget-chart-overview {
    min-height: 350px;
  }

  .tradingview-widget-container {
    min-height: 350px;
  }

  .technical-analysis-chart {
    min-height: 350px;
  }
}

@media (max-width: 576px) {
  .widget-container {
    min-height: 300px;
  }

  .simplize-widget-chart-overview {
    min-height: 300px;
  }

  .tradingview-widget-container {
    min-height: 300px;
  }

  .technical-analysis-chart {
    min-height: 300px;
  }
}
