/* ── Robots.txt Checker ──────────────────────────────────────────── */
.tool-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tool-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tool-desc {
  color: var(--muted2);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Form */
.robots-form .form-row {
  display: flex;
  gap: 10px;
}
.robots-form .input-wrap--domain { flex: 1; }
.robots-form .input {
  width: 100%;
  height: 44px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--mono);
  transition: border-color .2s, box-shadow .2s;
}
.robots-form .input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,138,248,.3);
}
.robots-form .btn-primary {
  min-height: 44px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s, filter .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.robots-form .btn-primary:hover { transform: scale(1.02); filter: brightness(1.1); }
.robots-form .btn-primary:active { transform: scale(0.98); }
.robots-form .btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

}

to   { opacity: 1; transform: translateY(0); }
}
@keyframes robots-load {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Results */
.robots-results {
  margin-top: 16px;
  animation: fadeInUp .4s var(--ease-out);
}
.result-title {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.15);
}

/* Section labels */
.section-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.section-label:first-child { margin-top: 0; }

/* Status badge */
.robots-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.robots-status.status-found {
  background: rgba(61,214,140,.1);
  border: 1px solid rgba(61,214,140,.25);
  color: var(--status-pass);
}
.robots-status.status-not-found {
  background: rgba(244,114,114,.1);
  border: 1px solid rgba(244,114,114,.25);
  color: var(--status-fail);
}
.status-icon { font-size: 18px; }
.status-size {
  margin-left: auto;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  font-weight: 400;
}
.status-host {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted2);
  font-weight: 400;
}

/* User-agent blocks */
.ua-block {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ua-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ua-name {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
}
.ua-crawl-delay {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  padding: 2px 8px;
  background: rgba(91,138,248,.1);
  border-radius: 6px;
}

/* Rules table */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rules-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.rules-table tr:last-child td { border-bottom: none; }
.rule-type {
  width: 100px;
  font-weight: 600;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}
.rule-path {
  font-family: var(--mono);
  word-break: break-all;
  color: var(--text);
}
.rule-allow .rule-type { color: var(--status-pass); }
.rule-disallow .rule-type { color: var(--status-fail); }
.rule-other .rule-type { color: var(--muted); }
.no-rules {
  font-size: 13px;
  color: var(--muted2);
  font-style: italic;
  margin: 0;
}

/* Sitemap cards */
.sitemap-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sitemap-card {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.sitemap-card.sitemap-ok { border-color: rgba(61,214,140,.25); }
.sitemap-card.sitemap-fail { border-color: rgba(244,114,114,.25); }
.sitemap-url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  word-break: break-all;
}
.sitemap-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.sitemap-ok .sitemap-meta .sitemap-status-icon { color: var(--status-pass); }
.sitemap-fail .sitemap-meta .sitemap-status-icon { color: var(--status-fail); }
.sitemap-ok .sitemap-meta { color: var(--status-pass); }
.sitemap-fail .sitemap-meta { color: var(--status-fail); }
.sitemap-http {
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.sitemap-ct {
  font-family: var(--mono);
  color: var(--muted2);
}
.no-sitemaps {
  font-size: 13px;
  color: var(--muted2);
  font-style: italic;
}

/* Alerts */
.alert-list { display: flex; flex-direction: column; gap: 6px; }
.alert-item {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.alert-warn {
  background: rgba(245,200,66,.08);
  border: 1px solid rgba(245,200,66,.2);
  color: var(--status-warn);
}
.alert-err {
  background: rgba(244,114,114,.08);
  border: 1px solid rgba(244,114,114,.2);
  color: var(--status-fail);
}

/* URL Tester */
.url-tester {
  margin-top: 8px;
}
.url-tester-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.url-tester-form .input--select {
  width: 200px;
  flex-shrink: 0;
  height: 40px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
}
.url-tester-form .input {
  flex: 1;
  height: 40px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
}
.url-tester-form .input:focus,
.url-tester-form .input--select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,138,248,.3);
}
.btn-secondary {
  min-height: 40px;
  padding: 8px 18px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(91,138,248,.1);
}

/* Test result */
.test-result {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.test-result.test-allowed {
  background: rgba(61,214,140,.1);
  border: 1px solid rgba(61,214,140,.25);
  color: var(--status-pass);
}
.test-result.test-blocked {
  background: rgba(244,114,114,.1);
  border: 1px solid rgba(244,114,114,.25);
  color: var(--status-fail);
}
.test-icon { font-size: 16px; }
.test-detail {
  width: 100%;
  font-size: 12px;
  font-weight: 400;
  font-family: var(--mono);
  color: var(--muted2);
  margin-top: 4px;
}

/* Raw robots.txt with syntax highlighting */
.robots-raw-wrap { margin-top: 16px; }
.robots-raw-wrap summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted2);
  padding: 10px 0;
  user-select: none;
  transition: color .2s;
}
.robots-raw-wrap summary:hover { color: var(--accent); }
.robots-raw {
  margin-top: 10px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.6;
}

/* Syntax highlight colors */
.hl-comment   { color: var(--muted); font-style: italic; }
.hl-useragent { color: var(--accent); font-weight: 600; }
.hl-allow     { color: var(--status-pass); font-weight: 600; }
.hl-disallow  { color: var(--status-fail); font-weight: 600; }
.hl-sitemap   { color: #38bdf8; font-weight: 600; }
.hl-meta      { color: #a78bfa; font-weight: 600; }
.hl-other     { color: var(--muted2); }
.hl-value     { color: var(--text); }

/* Error */
.robots-error { margin-top: 16px; animation: fadeInUp .3s var(--ease-out); }
.card-error { border-color: rgba(248,113,113,.3); }
.card-error p { color: var(--red); font-size: 14px; margin: 0; }

/* Loading */
.robots-loading { margin-top: 16px; text-align: center; }
.loader-bar {
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.loader-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  animation: robots-load 1.2s ease-in-out infinite;
}
.loader-text {
  font-size: 13px;
  color: var(--muted2);
  text-align: center;
  animation: fadeInUp .3s;
}

/* Info section */
.info-section { margin-top: 32px; }
.info-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.15);
}
.info-section p {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 600px) {
  .robots-form .form-row { flex-direction: column; }
  .robots-form .btn-primary { width: 100%; justify-content: center; }
  .robots-form .input { width: 100%; }
  .url-tester-form { flex-direction: column; }
  .url-tester-form .input--select { width: 100%; }
  .btn-secondary { width: 100%; text-align: center; }
  .robots-status { flex-wrap: wrap; }
}

/* ── Raw actions bar (Copy / Edit / Re-check / Cancel) ───────── */
.robots-raw-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}
.btn-raw-action {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  transition: border-color .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn-raw-action:hover {
  border-color: var(--accent);
  background: rgba(91,138,248,.1);
}
.btn-raw-action:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn-raw-copy.btn-copied {
  border-color: var(--status-pass);
  color: var(--status-pass);
  background: rgba(61,214,140,.1);
}
.btn-raw-recheck {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white);
  border-color: transparent;
}
.btn-raw-recheck:hover {
  filter: brightness(1.1);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.btn-raw-cancel {
  color: var(--muted);
}

/* ── Edit textarea ───────────────────────────────────────────── */
.robots-edit-area {
  width: 100%;
  min-height: 260px;
  max-height: 500px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  white-space: pre;
  tab-size: 4;
  box-shadow: 0 0 0 3px rgba(91,138,248,.15);
  transition: border-color .2s, box-shadow .2s;
}
.robots-edit-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,138,248,.3);
}

/* ── Edited content note ─────────────────────────────────────── */
.robots-edited-note {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(91,138,248,.08);
  border: 1px solid rgba(91,138,248,.2);
  color: var(--accent);
  margin-bottom: 12px;
  animation: fadeInUp .3s var(--ease-out);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .robots-raw-actions {
    flex-direction: row;
  }
  .btn-raw-action {
    flex: 1;
    text-align: center;
  }
  .robots-edit-area {
    min-height: 200px;
  }
}

/* ── Bot Coverage Panel ──────────────────────────────────────────── */
.robots-bots-panel { margin-bottom: 4px; }

.bots-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bots-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: auto;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-explicit .legend-dot { background: var(--status-pass); }
.legend-wildcard .legend-dot { background: var(--status-warn); }
.legend-none .legend-dot { background: rgba(255,255,255,.12); border: 1px solid var(--border2); }

.bots-group { margin-bottom: 14px; }
.bots-group-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 8px;
}
.bots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  cursor: default;
  transition: border-color .15s;
  user-select: none;
}
.bot-pill:hover { border-color: var(--accent); }
.bot-state-explicit { border-color: rgba(61,214,140,.3); background: rgba(61,214,140,.06); }
.bot-state-wildcard { border-color: rgba(245,200,66,.25); background: rgba(245,200,66,.04); }
.bot-state-none { opacity: .65; }

.bot-icon {
  width: 16px; height: 16px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.5px;
}
.bot-label { font-weight: 500; white-space: nowrap; color: var(--text); }
.bot-status { font-size: 11px; font-weight: 700; flex-shrink: 0; }
.bot-icon-explicit { color: var(--status-pass); }
.bot-icon-wildcard { color: var(--status-warn); }
.bot-icon-none { color: rgba(255,255,255,.2); }

.bot-help-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.bot-help-btn:hover {
  background: rgba(91,138,248,.2);
  color: var(--accent);
  border-color: var(--accent);
}

/* Bot popover */
.bot-popover {
  z-index: 9999;
  background: var(--surface3, #1a1f35);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.3);
  animation: fadeInUp .18s ease-out;
  width: 300px;
}
.bot-pop-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  transition: color .15s;
}
.bot-pop-close:hover { color: var(--text); }
.bot-pop-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  padding-right: 24px;
  color: var(--text);
}
.bot-pop-ua {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(91,138,248,.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 400;
  color: var(--accent);
}
.bot-pop-desc {
  font-size: 13px;
  color: var(--muted2);
  margin: 0 0 10px;
  line-height: 1.5;
}
.bot-pop-hint-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.bot-pop-code {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  white-space: pre;
  line-height: 1.6;
  overflow-x: auto;
}

@media (max-width: 600px) {
  .bots-section-label { flex-direction: column; align-items: flex-start; gap: 6px; }
  .bots-legend { margin-left: 0; gap: 10px; }
}
