/* ========================================
   COMPARAR VOOS - BENETRIP v3.1
   Mobile-first · igual ao descobrir-destinos
   Cores: Laranja #E87722 · Azul #00A3E0
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600&display=swap');

:root {
    --orange: #E87722;
    --orange-dark: #D66A1A;
    --orange-light: #FFF3E8;
    --blue: #00A3E0;
    --blue-dark: #0091CC;
    --blue-light: #E6F7FF;
    --green: #2ECC71;
    --green-dark: #27AE60;
    --green-light: #E8F8F0;
    --red: #E74C3C;
    --red-light: #FDEDEC;
    --yellow: #F39C12;
    --yellow-light: #FEF9E7;
    --gray-dark: #21272A;
    --gray-medium: #666;
    --gray-light: #F5F7FA;
    --gray-border: #E0E4E8;
    --white: #FFFFFF;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ══════════════════════════════════════════
   CONTAINER — mobile-first igual ao descobrir
   ══════════════════════════════════════════ */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── HEADER ─────────────────────────────── */
.header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.logo { height: 42px; }
.tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--orange);
}

/* ── HERO ────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--orange) 0%, #F59E42 100%);
    padding: 40px 0 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; }
.hero-avatar {
    width: 80px; height: 80px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
    padding: 0 16px;
}
.hero-section p {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.6;
}

/* ══════════════════════════════════════════
   FORMULÁRIO — igual ao descobrir-destinos
   ══════════════════════════════════════════ */
.form-section {
    margin-top: -32px;
    position: relative;
    z-index: 10;
    padding-bottom: 32px;
}
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    /* padding igual ao descobrir-destinos */
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}

/* Cada campo ocupa largura total — SEM form-row de 2 colunas no mobile */
.form-group {
    margin-bottom: 28px;
}
.form-group label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;   /* igual ao descobrir-destinos */
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
}
.badge-limit {
    display: inline-block;
    background: rgba(232,119,34,.12);
    color: var(--orange);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
}

/* ── AUTOCOMPLETE ─────────────────────────── */
.autocomplete-wrapper { position: relative; }

/* Inputs grandes igual ao descobrir-destinos */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-xs);
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-dark);
}
.form-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,119,34,0.15);
}
.form-input::placeholder { color: #aaa; }

.autocomplete-results {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border: 2px solid var(--orange);
    border-top: none;
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: none;
}
.autocomplete-item {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background-color: var(--orange-light); }
/* v2.2: Visual diferenciado para cidades agrupadas (SAO, RIO, NYC, etc.) */
.autocomplete-city-group {
    background: #FFF8F0;
    border-left: 3px solid #E87722;
}
.autocomplete-city-group:hover {
    background: #FFF0E0;
}
.item-code {
    background-color: var(--orange);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    min-width: 45px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
.item-details { flex: 1; min-width: 0; }
.item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-country { font-size: 12px; color: var(--gray-medium); }

/* ── DATE CHIPS ──────────────────────────── */
.selected-dates {
    display: flex; flex-wrap: wrap;
    gap: 6px; margin-top: 8px;
}
.date-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--orange-light);
    border: 1px solid var(--orange);
    color: var(--gray-dark);
    padding: 6px 12px; border-radius: 20px;
    font-size: 13px; font-weight: 500;
    font-family: 'Poppins', sans-serif;
    animation: chipIn .2s ease;
}
@keyframes chipIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.date-chip .remove-chip {
    cursor: pointer; color: var(--orange);
    font-weight: 700; font-size: 16px;
    line-height: 1; opacity: .7;
    display: flex; align-items: center; justify-content: center;
    min-width: 20px; min-height: 20px;
}
.date-chip .remove-chip:hover { opacity: 1; }

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--orange) !important;
    border-color: var(--orange) !important;
    color: var(--white) !important;
}

/* ── COMBO INFO ──────────────────────────── */
.combo-info {
    display: flex; align-items: center; gap: 8px;
    background: var(--blue-light);
    border: 1px solid var(--blue);
    border-radius: var(--radius-xs);
    padding: 12px 16px;
    margin-bottom: 28px;
    font-size: 14px; color: var(--gray-dark);
    font-family: 'Poppins', sans-serif; font-weight: 500;
}
.combo-icon { font-size: 18px; }

/* ══════════════════════════════════════════
   PASSAGEIROS — full width, touch-friendly
   (igual ao familia-grid do descobrir-destinos)
   ══════════════════════════════════════════ */
.pax-selector {
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-xs);
    overflow: hidden;
}
.pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gray-light);
    transition: background .2s;
}
.pax-row + .pax-row {
    border-top: 1px solid var(--gray-border);
    background: var(--white);
}
.pax-row:first-child { background: rgba(232,119,34,.05); }

.pax-info { flex: 1; }
.pax-label {
    font-family: 'Poppins', sans-serif;
    font-size: 15px; font-weight: 600;
    color: var(--gray-dark);
    display: flex; align-items: center; gap: 8px;
}
.pax-label .pax-icon { font-size: 20px; }
.pax-desc {
    font-size: 12px;
    color: var(--gray-medium);
    margin-top: 2px;
}
.pax-desc.free-tag { color: var(--green-dark); font-weight: 600; }

/* Stepper — botões grandes para toque */
.pax-stepper {
    display: flex; align-items: center;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--white);
}
.pax-btn {
    width: 44px; height: 44px;
    border: none;
    background: transparent;
    font-size: 24px; font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-dark);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.pax-btn:hover:not(:disabled) { background: var(--orange-light); color: var(--orange); }
.pax-btn:active:not(:disabled) { background: var(--orange); color: var(--white); }
.pax-btn:disabled { opacity: .3; cursor: not-allowed; }

.pax-count {
    min-width: 48px; text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 20px; font-weight: 700;
    color: var(--gray-dark);
    border-left: 1.5px solid var(--gray-border);
    border-right: 1.5px solid var(--gray-border);
    padding: 0 6px;
    line-height: 44px;
    user-select: none;
}
.pax-count.has-value { color: var(--orange); }
.pax-total-hint {
    font-size: 13px; color: var(--gray-medium);
    margin-top: 10px; text-align: center;
    font-family: 'Poppins', sans-serif;
}
.pax-total-hint strong { color: var(--orange); }

/* ══════════════════════════════════════════
   MOEDA — full width, igual ao descobrir
   ══════════════════════════════════════════ */
.currency-chips {
    display: flex;
    gap: 12px;
}
.currency-chip {
    flex: 1;
    padding: 14px 8px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-xs);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 14px; font-weight: 600;
    color: var(--gray-dark);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.currency-chip:hover { border-color: var(--blue); background: var(--blue-light); }
.currency-chip.active {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

/* ── SUBMIT ──────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 18px;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 18px; font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(232,119,34,0.35);
    margin-top: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-submit:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(232,119,34,0.45); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── LOADING ─────────────────────────────── */
.loading-section { display: none; padding: 40px 0; }
.loading-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.loading-avatar {
    width: 120px; height: 120px;
    margin-bottom: 24px;
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.loading-card h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--orange); font-size: 22px;
    margin-bottom: 24px;
}
.progress-container { margin: 0 auto 16px; }
.progress-track {
    width: 100%; height: 12px;
    background: var(--gray-border);
    border-radius: 6px; overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--blue));
    width: 0%; transition: width 0.5s ease;
}
.loading-msg { font-size: 15px; color: var(--gray-medium); margin-top: 12px; }
.loading-sub { font-size: 13px; color: var(--blue); margin-top: 8px; font-weight: 500; }

/* ── RESULTADOS ──────────────────────────── */
.results-section { display: none; padding: 24px 0 80px; }

.btn-back {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 20px;
    background: var(--white); color: var(--orange);
    border: 2px solid var(--orange);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    margin-bottom: 20px;
    -webkit-tap-highlight-color: transparent;
}
.btn-back:hover { background: var(--orange); color: var(--white); }

/* ── TRIP SUMMARY ────────────────────────── */
.trip-summary {
    background: var(--white);
    border-radius: var(--radius); padding: 20px 16px;
    margin-bottom: 16px; box-shadow: var(--shadow);
    text-align: center;
}
.trip-route {
    display: flex; align-items: center;
    justify-content: center; gap: 12px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.trip-city { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.trip-code {
    font-family: 'Poppins', sans-serif;
    font-size: 24px; font-weight: 800;
    color: var(--gray-dark); letter-spacing: 2px;
}
.trip-name {
    font-size: 12px; color: var(--gray-medium);
    max-width: 110px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.trip-arrow { color: var(--orange); flex-shrink: 0; }
.trip-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.meta-chip {
    font-size: 12px; color: var(--gray-medium);
    background: var(--gray-light);
    padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}

/* ══════════════════════════════════════════
   PRICE MATRIX — scroll nativo + fade visual
   ══════════════════════════════════════════ */

/* O card em si não rola — só expõe o título */
.matrix-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 0 20px;   /* sem padding lateral — o scroll vai até a borda */
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;       /* corta a sombra do fade nas pontas */
    position: relative;
}

/* Título e subtítulo com padding lateral */
.matrix-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px; font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 4px;
    padding: 0 16px;
}
.matrix-subtitle {
    font-size: 13px; color: var(--gray-medium);
    margin-bottom: 4px;
    padding: 0 16px;
}

/* Dica de scroll — só aparece em telas pequenas */
.matrix-scroll-hint {
    font-size: 11px; color: var(--blue);
    margin-bottom: 8px; font-style: italic;
    padding: 0 16px;
    display: flex; align-items: center; gap: 4px;
}
.matrix-scroll-hint::before { content: '👉'; font-style: normal; }

/* A ÁREA QUE ROLA — cobre toda a largura do card */
.matrix-scroll-wrapper,
.matrix-section > .price-matrix,   /* caso o JS coloque diretamente */
.matrix-section > table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    display: block;
    width: 100%;
    padding: 8px 16px 12px; /* espaço interno para não cortar sombra da célula */
}

/* Fade gradiente na borda direita para indicar que tem mais conteúdo */
.matrix-section::after {
    content: '';
    position: absolute;
    top: 60px; right: 0; bottom: 0;   /* começa abaixo do título */
    width: 40px;
    background: linear-gradient(to left, rgba(255,255,255,0.95) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Quando scrollado até o fim, esconde o fade */
.matrix-section.scrolled-end::after { display: none; }

/* A tabela em si: min-width garante scroll quando necessário */
.price-matrix {
    border-collapse: separate;
    border-spacing: 3px;
    /* mobile: colunas compactas */
    min-width: 0;
    width: max-content;   /* cresce conforme o conteúdo, não além */
}

/* Cabeçalhos compactos */
.price-matrix th {
    font-family: 'Poppins', sans-serif;
    font-size: 11px; font-weight: 600;
    color: var(--gray-medium);
    padding: 6px 4px; text-align: center;
    white-space: nowrap;
}
.price-matrix th.col-header {
    background: var(--blue-light); color: var(--blue-dark);
    border-radius: 6px;
    min-width: 72px;    /* largura mínima de cada coluna de data */
}
.price-matrix th.row-header {
    background: var(--orange-light); color: var(--orange-dark);
    border-radius: 6px; text-align: right;
    padding-right: 8px;
    min-width: 72px;
}
.price-matrix th.corner-cell { position: relative; min-width: 56px; }
.corner-labels { font-size: 9px; color: var(--gray-medium); }
.corner-ida   { position: absolute; bottom: 4px; right: 6px; }
.corner-volta { position: absolute; top: 4px; left: 6px; }

/* Células compactas — legíveis mas não largas demais */
.matrix-cell {
    text-align: center;
    padding: 8px 4px;       /* ← compacto */
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 700;  /* ← ligeiramente menor */
    position: relative; border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    white-space: nowrap;
    min-width: 72px;    /* garante espaço para "R$ 1.243" */
}
.matrix-cell:active { opacity: 0.8; }
.matrix-cell.cheapest  { background: var(--green-light);  color: var(--green-dark);  border-color: var(--green); }
.matrix-cell.mid       { background: var(--blue-light);   color: var(--blue-dark); }
.matrix-cell.expensive { background: var(--orange-light); color: var(--orange-dark); }
.matrix-cell.no-data   { background: var(--gray-light);   color: var(--gray-medium); opacity: .5; cursor: default; }
.matrix-cell.selected  { border-color: var(--gray-dark);  box-shadow: 0 0 0 2px rgba(33,39,42,0.25); }

.matrix-noites {
    display: block;
    font-size: 9px; font-weight: 400;
    opacity: .7; margin-top: 2px;
}

/* ── WINNER CARD ─────────────────────────── */
.winner-card {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    border-radius: var(--radius); padding: 24px 20px;
    color: var(--white); margin-bottom: 16px;
    position: relative; overflow: hidden;
    box-shadow: 0 8px 32px rgba(46,204,113,0.3);
}
.winner-card::before {
    content: ''; position: absolute;
    top: -30%; right: -15%;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.winner-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px; border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 12px;
}
.winner-row {
    display: flex; flex-direction: column; gap: 16px;
}
.winner-price {
    font-family: 'Poppins', sans-serif;
    font-size: 36px; font-weight: 800; line-height: 1.1;
}
.winner-price-label { font-size: 13px; opacity: .85; margin-top: 4px; }
.winner-dates-box {
    background: rgba(255,255,255,0.15);
    padding: 12px 18px; border-radius: var(--radius-xs);
    text-align: center; align-self: flex-start;
}
.winner-date-lbl { font-size: 10px; opacity: .7; text-transform: uppercase; }
.winner-date-val { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 700; }
.winner-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px;
    background: var(--white); color: var(--green-dark);
    border: none; border-radius: var(--radius-xs);
    font-family: 'Poppins', sans-serif;
    font-size: 15px; font-weight: 700;
    text-decoration: none; transition: var(--transition);
    cursor: pointer; width: 100%;
    -webkit-tap-highlight-color: transparent;
}
.winner-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* ── STATS ROW ───────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; margin-bottom: 16px;
}
.stat-card {
    background: var(--white); border-radius: var(--radius-sm);
    padding: 16px 12px; text-align: center;
    box-shadow: var(--shadow);
}
.stat-label { font-size: 11px; color: var(--gray-medium); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--gray-dark); }
.stat-value.green  { color: var(--green-dark); }
.stat-value.blue   { color: var(--blue); }
.stat-value.orange { color: var(--orange); }

/* ── TRIPINHA TIP ────────────────────────── */
.tripinha-tip {
    background: var(--orange-light);
    border-left: 4px solid var(--orange);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px; margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 12px;
}
.tripinha-tip-avatar { width: 48px; height: 48px; flex-shrink: 0; }
.tripinha-tip-text { font-size: 14px; color: var(--gray-dark); line-height: 1.6; }
.tripinha-tip-text strong { color: var(--orange); }

/* ── COMBO DETAIL ────────────────────────── */
.combo-detail-section {
    background: var(--white);
    border-radius: var(--radius); padding: 20px 16px;
    margin-bottom: 16px; box-shadow: var(--shadow);
    border-top: 4px solid var(--blue);
}
.combo-detail-header { margin-bottom: 16px; }
.combo-detail-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px; font-weight: 700; color: var(--gray-dark);
}
.combo-detail-sub { font-size: 13px; color: var(--gray-medium); margin-top: 4px; }

/* ── SORT CHIPS ──────────────────────────── */
.sort-filter-row {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 12px;
}
.sort-label {
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 600;
    color: var(--gray-medium);
    text-transform: uppercase; letter-spacing: .5px;
}
.sort-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 14px;
    border: 2px solid var(--gray-border);
    background: var(--white);
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 500; color: var(--gray-dark);
    cursor: pointer; transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.sort-chip:hover { border-color: var(--blue); background: var(--blue-light); }
.sort-chip.active { border-color: var(--blue); background: var(--blue); color: var(--white); }

/* ── FILTROS ─────────────────────────────── */
.filter-bar {
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
    padding: 12px 14px;
    background: var(--gray-light);
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius-xs);
    margin-bottom: 4px;
    cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.filter-bar:hover { background: #edf0f3; }
.filter-bar.has-active { border-color: var(--orange); background: var(--orange-light); }
.filter-bar-left { display: flex; align-items: center; gap: 8px; }
.filter-bar-icon { font-size: 16px; }
.filter-bar-title { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: var(--gray-dark); }
.filter-active-badge {
    background: var(--orange); color: var(--white);
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px; display: none;
}
.filter-active-badge.visible { display: inline; }
.filter-results-count { font-size: 12px; color: var(--gray-medium); }
.filter-bar-right { display: flex; align-items: center; gap: 8px; }
.filter-toggle-icon { font-size: 14px; color: var(--gray-medium); transition: transform .3s; }
.filter-toggle-icon.open { transform: rotate(180deg); }
.btn-clear-all {
    font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600;
    color: var(--orange); background: none; border: none;
    cursor: pointer; padding: 0; display: none; text-decoration: underline;
}
.btn-clear-all.visible { display: block; }

.filter-panel {
    background: var(--white);
    border: 1.5px solid var(--gray-border);
    border-top: none;
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    padding: 0; max-height: 0; overflow: hidden;
    transition: max-height .4s cubic-bezier(0.4,0,0.2,1), padding .4s;
    margin-bottom: 12px;
}
.filter-panel.open { max-height: 1200px; padding: 16px; border-color: var(--orange); }

.filter-section { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--gray-border); }
.filter-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.filter-section-title {
    font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--gray-medium); margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}

.filter-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-check-item {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-border);
    border-radius: 20px; cursor: pointer;
    font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 500;
    color: var(--gray-dark); user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.filter-check-item:hover { border-color: var(--blue); background: var(--blue-light); }
.filter-check-item.checked { border-color: var(--blue); background: var(--blue); color: var(--white); }
.fci-check {
    width: 14px; height: 14px; border: 1.5px solid currentColor;
    border-radius: 3px; display: flex; align-items: center;
    justify-content: center; font-size: 9px; flex-shrink: 0;
}
.filter-check-item.checked .fci-check::after { content: '✓'; }
.fci-count { font-size: 10px; opacity: .7; }

.time-blocks { display: flex; gap: 6px; flex-wrap: wrap; }
.time-block {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius-xs); cursor: pointer;
    background: var(--white); flex: 1; min-width: 70px;
    -webkit-tap-highlight-color: transparent;
}
.time-block:hover { border-color: var(--blue); background: var(--blue-light); }
.time-block.checked { border-color: var(--orange); background: var(--orange-light); }
.time-block .tb-icon { font-size: 20px; margin-bottom: 2px; }
.time-block .tb-label { font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; color: var(--gray-dark); }
.time-block .tb-range { font-size: 10px; color: var(--gray-medium); }

.filter-range-group { margin-top: 6px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-input {
    flex: 1; -webkit-appearance: none;
    height: 6px; border-radius: 3px;
    background: var(--gray-border); outline: none; cursor: pointer;
}
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none; width: 24px; height: 24px;
    border-radius: 50%; background: var(--orange);
    box-shadow: 0 1px 4px rgba(232,119,34,.4); cursor: pointer;
}
.range-input::-moz-range-thumb {
    width: 24px; height: 24px; border: none;
    border-radius: 50%; background: var(--orange);
}
.range-value {
    font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 700;
    color: var(--orange); min-width: 64px; text-align: right;
}
.range-limits { display: flex; justify-content: space-between; font-size: 10px; color: var(--gray-medium); margin-top: 4px; }

.stops-options { display: flex; gap: 8px; flex-wrap: wrap; }
.stops-opt {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 16px; border: 2px solid var(--gray-border);
    border-radius: var(--radius-xs); cursor: pointer;
    background: var(--white); flex: 1; min-width: 72px;
    -webkit-tap-highlight-color: transparent;
}
.stops-opt:hover, .stops-opt.checked { border-color: var(--green); background: var(--green-light); }
.stops-opt-icon { font-size: 22px; margin-bottom: 4px; }
.stops-opt-label { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; color: var(--gray-dark); }
.stops-opt-count { font-size: 10px; color: var(--gray-medium); margin-top: 2px; }
.stops-opt.checked .stops-opt-label { color: var(--green-dark); }

.active-filter-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.active-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: var(--blue-light); border: 1px solid var(--blue);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; color: var(--blue-dark);
}
.active-tag .tag-remove { cursor: pointer; font-weight: 700; font-size: 12px; opacity: .7; }
.active-tag .tag-remove:hover { opacity: 1; }

.no-filter-results { text-align: center; padding: 32px 16px; color: var(--gray-medium); }
.no-filter-results .nfr-icon { font-size: 40px; margin-bottom: 12px; }
.btn-reset-filters {
    padding: 12px 20px; background: var(--orange); color: var(--white);
    border: none; border-radius: var(--radius-xs);
    font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── FLIGHT CARDS ────────────────────────── */
.flights-list { display: flex; flex-direction: column; gap: 12px; }
.flight-card {
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-sm); padding: 16px;
    transition: var(--transition); position: relative;
}
.flight-card:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); }
.flight-card.best-flight { border-color: var(--green); background: var(--green-light); }
.flight-card.best-flight::after {
    content: '⭐ Melhor opção';
    position: absolute; top: -10px; right: 16px;
    background: var(--green); color: var(--white);
    font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 700;
    padding: 2px 10px; border-radius: 10px;
}

/* Companhia e preço: empilhados no mobile */
.flight-top {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 12px;
}
.flight-airlines { display: flex; align-items: center; gap: 8px; }
.airline-logo { width: 32px; height: 32px; border-radius: 6px; background: var(--gray-light); }
.airline-names { font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-dark); }
.flight-price-box { display: flex; align-items: baseline; gap: 8px; }
.flight-price { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; color: var(--gray-dark); }
.flight-card.best-flight .flight-price { color: var(--green-dark); }
.flight-price-pp { font-size: 12px; color: var(--gray-medium); }
.flight-price-detail { font-size: 11px; color: var(--gray-medium); margin-top: 2px; }
.flight-price-detail .price-pax {
    display: inline-block; background: var(--blue-light); color: var(--blue-dark);
    padding: 1px 6px; border-radius: 4px; font-weight: 600;
}

.flight-summary {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-border);
}
.flight-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gray-dark); }
.tag-direct { color: var(--green-dark); font-weight: 600; }
.tag-warn   { color: var(--orange); }

/* Legs sempre em 1 coluna no mobile */
.flight-legs-container {
    display: grid; grid-template-columns: 1fr;
    gap: 16px; margin-top: 16px; padding-top: 16px;
    border-top: 1px dashed var(--gray-border);
}
.leg-column { display: flex; flex-direction: column; gap: 8px; }
.leg-column + .leg-column { border-top: 1px solid var(--gray-light); padding-top: 16px; }
.leg-label {
    font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--gray-medium); margin-bottom: 6px;
}
.leg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.leg-row + .leg-row { border-top: 1px dashed var(--gray-border); }
.leg-airline-logo { width: 24px; height: 24px; border-radius: 4px; background: var(--gray-light); flex-shrink: 0; }
.leg-info { flex: 1; min-width: 0; }
.leg-times { font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-dark); }
.leg-route { font-size: 12px; color: var(--gray-medium); }
.leg-details { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.leg-detail-chip { font-size: 11px; color: var(--gray-medium); background: var(--gray-light); padding: 2px 8px; border-radius: 8px; }
.leg-layover {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: var(--yellow-light);
    border-radius: var(--radius-xs); font-size: 12px; color: var(--yellow); font-weight: 500;
}
.leg-layover.overnight { background: var(--red-light); color: var(--red); }

/* Botão de reserva: full width */
.flight-action { margin-top: 12px; }
.btn-google-flights {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%;
    padding: 14px 20px;
    background: var(--blue); color: var(--white);
    border: none; border-radius: var(--radius-xs);
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.btn-google-flights:hover { background: var(--blue-dark); transform: translateY(-2px); }

/* ── SHARE ───────────────────────────────── */
.share-section {
    background: var(--white); border-radius: var(--radius);
    padding: 24px 16px; margin-top: 20px;
    box-shadow: var(--shadow); text-align: center;
}
.share-title { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--gray-dark); margin-bottom: 4px; }
.share-subtitle { font-size: 14px; color: var(--gray-medium); margin-bottom: 20px; }
.share-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-share {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px; border: none; border-radius: var(--radius-xs);
    font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600;
    cursor: pointer; width: 100%;
    -webkit-tap-highlight-color: transparent;
}
.btn-share svg { width: 20px; height: 20px; }
.btn-share-whatsapp { background: #25D366; color: var(--white); }
.btn-share-copy { background: var(--gray-light); color: var(--gray-dark); border: 2px solid var(--gray-border); }
.btn-share-copy.copied { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }

/* ── FOOTER / UTILITIES ──────────────────── */
.footer { text-align: center; padding: 24px; color: var(--gray-medium); font-size: 13px; }
.hidden { display: none !important; }
.no-flights-msg { text-align: center; padding: 32px 16px; color: var(--gray-medium); font-size: 15px; }
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════
   TABLET / DESKTOP — enriquece sem quebrar
   ══════════════════════════════════════════ */
@media (min-width: 560px) {
    .hero-section h1 { font-size: 30px; }
    .form-card { padding: 36px 32px; }
    .trip-code { font-size: 28px; }
    .winner-price { font-size: 42px; }
    .stats-row { grid-template-columns: repeat(3, 1fr); }
    .winner-row { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .winner-cta { width: auto; }
    .flight-top { flex-direction: row; align-items: center; justify-content: space-between; }
    .flight-price-box { flex-direction: column; align-items: flex-end; gap: 0; }
    .flight-legs-container { grid-template-columns: 1fr 1fr; gap: 24px; }
    .leg-column + .leg-column { border-top: none; padding-top: 0; }
    .sort-filter-row { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .share-buttons { flex-direction: row; justify-content: center; }
    .btn-share { width: auto; }
    .combo-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
}

/* ── Matrix: desktop — células maiores, sem fade ── */
@media (min-width: 560px) {
    .matrix-section::after { display: none; }
    .matrix-scroll-hint { display: none; }
    .matrix-cell { padding: 10px 8px; font-size: 13px; min-width: 80px; }
    .price-matrix th { font-size: 12px; padding: 8px 6px; }
    .price-matrix th.col-header,
    .price-matrix th.row-header { min-width: 80px; }
}
