/* WP Agent Ready — summarize styles. Enqueued with wp_enqueue_style(). */
/* from class-summarize-with-ai.php */
/*
 * v0.9.129 : refonte CSS sobre style Qwairy.
 *
 * Philosophie :
 *  - Une SEULE ligne horizontale (label + logos + branding optionnel)
 *  - Pas de cartes individuelles autour des logos, juste les SVG colorés
 *  - Fond neutre transparent/quasi-transparent qui s'intègre sur clair OU sombre
 *  - Couleurs neutres via rgba(127,127,127,...) qui fonctionnent peu importe
 *    le thème WP du site (bg clair ou bg sombre)
 *  - Texte en color:inherit pour suivre la couleur du thème
 *  - Pas de @media (prefers-color-scheme: dark) : ça créait des bugs visuels
 *    quand le navigateur est en dark mais le thème WP en clair (ou inverse)
 *  - Hover = juste un léger fond gris neutre + léger scale, plus une bordure
 *    teintée à la couleur de marque via la variable CSS
 */
.wpar-summarize-widget {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 32px 0;
    padding: 10px 16px;
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: inherit;
}
.wpar-summarize-label {
    font-weight: 500;
    opacity: 0.65;
    white-space: nowrap;
}
.wpar-summarize-llms {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.wpar-summarize-llm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--wpar-llm-color, currentColor);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none !important;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.wpar-summarize-llm:hover,
.wpar-summarize-llm:focus-visible {
    background: rgba(127, 127, 127, 0.12);
    transform: scale(1.1);
    text-decoration: none !important;
}
.wpar-summarize-llm:focus-visible {
    outline: 2px solid var(--wpar-llm-color, currentColor);
    outline-offset: 2px;
}
.wpar-summarize-llm svg {
    display: block;
    width: 18px;
    height: 18px;
}
/* v1.0.0-rc1 : bouton "Sources préférées Google".
   Style distinct des boutons LLM : c'est un appel à l'action différent
   (pas "résumer maintenant" mais "ajouter ce site"), donc on le rend
   visuellement plus présent : pill avec bordure + texte, pas juste icône.
   v1.0.0-rc18 : sorti du conteneur LLM et placé sur sa propre ligne via
   .wpar-summarize-google-row (flex-basis 100% pour forcer le retour à la
   ligne dans le widget flex-wrap). */
.wpar-summarize-google-row {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    margin-top: 2px;
}
.wpar-summarize-google-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    color: #1a73e8;
    cursor: pointer;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.wpar-summarize-google-source:hover,
.wpar-summarize-google-source:focus-visible {
    background: rgba(26, 115, 232, 0.06);
    border-color: rgba(26, 115, 232, 0.45);
}
.wpar-summarize-google-source:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}
.wpar-summarize-google-source svg {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.wpar-summarize-google-label {
    font-weight: 500;
}
.wpar-summarize-branding {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.45;
    white-space: nowrap;
}
.wpar-summarize-branding a {
    color: inherit;
    text-decoration: none;
}
.wpar-summarize-branding a:hover {
    text-decoration: underline;
}
@media (max-width: 600px) {
    .wpar-summarize-widget {
        padding: 10px 12px;
        gap: 6px 10px;
        margin: 24px 0;
    }
    .wpar-summarize-label {
        font-size: 13px;
        width: 100%;
    }
    /* v1.0.0-rc19 : touch targets conformes mobile.
       Avant rc19 : boutons LLM 32×32 px espacés de 2 px — sous le seuil
       de 48 px (WCAG 2.5.8 / Material) que Lighthouse pénalise en
       "tap targets too close". Taper ChatGPT vs Claude était imprécis.
       Désormais 44×44 px (minimum Apple HIG) + gap 8 px. Le SVG reste
       à 20 px, le padding absorbe : zone tactile large, logo net. */
    .wpar-summarize-llms {
        gap: 8px;
    }
    .wpar-summarize-llm {
        width: 44px;
        height: 44px;
    }
    .wpar-summarize-llm svg {
        width: 20px;
        height: 20px;
    }
    .wpar-summarize-branding {
        margin-left: 0;
        width: 100%;
        text-align: right;
        margin-top: 2px;
    }
    .wpar-summarize-google-source {
        font-size: 12px;
        padding: 5px 12px 5px 8px;
        /* v1.0.0-rc19 : zone tactile minimale garantie (44 px Apple HIG).
           Avant : padding 5px + font 12px ≈ 30 px de haut, cible trop
           petite pour un pouce. white-space normal : un label long
           («Ajouter mondomainetreslong à vos sources préférées») wrappe
           proprement au lieu de déborder de l'écran, le pill s'étire
           verticalement grâce à min-height + align-items center. */
        min-height: 44px;
        box-sizing: border-box;
        white-space: normal;
        line-height: 1.3;
    }
    .wpar-summarize-google-source svg {
        width: 20px;
        height: 20px;
    }
}
