/* ================================================================
   carousel/regras.css — Section 06 Agent Rules
   Structured instructions for AI agent carousel generation
   ================================================================ */


/* ── Sub-section headings ── */
.crsl-rl-heading {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 56px 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.crsl-rl-heading:first-of-type {
  margin-top: 40px;
}

/* ── Intro paragraphs under each heading ── */
.crsl-rl-intro {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 24px;
  max-width: 720px;
}

/* ── Note (small annotation) ── */
.crsl-rl-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
  margin-top: 12px;
  margin-bottom: 24px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.crsl-rl-note code {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 1px 5px;
  background: var(--surface-2);
  border-radius: 3px;
}


/* ════════════════════════════════════════════════
   6.1 — Boilerplate Preview
   ════════════════════════════════════════════════ */
.crsl-rl-boilerplate-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  width: 100%;
}
.crsl-rl-boilerplate-preview__line {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  padding: 1px 0;
  white-space: pre;
}
.crsl-rl-boilerplate-preview__line--dim {
  color: var(--text-3);
  opacity: 0.6;
}


/* ════════════════════════════════════════════════
   6.2 — Decision Tree (background choice)
   ════════════════════════════════════════════════ */
.crsl-rl-decision-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 32px;
}
.crsl-rl-decision-tree__rule {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 13px;
  line-height: 1.55;
}
.crsl-rl-decision-tree__rule:last-child {
  border-bottom: none;
}
.crsl-rl-decision-tree__label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 1px;
}
.crsl-rl-decision-tree__value {
  color: var(--text-2);
}
.crsl-rl-decision-tree__value code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text);
}
.crsl-rl-decision-tree__value strong {
  font-weight: 600;
  color: var(--text);
}
.crsl-rl-decision-tree__separator {
  height: 0;
  border-bottom: 1px dashed var(--border);
}
.crsl-rl-decision-tree__rule--highlight {
  background: rgba(175, 109, 255, 0.04);
}
.crsl-rl-decision-tree__rule--highlight .crsl-rl-decision-tree__label {
  color: #AF6DFF;
}


/* ════════════════════════════════════════════════
   6.3 & 6.4 — Tables
   ════════════════════════════════════════════════ */
.crsl-rl-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.crsl-rl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}
.crsl-rl-table th {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.crsl-rl-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}
.crsl-rl-table tbody tr:last-child td {
  border-bottom: none;
}
.crsl-rl-table tbody tr:hover {
  background: var(--surface);
}
.crsl-rl-table code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text);
  white-space: nowrap;
}

/* Contrast table specific */
.crsl-rl-table--contrast td:first-child {
  white-space: nowrap;
}


/* ── Color swatches for contrast table ── */
.crsl-rl-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.crsl-rl-swatch--preto {
  background: linear-gradient(170deg, #141318, #0D0D12);
}
.crsl-rl-swatch--creme {
  background: linear-gradient(170deg, #FFFFFF, #FBF9F4);
  border-color: rgba(0, 0, 0, 0.15);
}
.crsl-rl-swatch--azul {
  background: linear-gradient(170deg, #003A8C, #002868);
}
.crsl-rl-swatch--roxo {
  background: linear-gradient(170deg, #5B22C7, #3D1485);
}
.crsl-rl-swatch--vermelho {
  background: linear-gradient(170deg, #C42E10, #8E1E08);
}
.crsl-rl-swatch--verde {
  background: linear-gradient(170deg, #2D5A00, #1A3D00);
}


/* ════════════════════════════════════════════════
   6.5 — Don'ts List
   ════════════════════════════════════════════════ */
.crsl-rl-donts {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.crsl-rl-donts__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.crsl-rl-donts__item:last-child {
  border-bottom: none;
}
.crsl-rl-donts__item::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #F84F2E;
  display: flex;
  align-items: center;
  justify-content: center;
  /* X mark via box-shadow trick */
  background-image:
    linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%);
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}
.crsl-rl-donts__item code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text);
}


/* ════════════════════════════════════════════════
   6.6 — Quality Checklist
   ════════════════════════════════════════════════ */
.crsl-rl-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.crsl-rl-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.crsl-rl-checklist__item:last-child {
  border-bottom: none;
}
.crsl-rl-checklist__item::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crsl-rl-checklist__item code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text);
}


/* ════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .crsl-rl-decision-tree__rule {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .crsl-rl-table {
    font-size: 12px;
  }
  .crsl-rl-table th,
  .crsl-rl-table td {
    padding: 8px 12px;
  }
}
