/**
 * anjogiftfinder — Gift finder
 *
 * @author    André Forte
 * @copyright 2026 André Forte
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
 */
/* sem a moldura (card) que o tema põe à volta do conteúdo das páginas */
#module-anjogiftfinder-giftfinder #content.page-content { border: 0; box-shadow: none; background: transparent; padding: 0; }
.anjogf-banner { display: block; margin: 0 0 2rem; }
.anjogf-banner img { display: block; width: 100%; height: auto; }
.anjogf-intro { margin-bottom: 2.5rem; font-size: 1rem; line-height: 1.6; white-space: pre-line; }
.anjogf-step, .anjogf-results { animation: anjogf-in .25s ease-out; }
@keyframes anjogf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .anjogf-step, .anjogf-results { animation: none; }
  .anjogf-progress-fill { transition: none; }
  .anjogf-loading::before { animation-duration: 2s; }
}
.anjogf-progress { margin-bottom: 2rem; }
.anjogf-progress-bar { height: 6px; background: #e5e5e5; overflow: hidden; }
.anjogf-progress-fill { display: block; height: 100%; background: #232323; transition: width .25s ease-out; }
/* .anjogf à frente: temas como o at_movic têm p:last-child { margin: 0 }, mais específico do que uma classe */
.anjogf .anjogf-progress-text { margin: 1.25rem 0 0; font-size: .875rem; color: #545454; text-align: center; }
.anjogf-question, .anjogf-subtitle { text-align: center; }
.anjogf-question:focus, .anjogf-results-title:focus { outline: none; }
.anjogf-results-icon { margin-right: .5rem; font-size: 1.15em; }
.anjogf-subtitle { color: #545454; }
/* respostas centradas: cartões de largura fixa que quebram linha ao centro */
.anjogf-answers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 1.5rem 0; }
.anjogf-answers > .anjogf-answer { flex: 0 1 190px; }
.anjogf-display-images .anjogf-answers > .anjogf-answer { flex-basis: 220px; }
.anjogf-display-list .anjogf-answers { flex-direction: column; align-items: center; }
.anjogf-display-list .anjogf-answers > .anjogf-answer { flex: none; width: 100%; max-width: 480px; }
.anjogf-answer {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  min-height: 64px; padding: 16px; border: 2px solid #d6d6d6; border-radius: 0; background: #fff;
  color: #232323; font-size: 1rem; text-align: center; cursor: pointer;
}
.anjogf-display-list .anjogf-answer { align-items: flex-start; text-align: left; }
.anjogf-answer:hover { border-color: #7a7a7a; }
.anjogf-answer[aria-checked="true"] { border-color: #232323; box-shadow: inset 0 0 0 1px #232323; }
.anjogf-answer:focus-visible { outline: 3px solid #1d63c5; outline-offset: 2px; }
.anjogf-answer-image { max-width: 100%; height: auto; }
.anjogf-display-logos .anjogf-answer-image { max-height: 48px; width: auto; }
.anjogf-display-images .anjogf-answer-image { max-height: 140px; width: auto; }
.anjogf-answer-description { font-size: .875rem; color: #545454; }
.anjogf-nav, .anjogf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.anjogf-nav, .anjogf-results .anjogf-actions { justify-content: center; }
/* resumo das respostas num bloco cinzento (quebra o branco da página), com o Alterar à direita */
.anjogf-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: .75rem 0 1.5rem; padding: 1rem 1.25rem; background: #f2f2f2; }
.anjogf .anjogf-summary-text { flex: 1 1 320px; margin: 0; }
.anjogf-change { margin-left: auto; }
.anjogf-summary-label { font-weight: 600; }
.anjogf .anjogf-status { margin-bottom: 1.5rem; }
.anjogf-status:empty { display: none; }
/* a calcular as sugestões */
.anjogf-loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 0; text-align: center; }
.anjogf-loading::before { content: ""; width: 40px; height: 40px; border: 3px solid #e5e5e5; border-top-color: #232323; border-radius: 50%; animation: anjogf-spin .8s linear infinite; }
@keyframes anjogf-spin { to { transform: rotate(360deg); } }
/* Recomeçar: só texto sublinhado (sem as classes btn, que o tema transforma em botão) */
.anjogf-restart { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.anjogf-restart:hover { text-decoration: none; }
.anjogf-nav .anjogf-restart, .anjogf-actions .anjogf-restart { margin-left: .75rem; }
.anjogf-restart:focus-visible { outline: 3px solid #1d63c5; outline-offset: 2px; }
.anjogf-share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.5rem; }
.anjogf-share-label { width: 100%; margin: 0; font-weight: 600; }
.anjogf-share-url { flex: 1 1 220px; min-width: 0; }
/* grelha: as larguras vêm das colunas e do tema; em flex as linhas não ficam desalinhadas com alturas diferentes */
.anjogf-products > .product_list { width: 100%; }
.anjogf-row { display: flex; flex-wrap: wrap; }
.anjogf-row > .anjogf-item { float: none; clear: none !important; }
.anjogf-row > .anjogf-item .product-miniature { margin-left: auto; margin-right: auto; }
/* miniaturas de largura fixa (classic: 250px) encolhem para caber na coluna em ecrãs estreitos */
.anjogf-row > .anjogf-item { min-width: 0; }
.anjogf-row > .anjogf-item .product-miniature,
.anjogf-row > .anjogf-item .thumbnail-container,
.anjogf-row > .anjogf-item .product-description { max-width: 100%; }
.anjogf-row > .anjogf-item .thumbnail-container img { max-width: 100%; height: auto; }
.anjogf-copied { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 400px) {
  .anjogf-answers { gap: 8px; }
  .anjogf-answers > .anjogf-answer { flex: 0 1 calc(50% - 4px); padding: 12px 8px; }
  .anjogf-display-list .anjogf-answers > .anjogf-answer { flex: none; }
}

/* respostas dinâmicas: enquanto chega a pergunta seguinte, animação por cima da atual (só se demorar, sem piscar) */
.anjogf-step { position: relative; }
#anjogf-app[aria-busy="true"] .anjogf-step { pointer-events: none; }
.anjogf-busy { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: rgba(255, 255, 255, .92); color: #232323; font-weight: 600; opacity: 0; animation: anjogf-busy-in .2s .15s ease-out forwards; }
.anjogf-busy::before { content: ""; width: 40px; height: 40px; border: 3px solid #e5e5e5; border-top-color: #232323; border-radius: 50%; animation: anjogf-spin .8s linear infinite; }
@keyframes anjogf-busy-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .anjogf-busy { animation-duration: .01s; }
  .anjogf-busy::before { animation-duration: 2s; }
}
