/* Prime Buys AI v2 · left guide panel. Loaded last; every rule is scoped to #guidePanel.gv2. */
/* No display here: the base CSS hides this panel on tablets/phones until the tools drawer opens. */
#guidePanel.gv2 { flex-direction: column; gap: 12px; padding: 16px 14px 12px; }
#guidePanel.gv2 > * { flex-shrink: 0; margin: 0; }
#guidePanel.gv2 > .guide-libraries { flex: 1 1 auto; min-height: 140px; }

/* Hero: avatar and greeting side by side instead of a 230 px tall stage */
#guidePanel.gv2 .guide-hero {
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px;
  padding: 16px 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 10%, var(--panel)) 0%, var(--panel) 75%);
}
#guidePanel.gv2 .avatar-stage {
  grid-row: auto; grid-column: auto; width: 140px; height: 140px; min-height: 0; margin: 0;
  position: relative; display: block; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--cyan) 12%, var(--panel)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cyan) 22%, transparent);
}
#guidePanel.gv2 .avatar-stage::before, #guidePanel.gv2 .avatar-stage::after { display: none; }
#guidePanel.gv2 .guide-avatar-svg { position: absolute; left: 50%; top: 2px; width: 172px; max-width: none; margin: 0; transform: translateX(-50%); filter: none; }
#guidePanel.gv2 .guide-hero h2 { margin: 0; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
#guidePanel.gv2 .guide-copy { max-width: none; margin: -2px 2px 0; color: var(--muted); font-size: .8125rem; line-height: 1.55; text-align: left; }

/* Status: grows with its text (the fixed 44 px height let the mic hint overlap the buttons) */
#guidePanel.gv2 { --state-color: var(--faint); }
#guidePanel.gv2[data-state="listening"] { --state-color: #14b8a6; }
#guidePanel.gv2[data-state="thinking"] { --state-color: #f59e0b; }
#guidePanel.gv2[data-state="speaking"] { --state-color: #8b5cf6; }
#guidePanel.gv2[data-state="error"] { --state-color: #dc2626; }
#guidePanel.gv2 .guide-state {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; justify-content: stretch;
  gap: 3px 9px; min-height: 0; height: auto; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line); border-left: 3px solid var(--state-color); border-radius: 12px;
  background: var(--panel-soft); color: var(--ink); font-size: .8125rem; font-weight: 650;
  transition: border-color .2s ease;
}
#guidePanel.gv2 .state-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--state-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--state-color) 18%, transparent); }
#guidePanel.gv2[data-state="listening"] .state-indicator, #guidePanel.gv2[data-state="thinking"] .state-indicator { animation: gv2-pulse 1.4s ease-in-out infinite; }
@keyframes gv2-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--state-color) 6%, transparent); } }
#guidePanel.gv2 .state-detail { grid-column: 2; max-width: none; overflow: visible; white-space: normal; text-overflow: clip; color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.45; }
#guidePanel.gv2 .state-detail:empty { display: none; }

/* Two main destinations as tiles */
#guidePanel.gv2 .guide-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#guidePanel.gv2 .guide-tile {
  display: grid; justify-items: start; align-content: start; gap: 2px; width: 100%; min-width: 0; min-height: 0; margin: 0;
  padding: 10px 11px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
#guidePanel.gv2 .guide-tile:hover { border-color: var(--line-strong); background: var(--panel-soft); transform: translateY(-1px); }
#guidePanel.gv2 .guide-tile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
#guidePanel.gv2 .guide-tile svg { width: 20px; height: 20px; margin-bottom: 5px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#guidePanel.gv2 .gv2-tile-title { font-size: .875rem; font-weight: 700; line-height: 1.25; }
#guidePanel.gv2 .gv2-tile-sub { color: var(--muted); font-size: .72rem; line-height: 1.35; }

/* Library: one scroll area, identical rows (icon, label, count, chevron) */
#guidePanel.gv2 .guide-libraries {
  display: grid; align-content: start; gap: 6px; max-height: none; overflow: auto; padding: 0 2px 2px 0;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
#guidePanel.gv2 .guide-libraries::before { content: "Kütüphane"; margin: 2px 2px 2px; color: var(--faint); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
html[lang="en"] #guidePanel.gv2 .guide-libraries::before { content: "Library"; }
#guidePanel.gv2 .guide-libraries > details { margin: 0; border-radius: 12px; }
#guidePanel.gv2 .guide-libraries > details > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; font-size: .875rem; font-weight: 700; line-height: 1.3; }
#guidePanel.gv2 .guide-libraries > details > summary > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guidePanel.gv2 .guide-libraries > details > summary svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linejoin: round; }
#guidePanel.gv2 .guide-libraries > details > summary::after { margin-left: auto; flex: 0 0 auto; }
#guidePanel.gv2 .guide-libraries > details[open] > summary { border-bottom: 1px solid var(--line); }
#guidePanel.gv2 .gv2-count {
  display: inline-grid; min-width: 22px; height: 20px; margin-left: 6px; padding: 0 6px; place-items: center; vertical-align: 1px;
  border-radius: 999px; background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--cyan); font-size: .7rem; font-weight: 700;
}

/* Footer: provider status and knowledge coverage on one quiet line */
#guidePanel.gv2 .guide-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 10px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; line-height: 1.5; }
#guidePanel.gv2 .provider-note { margin: 0; padding: 0; border: 0; font-size: inherit; }
#guidePanel.gv2 .knowledge-note { margin: 0; color: var(--faint); font-size: inherit; line-height: inherit; }

/* Drawer mode (narrow screens / live workspace) forces direct children to display:block */
#workspace.tools-open #guidePanel.gv2 > .guide-hero, #workspace.desktop-active.tools-open #guidePanel.gv2 > .guide-hero { display: grid !important; }
#workspace.tools-open #guidePanel.gv2 > .guide-quick, #workspace.desktop-active.tools-open #guidePanel.gv2 > .guide-quick { display: grid !important; }
#workspace.tools-open #guidePanel.gv2 > .guide-footer, #workspace.desktop-active.tools-open #guidePanel.gv2 > .guide-footer { display: flex !important; }
#workspace.desktop-active.tools-open #guidePanel.gv2 .guide-state { display: grid !important; }
#workspace.desktop-active.tools-open #guidePanel.gv2 .avatar-stage { display: grid !important; }
#workspace.tools-open #guidePanel.gv2 { gap: 12px; }

/* Short screens (1366x768 laptops): drop the intro sentence so the library and footer stay visible */
@media (max-height: 860px) {
  #guidePanel.gv2 { gap: 10px; padding-top: 12px; }
  #guidePanel.gv2 .guide-copy { display: none; }
  #guidePanel.gv2 .guide-hero { padding: 12px 12px 10px; gap: 8px; }
  #guidePanel.gv2 .avatar-stage { width: 100px; height: 100px; }
  #guidePanel.gv2 .guide-avatar-svg { width: 124px; }
  #guidePanel.gv2 .gv2-tile-sub { display: none; }
  #guidePanel.gv2 .guide-tile svg { margin-bottom: 3px; }
  #guidePanel.gv2 .guide-tile { padding: 9px 10px; }
  #guidePanel.gv2 .guide-libraries > details > summary { min-height: 40px; padding: 8px 12px; }
}

/* Live workspace: chat takes 1/4 on the left, the live screen 3/4 on the right (desktop widths only;
   at <=1000 px the base CSS stacks them). */
@media (min-width: 1001px) {
  #workspace.desktop-active .workspace-grid { grid-template-columns: minmax(340px, 1fr) minmax(0, 3fr); }
  #workspace.desktop-active #guidePanel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #guidePanel.gv2 .state-indicator { animation: none !important; }
  #guidePanel.gv2 .guide-tile { transition: none; }
}

/* Kişisel ayarlar · avatar choices */
.avatar-choices { grid-column: 1 / -1; display: grid; width: 100%; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 6px; }
.avatar-choice { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.avatar-choice:hover { border-color: var(--line-strong); }
.avatar-choice[aria-checked="true"] { border-color: var(--cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 25%, transparent); background: color-mix(in srgb, var(--cyan) 6%, var(--panel)); }
.avatar-choice:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.avatar-choice-pic { position: relative; display: block; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--cyan) 12%, var(--panel)); }
.avatar-choice-pic svg { position: absolute; left: 50%; top: 1px; width: 96px; transform: translateX(-50%); }
.avatar-choice-pic .avatar-eyelids { transform: scaleY(0); transform-box: fill-box; transform-origin: center; }
.avatar-choice-name { font-size: .78rem; font-weight: 650; line-height: 1.3; text-align: center; }
