/* ═══════════════════════════════════════════════════════════════════
   robots-tool.css  -  Robots.txt Generator
   Accent: Blue (#2563eb) + Green (#16a34a)  |  Light theme
   Scoped under .rbt-wrap to match project conventions
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset + Variables on the wrapper class ─────────────────────── */
.rbt-wrap *,
.rbt-wrap *::before,
.rbt-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.rbt-wrap {
  --rbt-blue:        #2563eb;
  --rbt-blue-dark:   #1d4ed8;
  --rbt-blue-light:  #eff6ff;
  --rbt-blue-mid:    #bfdbfe;
  --rbt-green:       #16a34a;
  --rbt-green-dark:  #15803d;
  --rbt-green-light: #f0fdf4;
  --rbt-green-mid:   #bbf7d0;
  --rbt-text:        #0f172a;
  --rbt-text-2:      #475569;
  --rbt-text-3:      #94a3b8;
  --rbt-border:      #e2e8f0;
  --rbt-border-2:    #cbd5e1;
  --rbt-surface:     #ffffff;
  --rbt-surface-2:   #f8fafc;
  --rbt-surface-3:   #f1f5f9;
  --rbt-radius:      12px;
  --rbt-radius-sm:   8px;
  --rbt-shadow:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --rbt-font:        'DM Sans', system-ui, -apple-system, sans-serif;
  --rbt-mono:        'DM Mono', 'Fira Code', 'Cascadia Code', monospace;
  --rbt-tr:          all .18s cubic-bezier(.4,0,.2,1);

  font-family: var(--rbt-font);
  color: var(--rbt-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: transparent;
  width: 100%;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.rbt-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-bottom: 1px solid var(--rbt-border);
  padding: 52px 24px 44px;
  text-align: center;
  width: 100%;
}

.rbt-hero-inner {
  max-width: 620px;
  margin: 0 auto;
}

.rbt-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rbt-surface);
  border: 1px solid var(--rbt-blue-mid);
  color: var(--rbt-blue);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.rbt-hero-badge svg { width: 14px; height: 14px; flex-shrink: 0; }

.rbt-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.03em;
  color: var(--rbt-text);
  margin-bottom: 14px;
}

.rbt-hero h1 .rbt-grad {
  background: linear-gradient(135deg, var(--rbt-blue) 0%, var(--rbt-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rbt-hero p {
  font-size: 1rem;
  color: var(--rbt-text-2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Two-column page layout ────────────────────────────────────── */
.rbt-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.rbt-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.rbt-right {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.rbt-card {
  background: var(--rbt-surface);
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  box-shadow: var(--rbt-shadow);
  overflow: hidden;
  width: 100%;
}

.rbt-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--rbt-border);
  background: var(--rbt-surface-2);
}

.rbt-card-icon {
  width: 17px;
  height: 17px;
  color: var(--rbt-blue);
  flex-shrink: 0;
}
.rbt-card-icon.green { color: var(--rbt-green); }

.rbt-card-title {
  font-size: .845rem;
  font-weight: 700;
  color: var(--rbt-text);
  letter-spacing: -.01em;
}

.rbt-card-body { padding: 18px; }

/* ── Templates strip ───────────────────────────────────────────── */
.rbt-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rbt-tpl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--rbt-border-2);
  background: var(--rbt-surface);
  font-family: var(--rbt-font);
  font-size: .78rem;
  font-weight: 600;
  color: var(--rbt-text-2);
  cursor: pointer;
  transition: var(--rbt-tr);
  white-space: nowrap;
  line-height: 1;
}
.rbt-tpl-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.rbt-tpl-btn:hover { border-color: var(--rbt-blue); color: var(--rbt-blue); background: var(--rbt-blue-light); }
.rbt-tpl-btn.ai-btn:hover { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }

/* ── UA block ──────────────────────────────────────────────────── */
.rbt-ua-block {
  border: 1.5px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  overflow: hidden;
  transition: border-color .15s;
  background: var(--rbt-surface);
}
.rbt-ua-block:focus-within { border-color: var(--rbt-blue); }

.rbt-ua-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--rbt-surface-2);
  border-bottom: 1px solid var(--rbt-border);
}

.rbt-ua-drag { width: 16px; height: 16px; color: var(--rbt-text-3); cursor: grab; flex-shrink: 0; }

.rbt-ua-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--rbt-text-2);
  flex: 1;
}

.rbt-ua-remove {
  width: 24px; height: 24px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--rbt-text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--rbt-tr);
  flex-shrink: 0;
}
.rbt-ua-remove:hover { background: #fee2e2; color: #dc2626; }
.rbt-ua-remove svg   { width: 13px; height: 13px; }

.rbt-ua-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ── Form primitives ───────────────────────────────────────────── */
.rbt-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--rbt-text-2);
  margin-bottom: 5px;
  letter-spacing: -.01em;
}

.rbt-input,
.rbt-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--rbt-border-2);
  border-radius: var(--rbt-radius-sm);
  background: var(--rbt-surface);
  font-family: var(--rbt-font);
  font-size: .855rem;
  color: var(--rbt-text);
  transition: var(--rbt-tr);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.4;
}
.rbt-input:focus,
.rbt-select:focus {
  border-color: var(--rbt-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.rbt-input::placeholder { color: var(--rbt-text-3); }

.rbt-select-wrap { position: relative; }
.rbt-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--rbt-text-3);
  pointer-events: none;
}

.rbt-custom-ua { display: none; margin-top: 6px; }

/* ── Rules ─────────────────────────────────────────────────────── */
.rbt-rules-list { display: flex; flex-direction: column; gap: 5px; }

.rbt-rule-row {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  gap: 5px;
  align-items: center;
}

.rbt-rule-type {
  padding: 7px 9px;
  border: 1.5px solid var(--rbt-border-2);
  border-radius: var(--rbt-radius-sm);
  font-family: var(--rbt-font);
  font-size: .78rem;
  font-weight: 600;
  background: var(--rbt-surface);
  color: var(--rbt-text);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--rbt-tr);
}
.rbt-rule-type:focus { border-color: var(--rbt-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.rbt-rule-path {
  padding: 7px 10px;
  border: 1.5px solid var(--rbt-border-2);
  border-radius: var(--rbt-radius-sm);
  font-family: var(--rbt-mono);
  font-size: .8rem;
  color: var(--rbt-text);
  background: var(--rbt-surface);
  outline: none;
  width: 100%;
  transition: var(--rbt-tr);
}
.rbt-rule-path:focus { border-color: var(--rbt-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.rbt-rule-path::placeholder { color: var(--rbt-text-3); }

.rbt-rule-del {
  width: 28px; height: 28px;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--rbt-text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--rbt-tr);
  flex-shrink: 0;
}
.rbt-rule-del:hover { background: #fee2e2; color: #dc2626; }
.rbt-rule-del svg   { width: 12px; height: 12px; }

.rbt-add-rule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1.5px dashed var(--rbt-border-2);
  background: transparent;
  font-family: var(--rbt-font);
  font-size: .78rem;
  font-weight: 600;
  color: var(--rbt-text-2);
  cursor: pointer;
  transition: var(--rbt-tr);
  line-height: 1;
}
.rbt-add-rule:hover { border-color: var(--rbt-blue); color: var(--rbt-blue); background: var(--rbt-blue-light); }
.rbt-add-rule svg   { width: 12px; height: 12px; }

/* ── Settings ──────────────────────────────────────────────────── */
.rbt-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Add UA ────────────────────────────────────────────────────── */
.rbt-add-ua {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--rbt-radius-sm);
  border: 1.5px dashed var(--rbt-border-2);
  background: var(--rbt-surface);
  font-family: var(--rbt-font);
  font-size: .845rem; font-weight: 600;
  color: var(--rbt-text-2);
  cursor: pointer;
  transition: var(--rbt-tr);
  width: 100%;
}
.rbt-add-ua:hover { border-color: var(--rbt-blue); color: var(--rbt-blue); background: var(--rbt-blue-light); }
.rbt-add-ua svg   { width: 14px; height: 14px; }

/* ── Generate button ───────────────────────────────────────────── */
.rbt-generate-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--rbt-radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--rbt-blue) 0%, #1e40af 100%);
  color: #fff;
  font-family: var(--rbt-font);
  font-size: .95rem; font-weight: 700;
  cursor: pointer;
  transition: var(--rbt-tr);
  box-shadow: 0 2px 10px rgba(37,99,235,.28);
  line-height: 1;
}
.rbt-generate-btn:hover {
  background: linear-gradient(135deg, var(--rbt-blue-dark) 0%, #1e3a8a 100%);
  box-shadow: 0 4px 18px rgba(37,99,235,.38);
  transform: translateY(-1px);
}
.rbt-generate-btn:active { transform: translateY(0); }
.rbt-generate-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ── Output ────────────────────────────────────────────────────── */
.rbt-output-wrap { position: relative; }

.rbt-output-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rbt-border);
  background: var(--rbt-surface-2);
  gap: 8px; flex-wrap: wrap;
}

.rbt-output-title {
  font-size: .75rem; font-weight: 700;
  color: var(--rbt-text-2);
  letter-spacing: .04em; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.rbt-output-title svg { width: 13px; height: 13px; }

.rbt-output-actions { display: flex; gap: 6px; }

.rbt-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1.5px solid var(--rbt-border-2);
  background: var(--rbt-surface);
  font-family: var(--rbt-font);
  font-size: .76rem; font-weight: 600;
  color: var(--rbt-text-2);
  cursor: pointer;
  transition: var(--rbt-tr);
  white-space: nowrap; line-height: 1;
}
.rbt-action-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.rbt-action-btn:hover { border-color: var(--rbt-blue); color: var(--rbt-blue); background: var(--rbt-blue-light); }
.rbt-action-btn.rbt-download:hover { border-color: var(--rbt-green); color: var(--rbt-green); background: var(--rbt-green-light); }
.rbt-action-btn.rbt-copied { border-color: var(--rbt-green) !important; color: var(--rbt-green) !important; background: var(--rbt-green-light) !important; }

/* Code block */
.rbt-output-code {
  padding: 18px 20px;
  min-height: 240px;
  max-height: 460px;
  overflow-y: auto;
  font-family: var(--rbt-mono);
  font-size: .81rem;
  line-height: 1.9;
  color: var(--rbt-text);
  background: #fafbff;
  white-space: pre;
  cursor: text;
  user-select: all;
  border-radius: 0 0 var(--rbt-radius) var(--rbt-radius);
}

/* Syntax tokens */
.rbt-output-code .tok-comment  { color: #64748b; font-style: italic; }
.rbt-output-code .tok-ua       { color: var(--rbt-blue); font-weight: 700; }
.rbt-output-code .tok-disallow { color: #dc2626; }
.rbt-output-code .tok-allow    { color: var(--rbt-green); font-weight: 600; }
.rbt-output-code .tok-sitemap  { color: #7c3aed; }
.rbt-output-code .tok-crawl    { color: #d97706; }
.rbt-output-code .tok-key      { font-weight: 600; }

/* Empty state */
.rbt-output-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--rbt-text-3);
  font-size: .845rem;
  text-align: center;
  font-family: var(--rbt-font);
}
.rbt-output-empty svg { width: 36px; height: 36px; opacity: .4; }

/* ── Validation ────────────────────────────────────────────────── */
.rbt-validation {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--rbt-radius-sm);
  font-family: var(--rbt-font);
  font-size: .79rem; font-weight: 500;
  line-height: 1.5;
  border: 1.5px solid var(--rbt-border);
  color: var(--rbt-text-2);
  background: var(--rbt-surface-2);
}
.rbt-validation.rbt-valid,
.rbt-validation.rbt-error { display: flex; }
.rbt-validation svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.rbt-validation.rbt-valid { background: var(--rbt-green-light); border-color: var(--rbt-green-mid); color: var(--rbt-green-dark); }
.rbt-validation.rbt-error { background: #fff1f2; border-color: #fecdd3; color: #be123c; }

/* ── Deploy steps ──────────────────────────────────────────────── */
.rbt-deploy-list { display: flex; flex-direction: column; gap: 10px; }

.rbt-deploy-step { display: flex; gap: 10px; font-size: .84rem; color: var(--rbt-text-2); line-height: 1.55; }

.rbt-deploy-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--rbt-blue-light);
  color: var(--rbt-blue);
  font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

.rbt-inline-code {
  font-family: var(--rbt-mono);
  font-size: .74rem;
  background: var(--rbt-surface-3);
  border: 1px solid var(--rbt-border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--rbt-blue);
  word-break: break-all;
}

/* ── SEO section ───────────────────────────────────────────────── */
.rbt-seo {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.rbt-divider { border: none; border-top: 1px solid var(--rbt-border); margin: 40px 0 32px; }

.rbt-section-head { margin-bottom: 20px; }
.rbt-section-head h2 { font-size: 1.3rem; font-weight: 800; color: var(--rbt-text); letter-spacing: -.025em; margin-bottom: 5px; }
.rbt-section-head p  { font-size: .875rem; color: var(--rbt-text-2); line-height: 1.6; }

.rbt-seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}

.rbt-seo-card {
  background: var(--rbt-surface);
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  padding: 20px;
  box-shadow: var(--rbt-shadow);
}
.rbt-seo-card h3 { font-size: .92rem; font-weight: 700; color: var(--rbt-text); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.rbt-seo-card p, .rbt-seo-card li { font-size: .855rem; color: var(--rbt-text-2); line-height: 1.7; }
.rbt-seo-card ul { padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.rbt-seo-card p + p { margin-top: 6px; }

.rbt-dot        { width: 8px; height: 8px; border-radius: 50%; background: var(--rbt-blue); flex-shrink: 0; display: inline-block; }
.rbt-dot-green  { background: var(--rbt-green); }
.rbt-dot-purple { background: #7c3aed; }
.rbt-dot-amber  { background: #d97706; }

.rbt-code-block {
  font-family: var(--rbt-mono);
  font-size: .77rem; line-height: 1.9;
  background: var(--rbt-surface-2);
  border: 1px solid var(--rbt-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
  color: var(--rbt-text-2);
  white-space: pre;
  overflow-x: auto;
}

/* Mistakes */
.rbt-mistakes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rbt-mistake-item {
  display: flex; gap: 10px;
  padding: 13px;
  border-radius: var(--rbt-radius-sm);
  border: 1px solid var(--rbt-border);
  background: var(--rbt-surface);
  font-size: .845rem; color: var(--rbt-text-2); line-height: 1.55;
}
.rbt-mistake-item svg    { width: 15px; height: 15px; color: #dc2626; flex-shrink: 0; margin-top: 2px; }
.rbt-mistake-item strong { color: var(--rbt-text); }

/* FAQ */
.rbt-faq { max-width: 760px; margin: 0 auto; }
.rbt-faq h2 { font-size: 1.3rem; font-weight: 800; color: var(--rbt-text); margin-bottom: 18px; text-align: center; letter-spacing: -.025em; }

.rbt-faq-item { border: 1px solid var(--rbt-border); border-radius: var(--rbt-radius-sm); margin-bottom: 7px; overflow: hidden; background: var(--rbt-surface); }

.rbt-faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 13px 16px;
  background: none; border: none;
  font-family: var(--rbt-font); font-size: .875rem; font-weight: 600; color: var(--rbt-text);
  cursor: pointer; transition: color .15s; line-height: 1.4;
}
.rbt-faq-q:hover { color: var(--rbt-blue); }

.rbt-faq-arrow { width: 15px; height: 15px; flex-shrink: 0; color: var(--rbt-text-3); transition: transform .2s ease; }
.rbt-faq-item.rbt-open .rbt-faq-arrow { transform: rotate(180deg); }

.rbt-faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.rbt-faq-item.rbt-open .rbt-faq-a { max-height: 400px; }

.rbt-faq-a-inner {
  padding: 11px 16px 14px;
  font-family: var(--rbt-font); font-size: .855rem;
  color: var(--rbt-text-2); line-height: 1.7;
  border-top: 1px solid var(--rbt-border);
}

/* ── Utilities ─────────────────────────────────────────────────── */
.rbt-gap-12 { display: flex; flex-direction: column; gap: 12px; }
.rbt-gap-16 { display: flex; flex-direction: column; gap: 14px; }
.rbt-mb-8   { margin-bottom: 8px; }

/* Output scrollbar */
.rbt-output-code::-webkit-scrollbar       { width: 4px; height: 4px; }
.rbt-output-code::-webkit-scrollbar-track { background: transparent; }
.rbt-output-code::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .rbt-page  { grid-template-columns: 1fr; }
  .rbt-right { position: static; }
}

@media (max-width: 640px) {
  .rbt-hero  { padding: 32px 16px 28px; }
  .rbt-page  { padding: 18px 14px 48px; gap: 16px; }
  .rbt-seo   { padding: 0 14px 48px; }
  .rbt-settings-grid { grid-template-columns: 1fr; }
  .rbt-rule-row      { grid-template-columns: 105px 1fr 28px; gap: 4px; }
  .rbt-generate-btn  {
    position: sticky;
    bottom: 14px;
    z-index: 20;
    box-shadow: 0 4px 24px rgba(37,99,235,.38);
  }
}
