/* onchain-intel-widget.css */
/* Estilos para o Módulo de Inteligência On-Chain, Baleias & Derivativos */

.onchain-section-container {
  margin-top: 40px;
  margin-bottom: 48px;
}

.onchain-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.onchain-section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.onchain-section-title {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.onchain-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.onchain-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  animation: onchainPulse 2s infinite;
}

@keyframes onchainPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.onchain-btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.onchain-btn-refresh:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
  color: #FFD700;
  transform: translateY(-1px);
}

/* Grid Principal */
.onchain-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .onchain-grid-v2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Card Container */
.onchain-card-v2 {
  background: linear-gradient(145deg, rgba(20, 24, 20, 0.75) 0%, rgba(13, 17, 13, 0.92) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.onchain-card-v2:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
}

.onchain-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 70%);
  pointer-events: none;
}

/* Header do Card */
.onchain-card-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.onchain-card-title-v2 {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.onchain-badge-source-v2 {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.onchain-badge-source-v2.deriv {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.onchain-badge-source-v2.onchain {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

/* KPI Banner */
.onchain-kpi-banner {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.onchain-kpi-item {
  display: flex;
  flex-direction: column;
}

.onchain-kpi-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.onchain-kpi-val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #FFFFFF;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.onchain-kpi-val.gold {
  color: #FFD700;
}

.onchain-kpi-sub {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

/* Tabs do Card */
.onchain-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.onchain-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.onchain-tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  color: #FFD700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.onchain-tab-btn:hover:not(.active) {
  color: #f1f5f9;
}

/* Callout Box de Diagnóstico */
.onchain-callout {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.onchain-callout.bull {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.onchain-callout.bear {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.onchain-callout.gold {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
  color: #fef08a;
}

.onchain-callout-title {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Feed List / Table */
.onchain-feed-container {
  flex: 1;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom Scrollbar */
.onchain-feed-container::-webkit-scrollbar {
  width: 5px;
}
.onchain-feed-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.onchain-feed-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}
.onchain-feed-container::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* Linha de Transação */
.onchain-tx-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.onchain-tx-item:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.onchain-tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.onchain-tx-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.onchain-tx-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.onchain-tx-flow {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.onchain-tx-meta {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.onchain-tx-meta a {
  color: #60a5fa;
  text-decoration: none;
}
.onchain-tx-meta a:hover {
  text-decoration: underline;
}

.onchain-tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.onchain-tx-amount-btc {
  font-size: 13px;
  font-weight: 700;
  color: #FFD700;
  font-family: 'Outfit', sans-serif;
}

.onchain-tx-amount-usd {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Barra de Liquidação Long vs Short */
.onchain-liq-bar-container {
  margin-bottom: 16px;
}

.onchain-liq-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.onchain-liq-bar-track {
  height: 14px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.onchain-liq-fill-long {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  height: 100%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.onchain-liq-fill-short {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
  height: 100%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ranking de Exchanges */
.onchain-exchange-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onchain-exchange-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.onchain-exchange-name {
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.onchain-exchange-values {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.onchain-exchange-val {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
}

.onchain-exchange-sub {
  font-size: 11px;
  color: #94a3b8;
}

/* Tabela de Saldo em Corretoras */
.onchain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.onchain-table th {
  text-align: left;
  padding: 8px 10px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.onchain-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #f1f5f9;
}

.onchain-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.onchain-change-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.onchain-change-tag.bull {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.onchain-change-tag.bear {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.onchain-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onchain-card-btn-action {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #FFD700;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.onchain-card-btn-action:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

/* Modal de Detalhes de Baleias */
.onchain-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.onchain-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.onchain-modal-content {
  background: #0f140f;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  width: 92%;
  max-width: 860px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.onchain-modal-overlay.active .onchain-modal-content {
  transform: scale(1);
}

.onchain-modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.onchain-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.onchain-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.onchain-modal-close:hover {
  color: #ffffff;
}

.onchain-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
