/* Guia de Plantas Aquáticas - estilo dedicado */
.plantas-container { max-width: 1100px; margin: 0 auto; }
.plantas-container .ferramenta-header h1 { margin: 0 0 6px 0; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.plantas-container .ferramenta-header p { color: #6b7280; margin: 0 0 16px 0; }

.busca-container { background: #f9fafb; padding: 16px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 20px; }
.busca-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.busca-group { flex: 1; min-width: 180px; }
.busca-input, .busca-select { 
  width: 100%; 
  padding: 10px; 
  border: 2px solid #e5e7eb; 
  border-radius: 8px; 
  font-size: 14px; 
  transition: all 0.2s ease;
}
.busca-input:focus, .busca-select:focus { border-color: #60a5fa; outline: none; }
.busca-input.filtering { border-color: #10b981; background-color: #f0fdf4; }
.busca-select.loading { 
  background: #f8fafc; 
  color: #6b7280; 
  cursor: not-allowed; 
  opacity: 0.8;
  position: relative;
  transition: all 0.3s ease;
}
.busca-select.loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.btn-buscar, .btn-limpar { padding: 10px 16px; border:0; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-buscar { background: #2563eb; color: #fff; }
.btn-buscar:hover { background: #1d4ed8; }
.btn-limpar { background: #6b7280; color: #fff; margin-left: 8px; }
.btn-limpar:hover { background: #4b5563; }

.resultados-container { position: relative; }
.loading { text-align: center; padding: 30px; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid #2563eb; border-radius: 50%; width: 38px; height: 38px; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.info-resultados { padding: 8px 0; color: #6b7280; }
.plantas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.planta-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); transition: transform .2s, box-shadow .2s; }
.planta-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.planta-imagem { height: 180px; background: #eef2ff; display:flex; align-items:center; justify-content:center; }
.planta-imagem img { width:100%; height:100%; object-fit: cover; }
.planta-imagem .noimg { color: #6b7280; font-size: 14px; }
.planta-info { padding: 14px; }
.planta-nome { margin: 0; font-size: 18px; color: #111827; }
.planta-cientifico { margin: 6px 0 10px; color: #6b7280; font-size: 13px; }
.planta-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag { 
  padding: 4px 8px; 
  border-radius: 999px; 
  font-size: 12px; 
  font-weight: 500; 
  cursor: help;
  position: relative;
  transition: all 0.2s ease;
}
.tag:hover { 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.tag.cat { background: #dcfce7; color: #166534; }
.tag.dif { background: #fef3c7; color: #92400e; }
.tag.luz { background: #e0f2fe; color: #075985; }
.tag.co2 { background: #fae8ff; color: #6b21a8; }

/* Tooltips */
.tag-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  max-width: 280px;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.tag-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
}

.tag:hover .tag-tooltip,
.tag.active .tag-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

/* Overlay para mobile */
.tooltip-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.tooltip-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Tooltip específico para mobile */
@media (max-width: 768px) {
  .tag-tooltip {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    z-index: 9999;
  }
  
  .tag-tooltip::after {
    display: none;
  }
  
  .tag.active .tag-tooltip {
    transform: translate(-50%, -50%);
  }
  
  .tag.active + .tooltip-overlay {
    opacity: 1;
    visibility: visible;
  }
}
.planta-acoes { display:flex; gap:10px; }
.btn-detalhes { flex:1; background:#2563eb; color:#fff; border:0; border-radius:8px; padding:10px; cursor:pointer; }
.btn-detalhes:hover { background:#1d4ed8; }

.paginacao { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.btn-pagina { background:#f3f4f6; border:0; padding:8px 12px; border-radius:8px; cursor:pointer; }
.btn-pagina:hover { background:#e5e7eb; }

.detalhes-modal { position: fixed; inset: 0; display: none; align-items:center; justify-content:center; background: rgba(0,0,0,0.35); z-index: 50; }
.detalhes-card { background:#fff; width:min(900px, 96vw); max-height: 90vh; overflow:auto; border-radius: 12px; padding: 18px; position: relative; }
.btn-fechar { position: absolute; top: 8px; right: 12px; background:#ef4444; color:#fff; border:0; border-radius: 8px; padding:6px 10px; cursor:pointer; }
.btn-fechar:hover { background:#dc2626; }
.detalhes h2 { margin: 8px 0 10px; }
.detalhes-imagem { height: 220px; background: #eef2ff; display:flex; align-items:center; justify-content:center; border-radius: 8px; overflow:hidden; }
.detalhes-imagem img { width:100%; height:100%; object-fit: cover; }
.detalhes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.row { display:flex; gap: 8px; font-size: 14px; }
.row .label { color:#6b7280; }
.row .valor { color:#111827; font-weight:600; }

@media (max-width: 768px) {
  .plantas-container > .ferramenta-header { display: none !important; }
  .plantas-grid { grid-template-columns: 1fr; }
}

