/**
 * Reset do Achadinhos WP — escopado.
 *
 * Até a 2.15.0 este reset era o style.css do tema `achadinhos-starter`, aplicado
 * GLOBALMENTE porque o tema era obrigatório. Desde a 3.0.0 o plugin renderiza suas
 * páginas sozinho (templates/canvas.php) e convive com o tema do usuário, então o
 * reset precisa ficar preso ao markup do plugin:
 *
 *   .achadinhos-body      → <body> das páginas renderizadas pelo canvas do plugin
 *   .achadinhos-container → wrapper de todo shortcode (funciona também quando o
 *                           shortcode é embutido numa página do tema do usuário)
 *
 * frontend.css não tem nenhum seletor global (é 100% .achadinhos-*), mas ASSUME este
 * reset: box-sizing border-box, h1..h6 sem tamanho próprio, p sem margem, links sem
 * cor/sublinhado e img como bloco. Sem isso, o layout quebra sob temas como Astra,
 * Kadence ou Twenty Twenty-*.
 *
 * O escopo usa `:where()`, NUNCA `:is()`. `:where()` contribui especificidade ZERO, então
 * `:where(...) a` continua valendo (0,0,1) — igual ao `a {}` global do tema-palco — e perde
 * para qualquer regra de componente do frontend.css, como `.achadinhos-cta-button` (0,1,0).
 * Com `:is()` o mesmo seletor vira (0,1,1) e passa a VENCER as classes: foi assim que o
 * `background-color: transparent` do reset apagou o fundo do botão do CTA na 3.0.0.
 *
 * Carrega ANTES de frontend.css.
 *
 * @author Dante Testa <https://dantetesta.com.br>
 * @since 3.0.0
 * @modified 2026-07-31 19:05:00
 */

:where(.achadinhos-body, .achadinhos-container),
:where(.achadinhos-body, .achadinhos-container) *,
:where(.achadinhos-body, .achadinhos-container) *::before,
:where(.achadinhos-body, .achadinhos-container) *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Documento — só no canvas do plugin (nunca no <body> do tema do usuário). */
.achadinhos-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
}

:where(.achadinhos-body, .achadinhos-container) main {
    display: block;
}

:where(.achadinhos-body, .achadinhos-container) :is(h1, h2, h3, h4, h5, h6) {
    font-weight: inherit;
    font-size: inherit;
}

:where(.achadinhos-body, .achadinhos-container) a {
    background-color: transparent;
    color: inherit;
    text-decoration: none;
}

:where(.achadinhos-body, .achadinhos-container) :is(b, strong) {
    font-weight: bolder;
}

:where(.achadinhos-body, .achadinhos-container) :is(code, kbd, samp, pre) {
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1em;
}

:where(.achadinhos-body, .achadinhos-container) small {
    font-size: 80%;
}

:where(.achadinhos-body, .achadinhos-container) :is(sub, sup) {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

:where(.achadinhos-body, .achadinhos-container) sub {
    bottom: -0.25em;
}

:where(.achadinhos-body, .achadinhos-container) sup {
    top: -0.5em;
}

:where(.achadinhos-body, .achadinhos-container) :is(img, picture, video, canvas, svg) {
    display: block;
    max-width: 100%;
    height: auto;
}

:where(.achadinhos-body, .achadinhos-container) :is(button, input, optgroup, select, textarea) {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

:where(.achadinhos-body, .achadinhos-container) :is(button, select) {
    text-transform: none;
}

:where(.achadinhos-body, .achadinhos-container) :is(button, [type='button'], [type='reset'], [type='submit']) {
    -webkit-appearance: button;
    appearance: button;
    background: none;
    border: none;
    cursor: pointer;
}

:where(.achadinhos-body, .achadinhos-container) button::-moz-focus-inner,
:where(.achadinhos-body, .achadinhos-container) [type='button']::-moz-focus-inner,
:where(.achadinhos-body, .achadinhos-container) [type='reset']::-moz-focus-inner,
:where(.achadinhos-body, .achadinhos-container) [type='submit']::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

:where(.achadinhos-body, .achadinhos-container) fieldset {
    border: none;
}

:where(.achadinhos-body, .achadinhos-container) progress {
    vertical-align: baseline;
}

:where(.achadinhos-body, .achadinhos-container) textarea {
    overflow: auto;
    resize: vertical;
}

:where(.achadinhos-body, .achadinhos-container) :is([type='checkbox'], [type='radio']) {
    box-sizing: border-box;
    padding: 0;
}

:where(.achadinhos-body, .achadinhos-container) [type='number']::-webkit-inner-spin-button,
:where(.achadinhos-body, .achadinhos-container) [type='number']::-webkit-outer-spin-button {
    height: auto;
}

:where(.achadinhos-body, .achadinhos-container) [type='search'] {
    -webkit-appearance: textfield;
    appearance: textfield;
    outline-offset: -2px;
}

:where(.achadinhos-body, .achadinhos-container) [type='search']::-webkit-search-decoration {
    -webkit-appearance: none;
}

:where(.achadinhos-body, .achadinhos-container) ::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

:where(.achadinhos-body, .achadinhos-container) details {
    display: block;
}

:where(.achadinhos-body, .achadinhos-container) summary {
    display: list-item;
}

:where(.achadinhos-body, .achadinhos-container) :is(template, [hidden]) {
    display: none;
}

:where(.achadinhos-body, .achadinhos-container) :is(ol, ul, menu) {
    list-style: none;
}

:where(.achadinhos-body, .achadinhos-container) :is(blockquote, q) {
    quotes: none;
}

:where(.achadinhos-body, .achadinhos-container) blockquote::before,
:where(.achadinhos-body, .achadinhos-container) blockquote::after,
:where(.achadinhos-body, .achadinhos-container) q::before,
:where(.achadinhos-body, .achadinhos-container) q::after {
    content: none;
}

:where(.achadinhos-body, .achadinhos-container) table {
    border-collapse: collapse;
    border-spacing: 0;
}

:where(.achadinhos-body, .achadinhos-container) hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border: none;
    border-top: 1px solid #e2e8f0;
}

:where(.achadinhos-body, .achadinhos-container) abbr[title] {
    border-bottom: none;
    text-decoration: underline dotted;
}

:where(.achadinhos-body, .achadinhos-container) iframe {
    border: none;
}

:where(.achadinhos-body, .achadinhos-container) :focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

:where(.achadinhos-body, .achadinhos-container) ::selection {
    background-color: #2563eb;
    color: #ffffff;
}

/* Link "pular para o conteúdo" do canvas. frontend.css não define esta classe —
 * sem ela o link ficaria visível no topo de toda página. */
.achadinhos-body .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.achadinhos-body .screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Conteúdo livre (editor de blocos) dentro das páginas do plugin. */
.achadinhos-body :is(.alignwide, .alignfull) {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.achadinhos-body .wp-block-image img {
    height: auto;
    max-width: 100%;
}

/* Admin bar: o reset acima zera margens do documento, então o offset dela some.
 * Regra herdada do tema-palco (functions.php do achadinhos-starter). */
.achadinhos-body.admin-bar {
    padding-top: 32px;
}

@media screen and (max-width: 782px) {
    .achadinhos-body.admin-bar {
        padding-top: 46px;
    }
}
