/* =============================================
   CROP TO COINS — CSS EXCLUSIVO
   Segue o tema visual do SFLHub (dark, golden)
================================================ */

/* ====================
   HEADER DA PÁGINA
======================= */
.crop-to-coins-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 30px 8px 30px;
  border-bottom: 2px solid #3a3020;
}

.crop-to-coins-titulo {
  font-size: 22px;
  color: #ffa726;
  font-weight: bold;
  margin: 0;
  text-shadow: 1px 1px 3px #000;
  letter-spacing: 0.5px;
}

/* ====================
   CONTAINER DA SAÍDA
======================= */
#saida-crop-to-coins {
  padding: 24px 30px;
}

/* ====================
   TABELA CROP TO COINS
======================= */
.tabela-crops-coins {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #555;
  box-shadow: 0 0 10px #ff990044;
}

.tabela-crops-coins th,
.tabela-crops-coins td {
  padding: 8px 12px;
  text-align: center;
  border-right: 1px solid #3a3a3a;
  border-bottom: 1px solid #3a3a3a;
  vertical-align: middle;
}

.tabela-crops-coins td {
  font-weight: bold;
  text-align: center;
}

.tabela-crops-coins th:first-child,
.tabela-crops-coins td:first-child {
  text-align: center;
  padding-left: 14px;
}

.tabela-crops-coins th:last-child,
.tabela-crops-coins td:last-child {
  border-right: none;
}

.tabela-crops-coins tr:last-child td {
  border-bottom: none;
}

/* Cabeçalho */
.tabela-crops-coins thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.tabela-crops-coins th {
  background-color: #2b241a;
  color: #ffa726;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #d0a25a55;
  border-right: 1px solid #4a4a4a;
  text-shadow: 1px 1px 2px #000;
}

.tabela-crops-coins th:last-child {
  border-right: none;
}

/* Linhas alternadas */
.tabela-crops-coins tbody tr:nth-child(even) {
  background-color: #2c2c2c;
}

.tabela-crops-coins tbody tr:nth-child(odd) {
  background-color: #242424;
}

.tabela-crops-coins tbody tr:hover td {
  background-color: #2f2820;
  transition: background-color 0.15s ease;
}

/* Separador visual entre grupos (Crops / Frutas / GH) */
.tabela-crops-coins tr.separador-grupo td {
  background-color: #1e1a14;
  color: #d0a25a;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-bottom: 1px solid #3a3020;
  text-align: left;
}

/* ====================
   COLUNAS ESPECÍFICAS
======================= */

/* Coluna Recurso */
.tabela-crops-coins td.col-recurso {
  color: #e8dcc8;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

/* Coluna Coins */
.tabela-crops-coins td.col-coins {
  color: #ffe57a;
  font-weight: bold;
  min-width: 120px;
}

/* Coluna Market */
.tabela-crops-coins td.col-market {
  color: #a8d8a8;
  font-weight: bold;
  min-width: 130px;
}

/* Valor vazio (traço) */
.tabela-crops-coins td.col-coins:empty::after,
.tabela-crops-coins td.col-market:empty::after {
  content: '—';
  color: #555;
  font-weight: normal;
}

/* ====================
   ÍCONES INLINE NA TABELA
======================= */
.c2c-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  object-fit: contain;
  image-rendering: pixelated;
  margin-right: 4px;
}

.c2c-icon-coins {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  object-fit: contain;
  image-rendering: pixelated;
  margin-right: 3px;
}

.c2c-icon-flower {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  object-fit: contain;
  image-rendering: pixelated;
  margin-right: 3px;
}

/* ====================
   CABEÇALHO ORDENÁVEL
======================= */
.tabela-crops-coins th.th-ordenavel {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s;
}

.tabela-crops-coins th.th-ordenavel:hover {
  background-color: #3a3020;
}

.tabela-crops-coins th.th-ordenavel.asc::after {
  content: '';
  display: inline-block;
  margin-left: 7px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #27ae60;
  vertical-align: middle;
}

.tabela-crops-coins th.th-ordenavel.desc::after {
  content: '';
  display: inline-block;
  margin-left: 7px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #e74c3c;
  vertical-align: middle;
}

/* ====================
   BARRA DE FERRAMENTAS
   (filtro / busca acima da tabela)
======================= */
.c2c-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.c2c-toolbar input[type="text"] {
  padding: 7px 14px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #ffd54f;
  background-color: #2c2c2c;
  color: #f5f5f5;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 200px;
}

.c2c-toolbar input[type="text"]:focus {
  border-color: #ffa726;
  box-shadow: 0 0 6px #ffb74d80;
}

.c2c-toolbar input[type="text"]::placeholder {
  color: #888;
}

.c2c-filtro-grupo {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.c2c-filtro-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  border: 1px solid #555;
  background-color: #2c2c2c;
  color: #ccc;
  cursor: pointer;
  transition: all 0.2s;
}

.c2c-filtro-btn:hover {
  background-color: #3a3a3a;
  border-color: #ffa726;
  color: #ffa726;
  box-shadow: none;
}

.c2c-filtro-btn.active {
  background-color: #ffa726;
  border-color: #ffa726;
  color: #1e1e1e;
  box-shadow: 0 0 8px #ffb74d55;
}

/* ====================
   CARDS DE RESUMO
   (total de itens, etc.)
======================= */
.c2c-cards-resumo {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.c2c-card-resumo {
  background: linear-gradient(180deg, #2b241a 0%, #1c1812 100%);
  border: 2px solid #d0a25a55;
  border-radius: 12px;
  padding: 12px 20px;
  min-width: 130px;
  text-align: center;
  box-shadow: 0 4px 12px #0005;
  transition: border-color 0.2s;
}

.c2c-card-resumo:hover {
  border-color: #d0a25a;
}

.c2c-card-resumo h3 {
  font-size: 12px;
  color: #ffa726;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.c2c-card-resumo p {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin: 0;
}

/* ====================
   ESTADO VAZIO / LOADING
======================= */
.c2c-empty {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 15px;
}

.c2c-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: #ffa726;
  font-size: 14px;
  font-weight: bold;
}

.c2c-loader {
  width: 20px;
  height: 20px;
  border: 3px solid #ffffff22;
  border-top: 3px solid #ffa726;
  border-radius: 50%;
  animation: c2c-spin 0.8s linear infinite;
}

@keyframes c2c-spin {
  to { transform: rotate(360deg); }
}

/* ====================
   RESPONSIVIDADE
======================= */
@media (max-width: 700px) {
  #saida-crop-to-coins {
    padding: 14px 10px;
  }

  .crop-to-coins-page-header {
    padding: 14px 14px 8px 14px;
  }

  .tabela-crops-coins th,
  .tabela-crops-coins td {
    padding: 6px 8px;
    font-size: 12px;
  }

  .c2c-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .c2c-toolbar input[type="text"] {
    width: 100%;
    min-width: unset;
  }
}

/* ====================
   BUFF CARDS C2C
======================= */
.c2c-buffs-section {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 16px 30px 20px 30px;
  flex-wrap: wrap;
}

.c2c-buff-card {
  flex: 1 1 0;
  min-width: 200px;
  max-width: calc(50% - 8px);
  cursor: pointer;
  display: block;
}

.c2c-buff-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #444;
  background-color: #2c2c2c;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.c2c-buff-card:hover .c2c-buff-inner {
  border-color: #ffb74d;
  background-color: #3a3020;
}

.c2c-buff-card input[type="checkbox"] {
  display: none;
}

.c2c-buff-card input[type="checkbox"]:checked + .c2c-buff-inner {
  border-color: #ffa726;
  background-color: #3a2010;
  box-shadow: 0 0 10px #ffb74d55;
}

.c2c-buff-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}

.c2c-buff-card input[type="checkbox"]:checked + .c2c-buff-inner .c2c-buff-icon {
  box-shadow: 0 0 8px #ffb74d80;
}

.c2c-buff-texto {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c2c-buff-nome {
  font-size: 14px;
  font-weight: bold;
  color: #ffa726;
  text-shadow: 1px 1px 2px #000;
}

.c2c-buff-desc {
  font-size: 12px;
  color: #b0a090;
  line-height: 1.3;
}

/* responsivo: empilha em telas pequenas */
@media (max-width: 700px) {
  .c2c-buffs-section {
    padding: 12px 10px 16px 10px;
  }
  .c2c-buff-card {
    max-width: 100%;
  }
}