/* Fany – AI poradkyňa ako súčasť stránok Fainly. Všetky triedy majú predponu fy-, aby sa nebili so štýlmi stránok.
   Na bežnej stránke je to dok dole uprostred (najprv kompaktný, po otázke sa roztiahne do výšky), na /asistent je ten
   istý chat priamo v obsahu stránky. */
.fany {
  --fy-ac: #6b1b9a; --fy-ac-dark: #561581; --fy-ac-soft: #f3e8f8; --fy-ink: #1c1324; --fy-mut: #5f5c6d;
  --fy-line: #ebe9f1; --fy-bubble: #f6f5fb; --fy-user: #f0e3f7; --fy-ok: #12894e; --fy-ok-soft: #e7f6ec; --fy-warn: #b26a00; --fy-star: #fb8c00;
  display: flex; flex-direction: column; background: #fff; color: var(--fy-ink);
  font: 400 15px/1.55 Figtree, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.fany *, .fany *::before, .fany *::after { box-sizing: border-box; }
.fany button { font: inherit; color: inherit; cursor: pointer; }
.fany svg { flex: none; }
.fany[hidden], .fy-fab[hidden], .fany [hidden] { display: none !important; }

/* Panel na bežných stránkach: dok dole uprostred. Kompaktný má hlavičku, otázky k stránke a pole na písanie; po otázke
   sa roztiahne do výšky (trieda fy-big) a po stranách aj navrchu ostáva vidieť stránku. */
.fy-panel { position: fixed; left: 0; right: 0; bottom: 16px; margin: 0 auto; width: min(720px, calc(100% - 32px)); z-index: 60; border: 1px solid var(--fy-line); border-radius: 22px; box-shadow: 0 28px 70px -20px rgba(30,10,50,.5), 0 6px 18px -8px rgba(30,10,50,.2); transform-origin: 50% 100%; animation: fy-pop .42s cubic-bezier(.2,1.15,.3,1) both; }
.fy-panel.fy-big { width: min(920px, calc(100% - 48px)); height: calc(100vh - 110px); height: calc(100dvh - 110px); max-height: 960px; }
.fy-panel:not(.fy-big) .fy-scroll, .fy-panel:not(.fy-big) .fy-note { display: none; }
.fy-panel:not(.fy-big) .fy-sugg { padding-top: 10px; }
.fy-panel:not(.fy-big) .fy-composer { margin-bottom: 14px; }
.fy-panel .fy-head { border-radius: 22px 22px 0 0; }
.fy-panel:not(.fy-big) .fy-hist { top: auto; bottom: calc(100% + 8px); max-height: min(60vh, 420px); }
html.fany-on body { padding-bottom: var(--fy-dock-h, 0px); }
@media (max-width: 760px) {
  .fy-panel { bottom: 8px; width: calc(100% - 16px); border-radius: 18px; }
  .fy-panel .fy-head { border-radius: 18px 18px 0 0; }
  .fy-panel.fy-big { width: calc(100% - 16px); height: calc(100vh - 64px); height: calc(100dvh - 64px); }
}
@keyframes fy-pop { from { transform: translateY(36px) scale(.92); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }

/* Celá stránka /asistent */
.fy-page { position: relative; height: calc(100vh - var(--fy-top, 160px)); height: calc(100dvh - var(--fy-top, 160px)); min-height: 520px; max-width: 980px; margin: 0 auto; border: 1px solid var(--fy-line); border-radius: 20px; overflow: hidden; }

/* Plávajúce tlačidlo, keď je panel zatvorený */
.fy-fab { position: fixed; right: 22px; bottom: 22px; z-index: 55; display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #6b1b9a; color: #6b1b9a; border-radius: 999px; padding: 5px 18px 5px 5px; font: 700 15px/1.2 Figtree, "Segoe UI", system-ui, sans-serif; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(60,10,90,.45); }
.fy-fab img { width: 42px; height: 42px; display: block; }
.fy-fab:hover { background: #f5ecf9; }
@media (max-width: 760px) { .fy-fab { right: 14px; bottom: 14px; padding-right: 14px; } }

/* Hlavička */
.fy-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--fy-line); position: relative; }
.fy-ava { width: 40px; height: 40px; display: block; flex: none; }
.fy-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fy-ttl b { font-size: 16px; }
.fy-ttl span { font-size: 12.5px; color: var(--fy-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-ib { width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; color: var(--fy-mut); display: grid; place-items: center; flex: none; text-decoration: none; }
.fy-ib:hover { background: var(--fy-bubble); color: var(--fy-ink); text-decoration: none; }
.fy-ib svg { width: 20px; height: 20px; }
.fy-ib[aria-expanded="true"] { background: var(--fy-ac-soft); color: var(--fy-ac-dark); }

/* Moje rozhovory */
.fy-hist { position: absolute; left: 10px; right: 10px; top: 62px; z-index: 5; background: #fff; border: 1px solid var(--fy-line); border-radius: 14px; box-shadow: 0 18px 30px -12px rgba(20,16,40,.25); padding: 6px; max-height: 60%; overflow-y: auto; }
.fy-hist h4 { margin: 6px 10px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fy-mut); }
.fy-link { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14px; }
.fy-link:hover { background: var(--fy-bubble); color: var(--fy-ac-dark); }
.fy-link svg { width: 18px; height: 18px; margin-top: 2px; color: var(--fy-mut); }
.fy-link span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fy-empty { color: var(--fy-mut); font-size: 13px; padding: 6px 10px; }

/* Čo Fany vidí na stránke a otázky k nej */
.fy-ctx { display: flex; gap: 8px; align-items: baseline; padding: 7px 16px; background: var(--fy-bubble); font-size: 12.5px; color: #3b3946; border-bottom: 1px solid var(--fy-line); }
.fy-ctx b { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fy-ac); }
.fy-ctx span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fy-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 0; }
.fy-page .fy-sugg { max-width: 860px; width: calc(100% - 56px); margin: 0 auto; padding-left: 0; padding-right: 0; }
.fy-sugg .fy-q { font-size: 12.5px; padding: 6px 10px; }

/* Vlákno */
.fy-scroll { flex: 1; overflow-y: auto; padding: 16px 16px 6px; overflow-anchor: none; }
.fy-page .fy-scroll { padding: 22px 28px 8px; }
.fy-thread { max-width: 860px; margin: 0 auto; }
.fy-hero { text-align: center; padding: 28px 4px 8px; }
.fy-page .fy-hero { padding-top: 9vh; }
.fy-hero img { width: 104px; height: 104px; display: block; margin: 0 auto 10px; }
.fy-hero h2 { font-size: 21px; letter-spacing: -.01em; margin: 0 0 6px; }
.fy-hero p { color: var(--fy-mut); max-width: 440px; margin: 0 auto 16px; font-size: 14.5px; }
.fy-qs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.fy-q { border: 0; background: #f6eefa; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #45106a !important; text-align: left; }
.fy-q:hover { background: #eddcf5; }
.fy-row { display: flex; gap: 8px; margin-bottom: 4px; animation: fy-up .3s ease both; }
.fy-row.fy-user { justify-content: flex-end; }
.fy-row > .fy-av { width: 28px; height: 28px; flex: none; margin-top: 4px; }
.fy-row > .fy-av img { width: 100%; height: 100%; display: block; }
.fy-row.fy-cont > .fy-av { visibility: hidden; height: 0; }
.fy-row.fy-cont { margin-top: -4px; }
.fy-bubble { padding: 10px 14px; border-radius: 16px; background: var(--fy-bubble); max-width: min(660px, 100%); overflow-wrap: anywhere; font-size: 14.5px; }
.fy-user .fy-bubble { background: var(--fy-user); white-space: pre-wrap; border-bottom-right-radius: 4px; }
.fy-bubble p { margin: 0 0 8px; } .fy-bubble p:last-child, .fy-bubble ul:last-child, .fy-bubble ol:last-child { margin-bottom: 0; }
.fy-bubble ul, .fy-bubble ol { margin: 0 0 8px; padding-left: 20px; } .fy-bubble li { margin: 3px 0; }
.fy-bubble ol { list-style: none; padding-left: 0; counter-reset: q; }
.fy-bubble ol li { counter-increment: q; position: relative; padding-left: 32px; margin: 7px 0; min-height: 24px; }
.fy-bubble ol li::before { content: counter(q); position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 50%; background: var(--fy-ac); color: #fff; font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
.fy-time { font-size: 12px; color: var(--fy-mut); margin: 0 0 14px 36px; }
.fy-time.fy-user { text-align: right; margin: 0 0 14px; }
.fy-steps { display: grid; gap: 5px; }
.fy-steps .fy-done { display: flex; align-items: center; gap: 8px; color: var(--fy-mut); } .fy-steps .fy-done svg { width: 15px; height: 15px; color: var(--fy-ok); }
.fy-typing { display: inline-flex; gap: 5px; align-items: center; color: var(--fy-mut); }
.fy-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--fy-ac); animation: fy-blink 1.2s infinite ease-in-out; }
.fy-typing i:nth-child(2) { animation-delay: .15s; } .fy-typing i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
.fy-retry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fy-btn { border: 1.5px solid var(--fy-ac); background: #fff; color: var(--fy-ac-dark) !important; font-weight: 600; border-radius: 9px; padding: 6px 12px; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.fy-btn:hover { background: var(--fy-ac-soft); text-decoration: none; }
.fy-btn.fy-fill { background: var(--fy-ac); color: #fff !important; border-color: var(--fy-ac); } .fy-btn.fy-fill:hover { background: var(--fy-ac-dark); }

/* Zmena výpisu na stránke od Fany (nad odpoveďou) a tlačidlo Vrátiť. */
.fy-action { display: flex; align-items: center; gap: 10px; margin: 0 0 10px 36px; padding: 8px 8px 8px 12px; border: 1px solid #e6d3f1; border-radius: 12px; background: #fbf7fd; font-size: 13px; color: var(--fy-mut); }
.fy-action > svg { width: 18px; height: 18px; flex: none; color: var(--fy-ac); }
.fy-action > span { flex: 1; min-width: 0; }
.fy-action b { display: block; color: var(--fy-ink); font-size: 13.5px; font-weight: 600; }
.fy-action .fy-btn { flex: none; padding: 5px 10px; }

/* Karty odporúčaných produktov: kompaktné, aby sa zmestili aj do úzkeho panela */
.fy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin: 6px 0 18px 36px; }
.fy-card { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; border: 1px solid var(--fy-line); border-radius: 16px; padding: 12px; background: #fff; animation: fy-up .4s ease both; }
.fy-card:nth-child(2) { animation-delay: .06s; } .fy-card:nth-child(3) { animation-delay: .12s; } .fy-card:nth-child(4) { animation-delay: .18s; }
.fy-card.fy-top { border-color: var(--fy-ac); box-shadow: 0 0 0 1px var(--fy-ac); }
.fy-pic { grid-row: span 2; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; background: #fff; }
.fy-pic svg { height: 100%; width: auto; max-width: 100%; }
.fy-pic img.fy-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.fy-badge { justify-self: start; background: var(--fy-ac); color: #fff; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; margin-bottom: 2px; }
.fy-card h3 { margin: 0; font-size: 14.5px; line-height: 1.3; font-weight: 650; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fy-card h3 a { color: var(--fy-ink); font-weight: 650; text-decoration: none; }
.fy-card h3 a:hover { color: var(--fy-ac-dark); }
.fy-cbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fy-cfoot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.fy-rating { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--fy-mut); }
.fy-rating svg { width: 15px; height: 15px; color: var(--fy-star); } .fy-rating b { color: var(--fy-ink); }
.fy-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fy-chips span { font-size: 12px; font-weight: 600; padding: 1px 8px; border: 1px solid var(--fy-line); border-radius: 7px; white-space: nowrap; }
.fy-checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.fy-checks li { display: flex; gap: 8px; align-items: flex-start; } .fy-checks svg { width: 15px; height: 15px; color: var(--fy-ok); margin-top: 3px; }
.fy-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fy-price b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.fy-price span { font-size: 12.5px; }
.fy-in { color: var(--fy-ok); } .fy-out { color: var(--fy-warn); }
.fy-press { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; background: #1c1324; color: #fff !important; font-size: 12px; font-weight: 600; text-decoration: none; max-width: 100%; }
.fy-press span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fy-press svg { width: 13px; height: 13px; } .fy-press:hover { background: var(--fy-ac-dark); text-decoration: none; }

/* Porovnanie podľa priorít */
.fy-compare { margin: 0 0 18px 36px; animation: fy-up .45s ease both; }
.fy-compare h3, .fy-guides h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fy-compare h3 svg, .fy-guides h3 svg { width: 19px; height: 19px; color: var(--fy-ac); }
.fy-tbl { overflow-x: auto; border: 1px solid var(--fy-line); border-radius: 14px; }
.fy-compare table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fy-compare th, .fy-compare td { padding: 8px 12px; border-top: 1px solid var(--fy-line); text-align: center; white-space: nowrap; }
.fy-compare tr:first-child th { border-top: 0; font-weight: 600; white-space: normal; min-width: 110px; vertical-align: bottom; line-height: 1.3; }
.fy-compare th:first-child, .fy-compare td:first-child { text-align: left; font-weight: 500; }
.fy-compare tr:first-child th:first-child { color: var(--fy-mut); }
.fy-compare th small { display: block; font-weight: 500; color: var(--fy-ac-dark); }
.fy-compare td small { color: var(--fy-mut); margin-left: 4px; }
.fy-compare .fy-best { background: #f3f0ff; }
.fy-compare tr:first-child .fy-best { box-shadow: inset 0 3px 0 var(--fy-ac); }
.fy-compare .fy-total td { font-weight: 600; background: var(--fy-bubble); } .fy-compare .fy-total td.fy-best { background: #f1e3f8; }
.fy-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--fy-line); font-weight: 700; } .fy-pill small { font-weight: 500; margin: 0; }
.fy-pill.fy-win { background: var(--fy-ok-soft); border-color: #bfe6cd; color: var(--fy-ok); }
.fy-weight { color: var(--fy-ac); font-size: 10px; letter-spacing: 1px; margin-left: 5px; vertical-align: 1px; }
.fy-small { font-size: 12px; color: var(--fy-mut); margin: 6px 2px 0; }

/* Z poradne */
.fy-guides { margin: 0 0 18px 36px; animation: fy-up .45s ease both; } .fy-guides:empty { display: none; }
.fy-glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.fy-glist a { display: flex; gap: 12px; align-items: center; border: 1px solid var(--fy-line); border-radius: 14px; padding: 8px; color: var(--fy-ink); text-decoration: none; }
.fy-glist a:hover { border-color: var(--fy-ac); text-decoration: none; } .fy-glist a:hover b { color: var(--fy-ac-dark); }
.fy-glist img, .fy-glist .fy-ph { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; flex: none; background: var(--fy-ac-soft); display: grid; place-items: center; color: var(--fy-ac); }
.fy-glist .fy-ph svg { width: 24px; height: 24px; }
.fy-glist small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fy-ac-dark); }
.fy-glist b { display: block; font-size: 13.5px; line-height: 1.35; font-weight: 650; } .fy-glist em { font-style: normal; font-size: 12px; color: var(--fy-mut); }

/* Vstup */
.fy-composer { display: flex; align-items: flex-end; gap: 8px; margin: 8px 14px 0; padding: 5px 5px 5px 14px; border: 1.5px solid #e3e1ea; border-radius: 16px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.fy-page .fy-composer { max-width: 860px; width: calc(100% - 56px); margin: 8px auto 0; }
.fy-composer:focus-within { border-color: var(--fy-ac); box-shadow: 0 0 0 4px var(--fy-ac-soft); }
.fy-composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: inherit; font: inherit; font-size: 15px; padding: 8px 0; max-height: 140px; min-width: 0; }
.fy-composer textarea::placeholder { color: var(--fy-mut); }
.fy-send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--fy-ac); color: #fff !important; display: grid; place-items: center; }
.fy-send:hover { background: var(--fy-ac-dark); } .fy-send:disabled { opacity: .4; cursor: default; }
.fy-send svg { width: 20px; height: 20px; }
.fy-note { margin: 6px 14px 10px; font-size: 11.5px; color: var(--fy-mut); text-align: center; }
.fy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fy-no-anim * { animation: none !important; }
@keyframes fy-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fy-blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@media (max-width: 760px) {
  .fy-page { border-radius: 16px; }
  .fy-page .fy-scroll { padding: 16px 12px 8px; } .fy-page .fy-composer { width: calc(100% - 24px); }
  .fy-cards, .fy-compare, .fy-guides { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .fany *, .fany, .fy-fab { animation: none !important; transition: none !important; } }

/* Stránka pod panelom: výpis, ktorý sa práve mení, a produkty, ktoré Fany odporučila. */
main.fy-loading { opacity: .5; pointer-events: none; transition: opacity .15s .1s; }
.pcard.fy-pick { border-color: #c99ee2; box-shadow: 0 0 0 2px rgba(107,27,154,.16); }
.fy-mark { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 999px; background: #fff; border: 1px solid #e3cdf0; color: #561581; font-size: 11.5px; font-weight: 700; box-shadow: 0 4px 12px -6px rgba(70,16,100,.35); }
.fy-mark img { width: 20px; height: 20px; border-radius: 50%; display: block; }
