/*
Theme Name: Viaje Barato
Theme URI: https://viajebarato-uxcpta72.manus.space
Author: MACUCO Media
Author URI: https://macuco.digital
Description: Tema editorial do Viaje Barato — hub de viagem econômica da rede MACUCO Media. Réplica fiel (pixel-perfect) do site original: paleta azul céu + laranja pôr-do-sol, Playfair Display + Inter, dimmer Dia/Crepúsculo/Noite, estrutura GEO/AEO completa (llms.txt, knowledge-graph.json, faq.json, JSON-LD), calculadoras de viagem e busca global Ctrl+K.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viajebarato
Tags: blog, news, custom-menu, featured-images, translation-ready
*/

/*
O CSS principal (compilado, fiel ao original) é carregado de assets/css/main.css
via wp_enqueue_style em functions.php. Este arquivo contém apenas complementos
específicos da versão WordPress (formulários nativos, toast, dialog da busca,
accordion <details>), preservando os tokens do design system.
*/

/* === Toast (substituto do sonner) === */
.vb-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  max-width: 22rem;
  padding: 0.85rem 1.1rem;
  border-radius: 0.625rem;
  background: oklch(0.25 0.03 250);
  color: oklch(0.985 0.008 85);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition:
    opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.vb-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.vb-toast--error {
  background: oklch(0.577 0.245 27.325);
}

/* === Dialog da busca global (Ctrl+K) === */
dialog#vb-search-dialog {
  width: min(90vw, 34rem);
  border: 1px solid oklch(0.91 0.012 85);
  border-radius: 0.875rem;
  padding: 0;
  background: oklch(1 0 0);
  color: oklch(0.25 0.03 250);
  box-shadow: 0 25px 60px rgb(0 0 0 / 0.25);
  margin: 10vh auto auto;
}
dialog#vb-search-dialog::backdrop {
  background: rgb(0 0 0 / 0.45);
  backdrop-filter: blur(2px);
}
dialog#vb-search-dialog[open] {
  animation: vb-dialog-in 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes vb-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
#vb-search-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid oklch(0.91 0.012 85);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: transparent;
  color: inherit;
}
#vb-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.5rem;
}
.vb-search-group-title {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.5 0.02 250);
}
.vb-search-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: inherit;
  text-decoration: none;
}
.vb-search-item:hover,
.vb-search-item:focus {
  background: oklch(0.955 0.01 85);
  color: oklch(0.55 0.14 245);
}
.vb-search-empty {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: oklch(0.5 0.02 250);
}

/* === Accordion nativo <details> (FAQ) === */
details.vb-accordion {
  border-bottom: 1px solid oklch(0.91 0.012 85);
}
details.vb-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
}
details.vb-accordion > summary::-webkit-details-marker {
  display: none;
}
details.vb-accordion > summary .vb-chevron {
  flex-shrink: 0;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
details.vb-accordion[open] > summary .vb-chevron {
  transform: rotate(180deg);
}
details.vb-accordion > .vb-accordion-body {
  padding: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: oklch(0.5 0.02 250);
}

/* === Slider nativo (calculadora de custo diário) === */
input[type="range"].vb-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 9999px;
  background: oklch(0.91 0.012 85);
  outline-offset: 4px;
}
input[type="range"].vb-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: oklch(0.55 0.14 245);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
  cursor: pointer;
}
input[type="range"].vb-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: oklch(0.55 0.14 245);
  border: 2px solid #fff;
  cursor: pointer;
}

/* === Inputs/selects nativos padronizados (paridade com shadcn) === */
.vb-field {
  width: 100%;
  height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid oklch(0.91 0.012 85);
  border-radius: 0.5rem;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: inherit;
}
.vb-field:focus {
  outline: 2px solid oklch(0.55 0.14 245 / 0.5);
  outline-offset: 1px;
  border-color: oklch(0.55 0.14 245);
}
textarea.vb-field {
  height: auto;
  padding: 0.6rem 0.75rem;
}
label.vb-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

/* === Botão do dimmer ativo === */
[data-dimmer-mode] {
  opacity: 0.55;
}
[data-dimmer-mode].is-active {
  opacity: 1;
}

/* === Menu móvel === */
#vb-mobile-nav[hidden] {
  display: none;
}

/* === Paginação WP === */
.vb-pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.vb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border: 1px solid oklch(0.91 0.012 85);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: inherit;
}
.vb-pagination .page-numbers.current {
  background: oklch(0.55 0.14 245);
  border-color: oklch(0.55 0.14 245);
  color: oklch(0.985 0.005 85);
}

/* Comentários WP básicos herdando o design system */
.comment-list {
  list-style: none;
  padding: 0;
}
