/* All About The Neck · başvuru asistanı penceresi (2026-10-07). Renk ve fontlar site.css tokenlarından. */
/* .ast sıfır boyutlu sabit çapa: açılıp kapanınca kutusu değişmez → düzen kayması (CLS) sayılmaz (2026-10-07) */
.ast { position: fixed; right: 20px; bottom: 20px; width: 0; height: 0; z-index: 700; font-family: var(--f-sans); color: var(--ink); }
.ast.ast-cc { bottom: 128px; }
.ast.ast-cc .ast-panel { height: min(640px, calc(100vh - 150px)); }
.ast-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── açma düğmesi ── */
.ast-launch {
  position: absolute; right: 0; bottom: 0; white-space: nowrap;
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left;
  background: var(--ink); color: #fff; border: 0; border-radius: 2px; padding: 14px 20px 14px 16px; cursor: pointer;
  box-shadow: 0 18px 40px -18px rgba(42, 37, 34, 0.55); transition: transform 0.25s, box-shadow 0.25s;
}
.ast-launch:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -18px rgba(42, 37, 34, 0.6); }
.ast-launch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ast-dot { grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(184, 153, 107, 0.22); }
.ast-l1 { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); }
.ast-l2 { font-family: var(--f-display); font-size: 1.18rem; line-height: 1.15; margin-top: 2px; }
.ast.open .ast-launch { display: none; }

/* ── pencere ── */
.ast-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(42, 37, 34, 0.45);
}
.ast-panel[hidden] { display: none; }
.ast-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); background: var(--ivory-2); }
.ast-head strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; line-height: 1.1; margin-top: 3px; }
.ast-k { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-3); }
.ast-x { position: relative; width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; cursor: pointer; flex-shrink: 0; }
.ast-x::before, .ast-x::after { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1px; background: var(--ink); transform: rotate(45deg); }
.ast-x::after { transform: rotate(-45deg); }

.ast-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ast-msg { max-width: 88%; font-size: 0.93rem; line-height: 1.6; padding: 11px 14px; }
.ast-msg p + p, .ast-msg p + ul, .ast-msg ul + p { margin-top: 8px; }
.ast-msg ul { padding-left: 18px; }
.ast-msg li + li { margin-top: 3px; }
.ast-msg a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; word-break: break-word; }
.ast-bot { align-self: flex-start; background: var(--ivory-2); border-left: 2px solid var(--gold); }
.ast-user { align-self: flex-end; background: var(--ink); color: #fff; }
.ast-user a { text-decoration-color: var(--gold-2); }

.ast-typing { display: flex; gap: 5px; padding: 15px 16px; }
.ast-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-3); animation: astDot 1.2s infinite ease-in-out; }
.ast-typing span:nth-child(2) { animation-delay: 0.15s; }
.ast-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes astDot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ast-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.ast-chip { font-family: var(--f-sans); font-size: 0.84rem; color: var(--ink); background: #fff; border: 1px solid var(--gline); padding: 8px 12px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ast-chip:hover { border-color: var(--gold); background: var(--ivory-2); }

/* ── özet kartı ── */
.ast-card { align-self: stretch; border: 1px solid var(--gline); background: #fff; padding: 16px; font-size: 0.9rem; }
.ast-card dl { margin: 10px 0 12px; }
.ast-card dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.ast-card dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.ast-card dd { word-break: break-word; }
.ast-file { display: block; border: 1px dashed var(--gline); padding: 11px 12px; cursor: pointer; font-size: 0.84rem; color: var(--ink-2); }
.ast-file:hover { border-color: var(--gold); }
.ast-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ast-files { list-style: none; margin: 6px 0 0; font-size: 0.84rem; }
.ast-files li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.ast-files button { background: none; border: 0; color: var(--gold-3); cursor: pointer; font-size: 0.8rem; text-decoration: underline; }
.ast-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; margin-top: 12px; font-size: 0.78rem; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.ast-consent input { margin-top: 2px; accent-color: var(--ink); }
.ast-err { margin-top: 10px; font-size: 0.82rem; color: #9b2c1f; }
.ast-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ast-go, .ast-edit { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 12px 16px; cursor: pointer; border: 1px solid var(--ink); }
.ast-go { background: var(--ink); color: #fff; }
.ast-go:disabled { opacity: 0.6; cursor: wait; }
.ast-edit { background: #fff; color: var(--ink); }
.ast-old { opacity: 0.55; }
.ast-note { font-size: 0.8rem; color: var(--ink-3); }
.ast-done strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin: 6px 0 8px; }
.ast-done p { color: var(--ink-2); line-height: 1.6; }

/* ── giriş ── */
.ast-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.ast-in textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line-3); padding: 10px 12px; font: inherit; font-size: 0.93rem; line-height: 1.45; max-height: 140px; color: var(--ink); background: #fff; }
.ast-in textarea:focus { outline: none; border-color: var(--gold); }
.ast-send { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--ink); color: #fff; border: 0; padding: 13px 14px; cursor: pointer; }
.ast-send:disabled { opacity: 0.5; cursor: wait; }
.ast-fine { font-size: 0.7rem; line-height: 1.45; color: var(--ink-3); padding: 0 14px 10px; }

/* ── telefon: tam ekran ── */
@media (max-width: 560px) {
  .ast { right: 12px; bottom: 12px; }
  .ast.ast-cc:not(.open) { bottom: 118px; }
  .ast.ast-cc .ast-panel { height: 100dvh; }
  .ast-launch { padding: 12px 16px 12px 14px; }
  .ast-l1 { display: none; }
  .ast-l2 { font-size: 1.05rem; margin: 0; }
  .ast-dot { grid-row: auto; }
  .ast.open .ast-panel { position: fixed; inset: 0; }
  .ast-panel { width: 100vw; height: 100dvh; border: 0; }
  .ast-in textarea { font-size: 16px; }
  html.ast-lock, html.ast-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ast-typing span { animation: none; opacity: 0.6; } .ast-launch { transition: none; } }
@media print { .ast { display: none !important; } }
