/* ============================================================
   Aba Oportunidades — fila unificada
   ============================================================ */

#tab-oportunidades {
  padding: 12px 12px 80px;
}

/* ----- Chips de tipo ----- */
.opp-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.opp-chips::-webkit-scrollbar { height: 4px; }

.opp-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid #88529d;
  background: #fff;
  color: #88529d;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  scroll-snap-align: start;
  white-space: nowrap;
  transition: all 0.18s;
}
.opp-chip:hover { background: #f4ecf9; }
.opp-chip.ativo {
  background: #88529d;
  color: #fff;
}
.opp-chip-badge {
  background: #ff4757;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  min-width: 18px;
  text-align: center;
}

.opp-cabecalho {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#opp-refresh {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* ----- Cards ----- */
#opp-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opp-vazio {
  text-align: center;
  padding: 40px 16px;
  color: #999;
  font-size: 14px;
}

.opp-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-left: 4px solid #ddd;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  user-select: none;
}
.opp-card:active { transform: scale(0.985); }
.opp-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.12); }

.opp-card-quente { border-left-color: #ff4757; }
.opp-card-morno  { border-left-color: #ff7f50; }
.opp-card-frio   { border-left-color: #ffd43b; }
.opp-card-sem    { border-left-color: #88529d; }

.opp-meu {
  background: #fff8e6;
  border-left-color: #ff9500;
}

.opp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 6px;
}
.opp-nivel { font-weight: 700; color: #444; }
.opp-score { background: #f4ecf9; color: #88529d; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.opp-tempo { margin-left: auto; color: #999; }

.opp-card-cliente {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.opp-card-cliente strong { font-size: 15px; color: #222; }
.opp-tel { font-size: 13px; color: #666; }

.opp-msg-cliente,
.opp-msg-flora {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  margin: 4px 0;
  line-height: 1.35;
}
.opp-msg-cliente { background: #f0f4f8; color: #333; }
.opp-msg-flora   { background: #fdf3fa; color: #555; font-style: italic; }

.opp-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
}
.opp-rapport,
.opp-vendedor-ant,
.opp-meu-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
}
.opp-rapport { background: #fff3cd; color: #846200; }
.opp-vendedor-ant { background: #e8f0fe; color: #1a5fc4; }
.opp-meu-badge { background: #ffe0b2; color: #b35900; font-weight: 600; }

/* ============================================================
   Fix scroll horizontal do bottom-nav (mobile)
   ============================================================ */
#bottom-nav {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* sombra à direita pra indicar "tem mais" */
  background-image:
    linear-gradient(to right, white 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), white 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.12), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.12), transparent) 100% 0;
  background-repeat: no-repeat;
  background-color: white;
  background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
#bottom-nav::-webkit-scrollbar { height: 3px; }
#bottom-nav .nav-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* ----- Sub-tabs Meus/Geral (chip Carrinhos) ----- */
.opp-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid #eee;
  padding-bottom: 6px;
}
.opp-subtab {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}
.opp-subtab.ativo {
  color: #88529d;
  border-bottom-color: #88529d;
}
.opp-subtab-count {
  background: #f0f0f0;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  min-width: 20px;
  text-align: center;
}
.opp-subtab.ativo .opp-subtab-count {
  background: #88529d;
  color: #fff;
}

/* ----- Cards de carrinho (estilo idêntico da aba antiga) ----- */
.ca-card {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 10px;
  border-left: 4px solid #ff7f50;
}
.ca-card.tipo-leilao { border-left-color: #ffd700; }
.ca-card.tipo-euquero { border-left-color: #00bcd4; }

.ca-card-badge-tipo {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
}
.ca-card-badge-tipo.leilao { background: #fff8e1; color: #b8860b; }
.ca-card-badge-tipo.euquero { background: #e0f7fa; color: #006064; }

.ca-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.ca-card-nome { font-weight: 600; font-size: 14px; color: #222; }
.ca-card-total { font-weight: 700; color: #2e7d32; font-size: 14px; }

.ca-card-foguinhos { font-size: 13px; margin-bottom: 6px; }
.ca-card-tempo { color: #999; font-size: 12px; }

.ca-card-produtos {
  margin: 6px 0;
  padding-left: 18px;
  font-size: 12px;
  color: #555;
}
.ca-card-produtos li { line-height: 1.4; }

.ca-card-acoes {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.ca-card-acoes button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:disabled { background: #ddd; color: #999; cursor: not-allowed; }
.btn-refazer { background: #88529d; color: #fff; }

/* ----- Toast notificação ----- */
#opp-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #88529d;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  font-size: 13px;
  font-weight: 500;
  white-space: pre-line;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  max-width: 90vw;
}
#opp-toast.opp-toast-visivel {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
