diff --git a/src/layouts/RetroLayout.astro b/src/layouts/RetroLayout.astro index a86f767..0a74dfb 100644 --- a/src/layouts/RetroLayout.astro +++ b/src/layouts/RetroLayout.astro @@ -242,6 +242,7 @@ import CookieBanner from "../components/CookieBanner.astro"; } [data-tooltip]::after { + width: 0; position: absolute; opacity: 0; pointer-events: none; @@ -253,41 +254,51 @@ import CookieBanner from "../components/CookieBanner.astro"; background-color: white; z-index: 10; padding: 8px; - width: 300px; transform: translateY(-20px); transition: all 150ms cubic-bezier(0.25, 0.8, 0.25, 1); } - [data-tooltip]:hover::after { + [data-tooltip]:hover::after, + [data-tooltip]:focus::after, + [data-tooltip]:active::after { + width: 300px; opacity: 1; transform: translateY(0); transition-duration: 300ms; } -[data-ai-support-amount="high"] [data-tooltip]:after { - content: "Supporto autonomo: redazione tramite prompt engineering."; -} -[data-ai-support-amount="mid"] [data-tooltip]:after { - content: "Supporto collaborativo: redazione di alcuni paragrafi sotto revisione."; -} -[data-ai-support-amount="low"] [data-tooltip]:after { - content: "Supporto limitato: revisione di alcune frasi e paragrafi."; -} + [data-ai-support-amount="high"] [data-tooltip]:after { + content: "Supporto autonomo: redazione tramite prompt engineering."; + } + [data-ai-support-amount="mid"] [data-tooltip]:after { + content: "Supporto collaborativo: redazione di alcuni paragrafi sotto revisione."; + } + [data-ai-support-amount="low"] [data-tooltip]:after { + content: "Supporto limitato: revisione di alcune frasi e paragrafi."; + } -[lang="en"] [data-ai-support-amount="high"] [data-tooltip]:after { - content: "Autonomous support: drafting through prompt engineering."; -} -[lang="en"] [data-ai-support-amount="mid"] [data-tooltip]:after { - content: "Collaborative support: drafting of some paragraphs under review."; -} -[lang="en"] [data-ai-support-amount="low"] [data-tooltip]:after { - content: "Limited support: review of some sentences and paragraphs."; -} + [lang="en"] [data-ai-support-amount="high"] [data-tooltip]:after { + content: "Autonomous support: drafting through prompt engineering."; + } + [lang="en"] [data-ai-support-amount="mid"] [data-tooltip]:after { + content: "Collaborative support: drafting of some paragraphs under review."; + } + [lang="en"] [data-ai-support-amount="low"] [data-tooltip]:after { + content: "Limited support: review of some sentences and paragraphs."; + } + + @media (max-width: 1023px) { + [data-tooltip]::after { + top: 0; + position: fixed; + left: 0; + width: 100% !important; + } + } /* MOBILE ONLY */ @media (max-width: 600px) { main { - max-width: 100%; font-size: 14px; } h2 {