/**
 * Página Criptomoedas - Design System
 * Cards alimentados pela API CoinGecko via crypto.js.
 * Imagens dos ícones vêm da própria CoinGecko (crypto.image).
 */

/* Hero */
.crypto-ds-hero .hero-body {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Loading state */
.crypto-ds-loading {
  min-height: 120px;
}

/* Cards container - gap entre linhas quando wrap */
.crypto-ds-cards-container > .column {
  margin-bottom: 1rem;
}

/* CoinGecko attribution */
.crypto-ds-coingecko-logo {
  display: inline-block;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.crypto-ds-coingecko-logo:hover {
  opacity: 1;
}

.crypto-ds-coingecko-img {
  height: 24px;
}

/* Sidebar sticky */
.crypto-ds-sidebar-sticky {
  position: sticky;
  top: 1rem;
}

.crypto-ds-sidebar-img {
  border-radius: 8px;
}

/* ===== Crypto cards (estilos preservados da página original) ===== */
.crypto-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 24px;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  height: 100%;
  display: flex;
  gap: 20px;
  position: relative;
}

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

.crypto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.crypto-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.crypto-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 16px;
  object-fit: cover;
}

.crypto-name {
  flex: 1;
}

.crypto-name h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.crypto-symbol {
  font-size: 0.875rem;
  color: #6c757d;
  text-transform: uppercase;
  margin: 0;
}

.crypto-price {
  font-size: 1.75rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 16px;
}

.crypto-changes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.change-item {
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: default;
  border: 2px solid transparent;
}

.change-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 4px;
  display: block;
}

.change-value {
  font-size: 0.875rem;
  font-weight: 600;
}

.change-positive {
  color: #28a745;
}

.change-negative {
  color: #dc3545;
}

.change-neutral {
  color: #6c757d;
}

.crypto-market-cap {
  font-size: 1rem;
  color: #45515c;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
  margin-top: auto;
}

.crypto-summary {
  padding-right: 10px;
}

.crypto-volume {
  font-size: 0.875rem;
  color: #6c757d;
  text-align: right;
  margin-top: 8px;
}

.crypto-price-us,
.crypto-volume-usd {
  font-size: 0.875rem;
  color: #45515c;
  margin-top: 4px;
  font-weight: 400;
  display: block;
}

/* Responsivo */
@media (max-width: 768px) {
  .crypto-card {
    flex-direction: column;
    padding: 16px;
    gap: 15px;
  }

  .crypto-header {
    margin-bottom: 12px;
  }

  .crypto-volume {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 14px;
    text-align: right;
    margin-top: 0;
  }

  .crypto-volume-usd {
    font-size: 13px;
    margin-top: 2px;
  }

  .crypto-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }

  .change-item {
    flex: 1;
    min-width: calc(33.333% - 6px);
    padding: 8px 6px;
  }

  .crypto-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
  }

  .crypto-name h4 {
    font-size: 1.1rem;
  }

  .crypto-price {
    font-size: 1.5rem;
  }

  .crypto-ds-coingecko-img {
    height: 20px;
  }
}

@media (max-width: 480px) {
  .crypto-header {
    margin-bottom: 8px;
  }

  .crypto-changes {
    gap: 6px;
  }

  .change-item {
    min-width: calc(33.333% - 4px);
    padding: 6px 4px;
  }

  .crypto-card {
    padding: 12px;
  }

  .crypto-volume {
    top: 12px;
    right: 12px;
    font-size: 13px;
  }

  .crypto-volume-usd {
    font-size: 12px;
  }

  .crypto-price-us {
    font-size: 0.75rem;
  }

  .crypto-ds-coingecko-img {
    height: 18px;
  }
}
