/* ============================================================
   Zeo AI Bot Access Checker - web olcegi stiller
   Renk / font / radius / golge: assets/zeo-tokens.css (deck ile ayni)
   Burada sadece 1920x1080 slayt tip olcegi web'e uyarlanir.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--ff-text);
  font-size: 16px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------- Ust bar ---------- */
.topbar {
  border-bottom: 1px solid var(--c-line);
  background: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.topbar .logo { height: 26px; display: block; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .tag {
  font-family: var(--ff-head);
  font-weight: var(--fw-semibold);
  font-size: 12px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Dil değiştirici: zeo.org'daki kare buton, 44px dokunma hedefiyle */
.lang-btn {
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--c-white);
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  color: var(--c-ink);
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.lang-btn:hover { background: var(--c-ink); color: var(--c-white); }
.lang-btn:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; }

@media (max-width: 560px) {
  .topbar .tag { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 36px; }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-head);
  font-weight: var(--fw-semibold);
  font-size: 12px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-red);
  margin-bottom: 14px;
}
.kicker .kdot { width: 26px; height: 3px; background: var(--c-red); border-radius: var(--radius-pill); }

h1 {
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: var(--tracking-tight);
  color: var(--c-ink);
  margin: 0;
}
h1 em { font-style: normal; color: var(--c-red); }

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-muted);
  margin: 16px 0 0;
  max-width: 68ch;
}

/* ---------- Kart ---------- */
/*
 * Kartın imza "kitap" gölgesi 9px aşağı taşar. main'e alt boşluk verilmezse
 * bu kırmızı çubuk footer'ın üst çizgisine değiyor. Boşluk burada duruyor ki
 * sonuç bölümü açık da olsa kapalı da olsa aynı olsun.
 */
main { display: block; padding-bottom: 64px; }

.card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 28px;
}
.card + .card { margin-top: 24px; }
.card.book { box-shadow: var(--shadow-book); }

.card h2 {
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 20px;
  color: var(--c-ink);
  margin: 0 0 4px;
  letter-spacing: var(--tracking-tight);
}
.card .hint { font-size: 14px; color: var(--c-muted); margin: 0 0 18px; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Form ---------- */
label.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--ff-head);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink);
  margin-bottom: 8px;
}
label.field-label .counter { font-family: var(--ff-mono); font-size: 12px; color: var(--c-muted); text-transform: none; letter-spacing: 0; }
label.field-label .counter.over { color: var(--c-red); font-weight: 700; }

textarea#urls {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 14px 16px;
  font-family: var(--ff-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  outline: none;
}
textarea#urls:focus, input[type="search"]:focus { border-color: var(--c-red); box-shadow: 0 0 0 3px var(--c-pink-100); }

input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--ff-text);
  font-size: 14px;
  color: var(--c-text);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  outline: none;
  margin-bottom: 12px;
}

/* ---------- Bot secici ---------- */
.bot-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  font-family: var(--ff-head);
  font-weight: var(--fw-semibold);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-line);
  background: var(--c-white);
  color: var(--c-ink);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--c-red); color: var(--c-red); }
.chip.on { background: var(--c-pink-100); border-color: var(--c-pink-200); color: var(--c-red); }

.bot-list {
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 4px;
}
.bot-group-title {
  position: sticky;
  top: 0;
  background: var(--c-surface-2);
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-ink-2);
  padding: 7px 10px;
  margin: 6px 0 2px;
  border-radius: var(--radius);
}
.bot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}
.bot-row:hover { background: var(--c-pink-50); }
.bot-row input { accent-color: var(--c-red); width: 15px; height: 15px; flex: none; cursor: pointer; }
.bot-row .tok { font-family: var(--ff-mono); font-size: 13px; color: var(--c-ink); }
.bot-row .vendor { font-size: 12px; color: var(--c-muted); margin-left: auto; white-space: nowrap; }

/* ---------- Butonlar ---------- */
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.btn {
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--c-red); color: var(--c-white); }
.btn-primary:hover:not(:disabled) { background: var(--c-red-dark); }
.btn-primary:active:not(:disabled) { background: var(--c-red-active); }
.btn-ghost { background: var(--c-white); color: var(--c-ink); border-color: var(--c-line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--c-red); color: var(--c-red); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.status { font-size: 14px; color: var(--c-muted); font-family: var(--ff-mono); }
.status.err { color: var(--c-red); font-family: var(--ff-text); }

.progress {
  height: 4px;
  background: var(--c-track);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 18px;
  display: none;
}
.progress.on { display: block; }
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c-red);
  transition: width var(--dur-fast) var(--ease-out);
}

/* ---------- Sonuc ---------- */
/* Sticky topbar var: kaydırma hedefi başlığın altında dursun */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

#results { scroll-margin-top: 88px; }
#results[hidden] { display: none; }
#results:focus { outline: none; }

/* Sonuçlar belirdiğinde kısa bir vurgu: tablonun geldiği fark edilsin */
.just-arrived .result-head h2::after {
  content: '';
  display: block;
  height: 3px;
  margin-top: 8px;
  background: var(--c-red);
  border-radius: var(--radius-pill);
  animation: sweep var(--dur-slow) var(--ease-out) both;
}
.just-arrived .summary .stat { animation: rise var(--dur-base) var(--ease-out) both; }
.just-arrived .summary .stat:nth-child(2) { animation-delay: 60ms; }
.just-arrived .summary .stat:nth-child(3) { animation-delay: 120ms; }
.just-arrived .summary .stat:nth-child(4) { animation-delay: 180ms; }

@keyframes sweep { from { width: 0; } to { width: 72px; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .just-arrived .result-head h2::after,
  .just-arrived .summary .stat { animation: none; }
}

.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 44px 0 18px;
}
.result-head h2 {
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  font-size: 26px;
  color: var(--c-ink);
  margin: 0;
  letter-spacing: var(--tracking-tight);
}

.summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 10px 16px;
  min-width: 122px;
  background: var(--c-white);
}
.stat b {
  display: block;
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  font-size: 24px;
  line-height: 1.1;
  color: var(--c-ink);
}
.stat span { font-size: 12px; color: var(--c-muted); letter-spacing: 0.02em; }
.stat.allowed b { color: var(--c-success); }
.stat.blocked b { color: var(--c-red); }
.stat.unknown b { color: var(--c-warning); }

.table-scroll {
  overflow: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  max-height: 72vh;
}
table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }

th, td { font-size: 13px; text-align: left; white-space: nowrap; }

thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  font-family: var(--ff-mono);
  font-weight: 400;
  color: var(--c-ink);
  padding: 10px 8px;
  vertical-align: bottom;
}
thead th .vend { display: block; font-family: var(--ff-text); font-size: 10px; color: var(--c-muted); letter-spacing: 0.02em; }

th.url-col, td.url-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--c-white);
  border-right: 1px solid var(--c-line);
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 14px;
  text-align: left;
}
thead th.url-col { z-index: 4; background: var(--c-surface-2); }
td.url-col a { color: var(--c-ink); text-decoration: none; font-size: 13px; }
td.url-col a:hover { color: var(--c-red); text-decoration: underline; }
td.url-col .meta { display: block; font-size: 11px; color: var(--c-muted); font-family: var(--ff-mono); }

tbody tr:nth-child(even) td, tbody tr:nth-child(even) td.url-col { background: var(--c-pink-50); }
tbody td { border-bottom: 1px solid var(--c-line); padding: 8px; text-align: center; }

.cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 14px;
  cursor: default;
}
.cell.allowed { background: var(--c-success-soft); color: var(--c-success); }
.cell.blocked { background: var(--c-pink-100); color: var(--c-red); }
.cell.unknown { background: #fef6e7; color: var(--c-warning); }
.cell.error   { background: var(--c-track); color: var(--c-muted); }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--c-muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* Tek URL detay gorunumu */
.detail td { text-align: left; white-space: normal; }
.detail td.rule { font-family: var(--ff-mono); font-size: 12px; color: var(--c-muted); max-width: 520px; white-space: normal; }
.detail td.tok { font-family: var(--ff-mono); font-size: 13px; color: var(--c-ink); }
.detail .state-pill {
  display: inline-block;
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.detail .state-pill.allowed { background: var(--c-success-soft); color: var(--c-success); }
.detail .state-pill.blocked { background: var(--c-pink-100); color: var(--c-red); }
.detail .state-pill.unknown { background: #fef6e7; color: #a86a04; }
.detail .state-pill.error   { background: var(--c-track); color: var(--c-muted); }

/* ---------- Notlar / footer ---------- */
.notes {
  margin-top: 22px;
  border-left: 3px solid var(--c-red);
  background: var(--c-pink-50);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  color: var(--c-text);
}
.notes b { color: var(--c-ink); }
.notes ul { margin: 8px 0 0; padding-left: 18px; }

footer {
  border-top: 1px solid var(--c-line);
  padding: 32px 0 40px;
  font-size: 12px;
  color: var(--c-muted);
}
footer a { color: var(--c-red); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
