/* ============================================================
   PIRANOT — Header Mobile Refinement
   Data: 27 Feb 2026
   Remove ÚLTIMAS em mobile, refine chips, limpa header
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. ÚLTIMAS TICKER - OCULTO EM MOBILE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Esconder completamente em mobile */
  .pira-trending {
    display: none !important;
  }

  .pira-tag {
    display: none !important;
  }

  .pira-ticker {
    display: none !important;
  }
}

/* Manter visível no desktop */
@media (min-width: 769px) {
  .pira-trending {
    display: block;
  }
}

/* ─────────────────────────────────────────────────────────────
   2. SERVICE CHIPS - REFINADOS PARA MOBILE
   ───────────────────────────────────────────────────────────── */

.pira-service-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pira-service-chips {
  display: flex;
  gap: clamp(8px, 2vw, 16px);
  padding: clamp(12px, 3vw, 16px) 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.pira-chip {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 8px);
  padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  scroll-snap-align: start;
  cursor: pointer;
}

.pira-chip:hover {
  background: #f0f0f0;
  border-color: #0b3b8f;
  color: #0b3b8f;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(11, 59, 143, 0.15);
}

.pira-chip:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(11, 59, 143, 0.1);
}

.pira-chip svg {
  width: clamp(16px, 4vw, 20px);
  height: clamp(16px, 4vw, 20px);
  stroke: currentColor;
  fill: none;
  transition: transform 0.25s ease;
}

.pira-chip:hover svg {
  transform: scale(1.1);
}

/* ─────────────────────────────────────────────────────────────
   3. MOBILE - ULTRA COMPACTO
   ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .pira-service-bar {
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    margin: 0;
  }

  .pira-service-chips {
    padding: 10px 0;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
  }

  .pira-chip {
    padding: 8px 12px;
    font-size: 12px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    min-height: 36px;
  }

  .pira-chip svg {
    width: 16px;
    height: 16px;
  }

  /* Primeira chip com padding à esquerda */
  .pira-service-chips .pira-chip:first-child {
    margin-left: 0;
  }

  /* Última chip com padding à direita */
  .pira-service-chips .pira-chip:last-child {
    margin-right: 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   4. DESKTOP - COMPLETO
   ───────────────────────────────────────────────────────────── */

@media (min-width: 769px) {
  .pira-service-bar {
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
  }

  .pira-service-chips {
    gap: 16px;
    padding: 16px 0;
    justify-content: flex-start;
    overflow-x: visible;
  }

  .pira-chip {
    padding: 12px 16px;
    font-size: 14px;
    background: white;
    border: 1px solid #e0e0e0;
  }

  .pira-chip svg {
    width: 20px;
    height: 20px;
  }
}

/* ─────────────────────────────────────────────────────────────
   5. SCROLLBAR MELHORADO PARA MOBILE
   ───────────────────────────────────────────────────────────── */

.pira-service-chips::-webkit-scrollbar {
  height: 4px;
}

.pira-service-chips::-webkit-scrollbar-track {
  background: transparent;
}

.pira-service-chips::-webkit-scrollbar-thumb {
  background: rgba(11, 59, 143, 0.2);
  border-radius: 2px;
}

.pira-service-chips::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 59, 143, 0.4);
}

/* ─────────────────────────────────────────────────────────────
   6. ACCESSIBILITY
   ───────────────────────────────────────────────────────────── */

.pira-chip:focus-visible {
  outline: 2px solid #0b3b8f;
  outline-offset: 2px;
  border-radius: 20px;
}

/* Touch target mínimo */
@media (max-width: 768px) {
  .pira-chip {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ─────────────────────────────────────────────────────────────
   7. RESPONSIVE PADDING DO WRAP
   ───────────────────────────────────────────────────────────── */

.pira-service-bar .pira-wrap {
  padding: 0 clamp(12px, 3vw, 32px);
}

/* ─────────────────────────────────────────────────────────────
   8. ANIMAÇÃO SUAVE DE ENTRADA
   ───────────────────────────────────────────────────────────── */

.pira-chip {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pira-chip:nth-child(1) { animation-delay: 0.05s; }
.pira-chip:nth-child(2) { animation-delay: 0.1s; }
.pira-chip:nth-child(3) { animation-delay: 0.15s; }
.pira-chip:nth-child(4) { animation-delay: 0.2s; }

/* ─────────────────────────────────────────────────────────────
   9. RESPIRA VISUAL - NAO FICA POLUÍDO
   ───────────────────────────────────────────────────────────── */

.pira-service-bar {
  margin: 0;
  padding: 0;
  background: #fff;
}

/* Espaço entre header e chips */
.pira-nav {
  margin-bottom: 0;
}

.pira-service-bar {
  margin-top: 0;
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────────────────────
   10. ICON ALIGNMENT PERFEITO
   ───────────────────────────────────────────────────────────── */

.pira-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pira-chip svg {
  display: inline-block;
  flex-shrink: 0;
}
