/* GURU-MASKOT-001 — Guru, the pencil robot. Inline SVG layers; these rules only show / move them per real state.
   Every animation is short and calm; prefers-reduced-motion stops all of them. */
.gm { position: relative; display: inline-block; line-height: 0; flex: none; }
.gm[hidden] { display: none; }
.gm-svg { width: 100%; height: 100%; overflow: visible; }
.gm[data-size="hero"] { width: 132px; height: 154px; }
.gm[data-size="panel"] { width: 34px; height: 40px; }
.gm[data-size="icon"] { width: 32px; height: 32px; }
.gm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* defaults: calm face; overlays hidden */
.gm .gm-eyes, .gm .gm-mouth, .gm .gm-cheek, .gm .gm-waves, .gm .gm-thought, .gm .gm-ring, .gm .gm-ask, .gm .gm-draw { display: none; }
.gm .gm-eyes-open, .gm .gm-mouth-calm { display: inline; }
.gm .gm-body, .gm .gm-antenna { transform-box: view-box; transform-origin: 60px 120px; }

/* 32 px silhouette: head, screen, pencil; nothing small */
.gm[data-size="icon"] .gm-arm, .gm[data-size="icon"] .gm-shadow, .gm[data-size="icon"] .gm-chest-glow { display: none; }

/* READY — calm eyes, a slow blink every ~6 s */
.gm[data-state="READY"] .gm-eye { transform-box: fill-box; transform-origin: center; animation: gm-blink 6s infinite; }
/* LISTENING — leans forward, sound-wave arcs */
.gm[data-state="LISTENING"] .gm-body, .gm[data-state="LISTENING"] .gm-antenna { transform: rotate(4deg) translateY(1px); transition: transform .25s ease; }
.gm[data-state="LISTENING"] .gm-waves { display: inline; animation: gm-wave 1.2s ease-in-out infinite; }
/* THINKING — focused line eyes, three dots in a thought bubble */
.gm[data-state="THINKING"] .gm-eyes-open { display: none; }
.gm[data-state="THINKING"] .gm-eyes-line, .gm[data-state="THINKING"] .gm-thought { display: inline; }
.gm[data-state="THINKING"] .gm-dot { animation: gm-dot 1.2s infinite; }
.gm[data-state="THINKING"] .gm-dot:nth-child(5) { animation-delay: .2s; }
.gm[data-state="THINKING"] .gm-dot:nth-child(6) { animation-delay: .4s; }
/* WORKING — the pencil tip draws a dashed line (only while a real job runs) */
.gm[data-state="WORKING"] .gm-eyes-open { display: none; }
.gm[data-state="WORKING"] .gm-eyes-line, .gm[data-state="WORKING"] .gm-draw { display: inline; }
.gm[data-state="WORKING"] .gm-draw { animation: gm-draw 1s linear infinite; }
.gm[data-state="WORKING"] .gm-pencil { transform-box: view-box; transform-origin: 60px 20px; animation: gm-scribble .5s ease-in-out infinite alternate; }
/* SUCCESS — happy eyes, a big smile, cheeks, ONE nod and a light ring; nothing more */
.gm[data-state="SUCCESS"] .gm-eyes-open, .gm[data-state="SUCCESS"] .gm-mouth-calm { display: none; }
.gm[data-state="SUCCESS"] .gm-eyes-happy, .gm[data-state="SUCCESS"] .gm-mouth-big, .gm[data-state="SUCCESS"] .gm-cheek, .gm[data-state="SUCCESS"] .gm-ring { display: inline; }
.gm[data-state="SUCCESS"] .gm-body, .gm[data-state="SUCCESS"] .gm-antenna { animation: gm-nod .6s ease-in-out 1; }
.gm[data-state="SUCCESS"] .gm-ring { transform-box: fill-box; transform-origin: center; animation: gm-ring .9s ease-out 1 forwards; }
/* BLOCKED — calm, a small "?" tile; never sad */
.gm[data-state="BLOCKED"] .gm-mouth-calm { display: none; }
.gm[data-state="BLOCKED"] .gm-mouth-flat, .gm[data-state="BLOCKED"] .gm-ask { display: inline; }
.gm[data-state="SUCCESS"] .gm-chest, .gm[data-state="WORKING"] .gm-chest { filter: brightness(1.15); }

@keyframes gm-blink { 0%, 96%, 100% { transform: scaleY(1); } 98% { transform: scaleY(.1); } }
@keyframes gm-wave { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes gm-dot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes gm-draw { to { stroke-dashoffset: -12; } }
@keyframes gm-scribble { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@keyframes gm-nod { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(5deg) translateY(2px); } }
@keyframes gm-ring { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gm *, .gm { animation: none !important; transition: none !important; } }

/* The home hero: Guru in the centre above ONE input bar ("Bugün ne yapalım?") */
.gm-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px 8px; text-align: center; }
.gm-hero-form { display: flex; gap: 8px; width: min(640px, 100%); }
.gm-hero-form input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border, #d0d4dc); background: var(--surface, #fff); color: inherit; font: inherit; font-size: 16px; }
.gm-hero-form button { height: 48px; padding: 0 20px; border-radius: 999px; }
.gm-hero-note { font-size: 12px; opacity: .7; margin: 0; }
.gm-switch { font-size: 12px; background: none; border: 0; color: inherit; opacity: .65; text-decoration: underline; cursor: pointer; }
/* mobile: when the keyboard is open the hero mascot shrinks, then hides */
@media (max-width: 640px) {
  .gm[data-size="hero"] { width: 96px; height: 112px; }
  .gm-hero.keyboard .gm[data-size="hero"] { width: 44px; height: 52px; }
}
@media (max-width: 640px) and (max-height: 520px) { .gm-hero.keyboard .gm[data-size="hero"] { display: none; } }
/* the hero page already shows Guru in the centre: the corner button steps aside there */
body:has(.gm-hero) .guru-fab { display: none; }
.guru-fab .gm[data-size="icon"] { width: 26px; height: 26px; }
.guru-head .gm[data-size="panel"] { margin: -4px 0; }

/* GURU-IKONIK-001 founder P0 — Bugün: ONE conversation in the middle. Before it starts: the mascot and the bar only.
   Once it starts: the mascot shrinks to the top, messages flow under it, the bar pins to the bottom. No side panel here. */
body:has(.gm-home) .guru-panel, body:has(.gm-home) .guru-fab { display: none !important; }
.gm-home { min-height: calc(100vh - 160px); justify-content: center; }
.gm-home-log { display: none; width: min(720px, 100%); text-align: left; }
.gm-home.talking { justify-content: flex-start; min-height: calc(100vh - 120px); }
.gm-home.talking .gm[data-size="hero"] { width: 48px; height: 56px; }
.gm-home.talking .gm-home-log { display: flex; flex-direction: column; gap: 10px; order: 2; flex: 1; padding-bottom: 24px; }
.gm-home.talking .gm-hero-form { order: 3; position: sticky; bottom: 0; z-index: 2; }
.gm-home .guru-msg { display: flex; }
.gm-home .guru-msg.me { justify-content: flex-end; }
.gm-home .guru-msg .guru-bubble { max-width: 92%; padding: 10px 14px; border-radius: 14px; background: var(--surface, #1a2236); }
.gm-home .guru-msg.me .guru-bubble { background: var(--accent, #3b6cf6); color: #fff; }
.gm-home .gm-card .c360-step { margin: 0; }
@media (max-width: 640px) { .gm-home { min-height: calc(100vh - 220px); } .gm-home.talking .gm-hero-form { bottom: 64px; } }

/* founder 2026-10-25: the motto under the mascot — small, calm, centred; it leaves with the mascot once the talk starts */
.gm-motto { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted, #9aa4b8); text-align: center; max-width: min(56ch, 100%); }
.gm-home.talking .gm-motto { display: none; }
.gm-home .gm-opening { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* founder touch: the "mayışık" look on a click — never while busy (the script refuses it), never a state (~1.4 s) */
.gm .gm-eyes-cozy, .gm .gm-blush, .gm .gm-heart { display: none; }
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-eyes:not(.gm-eyes-cozy),
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-mouth { display: none; }
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-eyes-cozy,
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-mouth-big,
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-blush,
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-heart { display: inline; }
.gm[data-mood="cozy"] .gm-blush { opacity: .7; }
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-body,
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-antenna { animation: gm-tilt 1.4s ease-in-out 1; }
.gm[data-mood="cozy"]:not([data-state="THINKING"]):not([data-state="WORKING"]):not([data-state="BLOCKED"]) .gm-pencil { transform-box: view-box; transform-origin: 60px 22px; animation: gm-wiggle .35s ease-in-out 4 alternate; }
.gm[data-mood="cozy"] .gm-heart { transform-box: fill-box; transform-origin: center; animation: gm-heart 1s ease-out 1 forwards; }
@keyframes gm-tilt { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-10deg) translateY(1px); } }
@keyframes gm-wiggle { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes gm-heart { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 25% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-14px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .gm[data-mood="cozy"] .gm-heart { display: none !important; } }

/* GURU-SOHBET-DUZEN-001 — one composer: the bar and, under it, four controls (+ Ekle · @Müşteri · mic · send) */
.gm-home.talking > .gm[data-size="hero"] { display: none; }
.gm-composer { flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--border, #2a3348); border-radius: 22px; background: var(--surface, #141b2b); }
.gm-composer .gm-composer-row { display: flex; }
.gm-composer .gm-composer-row input { border: 0 !important; box-shadow: none !important; background: transparent !important; height: 40px; padding: 0 8px; }
.gm-composer .gm-composer-row input:focus { outline: none; }
/* the field's own ring is off, so the bar shows where the keyboard is (WCAG 2.4.7) */
.gm-composer:focus-within { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 3px var(--accent-ring, rgba(37,99,235,.28)); }
.gm-composer-tools { display: flex; align-items: center; gap: 6px; }
.gm-composer-tools .grow { flex: 1; }
.gm-composer .gm-send { height: 36px; width: 36px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; }
.gm-tool { border-radius: 999px; }
.gm-client-chip.on { color: var(--accent, #6b8cff); }
.gm-menu { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0; max-height: 180px; overflow: auto; }
.gm-menu[hidden] { display: none; }
.gm-composer-note { margin: 0; font-size: 13px; opacity: .85; }
.gm-home .guru-msg.ai { gap: 8px; align-items: flex-start; }
.gm-home .guru-avatar-slot { flex: none; width: 28px; padding-top: 4px; }
.gm-home .guru-avatar-slot .gm[data-size="icon"] { width: 28px; height: 28px; }
.gm-home.talking .gm-composer { order: 3; position: sticky; bottom: 12px; z-index: 2; }

/* founder + PMO (Option A) — the quiet suggestions under the empty bar */
.gm-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.gm-chip { border: 1px solid transparent; background: none; color: var(--muted, #9aa4b8); font-size: 13px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.gm-chip:hover, .gm-chip:focus-visible { border-color: var(--border, #2a3348); color: inherit; }
.gm-home.talking .gm-chips { display: none; }
/* the bar settles to the bottom with a short glide (none with reduced motion); with the keyboard up the chat keeps its room */
.gm-home.talking .gm-composer { animation: gm-settle .22s ease-out 1; }
@keyframes gm-settle { from { transform: translateY(-16px); opacity: .7; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .gm-home.talking.keyboard .gm-composer { bottom: 8px; } .gm-home.talking.keyboard .gm-home-log { padding-bottom: 120px; } }
@media (prefers-reduced-motion: reduce) { .gm-home.talking .gm-composer { animation: none; } }
@media (max-width: 640px) { .gm-home.talking { min-height: calc(100vh - 230px); } }   /* the bottom nav keeps its room */
.gm-home:not(.talking) .gm-new { display: none; }   /* "Yeni sohbet" only once a conversation exists */
/* founder 2026-10-26 ("cevap yazı boşluğunun altına geliyor"): the newest message scrolls to just ABOVE the sticky bar,
   never under it — the log keeps the bar's height free at its end and every message stops that far from the bottom */
.gm-home.talking .gm-home-log { padding-bottom: 160px; }
.gm-home.talking .gm-home-log > * { scroll-margin-bottom: 170px; }

/* SOZ-YOLU-001: the promise's path in the chat (tokens only) */
.soz-yolu { display: flex; flex-direction: column; gap: 10px; }
.soz-log .guru-step { margin: 2px 0; }
.soz-summary, .soz-question, .soz-stop { display: flex; flex-direction: column; gap: 8px; }
.soz-overlay { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.soz-overlay img { width: min(100%, 320px); height: auto; border-radius: var(--r); }
.soz-approval { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border, rgba(127, 127, 127, 0.3)); }
.soz-approval h4 { margin: 0; }
.soz-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: baseline; }
.soz-row input { min-width: 0; }
.soz-swatches { display: inline-flex; gap: 4px; grid-column: 2; }
.soz-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border, rgba(127, 127, 127, 0.4)); }
.soz-items ol { margin: 6px 0 0 18px; padding: 0; }
@media (max-width: 560px) { .soz-row { grid-template-columns: 1fr; } .soz-swatches { grid-column: 1; } }
