/* Carrossel dos cards de empresa (company-inner), coração de favoritar,
   avaliações internas (google-rating: clamp, histograma, fotos, lightbox).
   Extraído de v2/layouts/main.blade.php — vivia inline no <head> porque
   dentro do root Vue das páginas <style>/<script> são engolidos. */

.card-carousel-wrap { position: relative; overflow: hidden; border-radius: inherit; }
.card-carousel { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.card-carousel::-webkit-scrollbar { display: none; }
.card-car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 2; }
.card-car-prev { left: 6px; }
.card-car-next { right: 6px; }
.card-carousel-wrap:hover .card-car-btn { opacity: 1; }
.card-car-btn i { font-size: 18px; color: #333; }
/* Mobile: só as bolinhas de posição (sempre visíveis); sem setas. */
@media (max-width: 767.98px) {
    .card-car-btn { display: none; }
}
.card-car-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 2; pointer-events: none; }
.card-car-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.4); }
.card-car-dot.on { background: #fff; }
/* selo ouro/prata (:before sem z-index) acima do carrossel (wrap relative + botões z2) */
.company-card[class*=stamp-]:before { z-index: 3; }
/* main.css fixa .details em image-height+16px; com a linha da avaliação
   o conteúdo estourava o card no mobile — cresce com o conteúdo. */
.company-card .details { height: auto; min-height: calc(var(--image-height) + 16px); }
.company-card .image { align-self: center; }
@media (max-width: 767.98px) {
    .company-card .details { padding-top: 12px; padding-bottom: 12px; }
}
.estrelas-input { display: inline-flex; flex-direction: row-reverse; font-size: 28px; }
.estrelas-input input { display: none; }
.estrelas-input label { color: #d7d7d7; cursor: pointer; padding: 0 2px; }
.estrelas-input input:checked ~ label, .estrelas-input label:hover, .estrelas-input label:hover ~ label { color: #f5a623; }
.estrelas-input--sm { font-size: 18px; }

/* Coração de favoritar: card (canto sup. direito da imagem, mesmo plano
   do selo ouro/prata) e botão maior do detalhe. */
.company-card .image { position: relative; }
.tp-fav-btn {
    position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px;
    border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.85);
    box-shadow: 0 1px 4px rgba(0,0,0,.25); display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: transform .1s;
}
.tp-fav-btn:hover { transform: scale(1.08); }
.tp-fav-btn i { font-size: 18px; color: #9aa1ab; }
.tp-fav-btn.on i { color: #c51d25; }
.tp-fav-btn-detail {
    display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #e8b6b8;
    background: #fff; color: #c51d25; border-radius: 10px; padding: 10px 18px;
    font-size: 14.5px; font-weight: 700; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.tp-fav-btn-detail:hover { background: #fdf3f3; }
.tp-fav-btn-detail.on { background: #c51d25; color: #fff; border-color: #c51d25; }
.tp-fav-btn-detail--compact { padding: 0; width: 42px; height: 42px; border-radius: 50%; justify-content: center; flex-shrink: 0; }
.tp-fav-btn-detail--compact i { font-size: 20px; }
.tp-fav-btn-detail i { font-size: 18px; }
.tp-avaliar-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #c51d25; color: #fff; border: 0;
    padding: 8px 14px; border-radius: 100px;
    font-size: 14px; font-weight: 700; line-height: 1;
    text-decoration: none; white-space: nowrap;
    transition: background .1s linear;
}
.tp-avaliar-btn:hover { background: #a5171e; color: #fff; }
.tp-avaliar-btn i { font-size: 16px; }

/* Clamp de 10 linhas + "Ver mais" nos cards de avaliação (google-rating.blade.php). */
.gr-text-wrap .gr-more-cb { display: none; }
.gr-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gr-more-cb:checked ~ .gr-clamp {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.gr-more-toggle {
    display: none; /* revelado por JS só quando há overflow */
    margin-top: 2px; cursor: pointer; text-align: center;
    color: #c51d25; line-height: 1;
}
.gr-text-wrap.has-overflow .gr-more-toggle { display: block; }
.gr-more-toggle i { font-size: 22px; display: inline-block; transition: transform .15s linear; }
.gr-more-cb:checked ~ .gr-more-toggle i { transform: rotate(180deg); }

/* Breakdown de notas (nota geral + histograma + médias por critério)
   das avaliações internas (google-rating.blade.php). */
.gr-dist-row { gap: 8px; margin-bottom: 6px; }
.gr-dist-label { width: 68px; flex-shrink: 0; }
.gr-dist-count { width: 32px; text-align: right; flex-shrink: 0; }
.gr-dist-track, .gr-crit-track {
    display: block; height: 8px; border-radius: 100px;
    background: #eceff1; overflow: hidden; flex-grow: 1;
}
.gr-dist-fill, .gr-crit-fill {
    display: block; height: 100%; border-radius: 100px;
    background: #1f8a3b;
}
/* Botão pequeno "Editar" dentro do card da própria avaliação. */
.gr-edit-mine {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 700; color: #c51d25;
    text-decoration: none; padding: 3px 8px; border-radius: 100px;
    border: 1px solid #f0c9cb; background: #fdf3f3; line-height: 1;
}
.gr-edit-mine:hover { background: #fdeaea; color: #a5171e; }
.gr-edit-mine i { font-size: 13px; }

/* Chips de subcategorias (HorizontalLinks) no mobile: a lista interna
   é um flex-item dimensionado por max-content, então ignorava a largura
   da coluna e empurrava o scroll horizontal da página. */
@media (max-width: 991.98px) {
    .submenu .horizontal-links { width: 100%; }
    .submenu #horizontal-links-list { flex: 1 1 100%; min-width: 0; }
}

/* Nenhum elemento pode gerar scroll horizontal da página (faixa branca
   lateral no mobile). `clip` (não `hidden`) não cria contexto de scroll,
   então position:sticky e os carrosséis seguem funcionando. */
html, body { overflow-x: clip; }

/* Faixa de fotos das avaliações internas (google-rating.blade.php). */
.gr-foto {
    display: block; width: 100%; aspect-ratio: 1 / 1;
    border-radius: 12px; overflow: hidden; border: 1px solid #e0e0e0;
    cursor: zoom-in;
}
.gr-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox das fotos dos clientes (overlay vanilla montado no body pelo
   ficha.js; desacoplado do Vue). */
.gr-lb {
    position: fixed; inset: 0; z-index: 2147483000; display: none;
    align-items: center; justify-content: center; background: rgba(0,0,0,.88);
}
.gr-lb.on { display: flex; }
.gr-lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; user-select: none; }
.gr-lb button {
    position: absolute; border: 0; cursor: pointer; color: #fff;
    background: rgba(255,255,255,.14); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.gr-lb button:hover { background: rgba(255,255,255,.28); }
.gr-lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 26px; line-height: 1; }
.gr-lb-prev, .gr-lb-next { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.gr-lb-prev i, .gr-lb-next i { font-size: 30px; }
.gr-lb-prev { left: 16px; }
.gr-lb-next { right: 16px; }
@media (max-width: 640px) {
    .gr-lb-prev { left: 6px; }
    .gr-lb-next { right: 6px; }
}
