/* =========================================================
   Safetics Docs Blocks — scoped to .sd-* classes only
   --------------------------------------------------------
   This stylesheet ONLY styles the 6 custom blocks. It does not
   touch the BetterDocs sidebar, content area, or any other
   element on the page.
   ========================================================= */

/* ---------- Chapter ---------- */
.sd-chapter {
  background: #f9fafb;
  border: 1px solid #e5e8eb;
  border-radius: 18px;
  padding: 24px 26px;
  margin: 24px 0;
}
.sd-chapter-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.sd-chapter-no {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e8f3ff;
  color: #1b64da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: none;
  font-size: 16px;
  line-height: 1;
}
.sd-chapter-heading { flex: 1; min-width: 0; }
.sd-chapter-title {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.03em;
  margin: 0 0 4px;
  font-weight: 800;
  color: #191f28;
}
.sd-chapter-lead {
  margin: 0;
  color: #6b7684;
  font-size: 14px;
  line-height: 1.5;
}
.sd-chapter-body > *:last-child { margin-bottom: 0; }

/* ---------- Numbered Heading ---------- */
.sd-numbered-heading {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #191f28;
  margin: 22px 0 8px;
  letter-spacing: -.02em;
}
.sd-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff8a24;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: none;
  line-height: 1;
}
.sd-num-title { flex: 1; min-width: 0; }

/* ---------- Callout ---------- */
.sd-callout {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0;
  border: 1px solid #e5e8eb;
  background: #f9fafb;
  align-items: flex-start;
}
.sd-callout-symbol {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 16px;
  flex: none;
  line-height: 1;
}
.sd-callout-body {
  color: #4e5968;
  font-size: 14px;
  line-height: 1.7;
}
.sd-callout-body > *:first-child { margin-top: 0; }
.sd-callout-body > *:last-child { margin-bottom: 0; }
.sd-callout-body strong { color: #191f28; }

.sd-callout-info { background: #e8f3ff; border-color: #bfdcff; }
.sd-callout-info .sd-callout-symbol { color: #1b64da; }

.sd-callout-warn { background: #fff4e6; border-color: #ffd9a8; }
.sd-callout-warn .sd-callout-symbol { color: #ff8a00; }

.sd-callout-danger { background: #fff1f3; border-color: #ffd0d6; }
.sd-callout-danger .sd-callout-symbol { color: #f04452; }

/* ---------- Image with Caption ---------- */
.sd-figure {
  margin: 18px auto;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  background: #f9fafb;
  padding: 12px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
}
.sd-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: inline-block;
  box-shadow: none;
}
.sd-figure-link {
  display: inline-block;
  text-decoration: none;
  border-bottom: 0;
}
.sd-figure-caption {
  margin: 10px 0 4px;
  font-size: 13px;
  color: #6b7684;
  font-weight: 600;
  text-align: center;
  font-style: normal;
  line-height: 1.5;
}

/* ---------- Details ---------- */
.sd-details {
  border: 1px solid #e5e8eb;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  margin: 14px 0;
  overflow: hidden;
}
.sd-details-summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 800;
  color: #191f28;
  list-style: none;
  font-size: 15px;
}
.sd-details-summary::-webkit-details-marker { display: none; }
.sd-details-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: #8b95a1;
  transition: transform .2s;
}
.sd-details[open] .sd-details-summary::before { transform: rotate(90deg); }
.sd-details-body {
  border-top: 1px solid #e5e8eb;
  padding: 14px 18px;
  color: #4e5968;
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Table ---------- */
.sd-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 14px;
  border: 1px solid #e5e8eb;
  background: #fff;
}
.sd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  margin: 0;
}
.sd-table th,
.sd-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e8eb;
  vertical-align: top;
  line-height: 1.5;
}
.sd-table th {
  background: #f9fafb;
  color: #4e5968;
  font-size: 12px;
  letter-spacing: -.01em;
  font-weight: 800;
  text-transform: uppercase;
}
.sd-table tr:last-child td { border-bottom: 0; }
.sd-table td:first-child { font-weight: 700; color: #191f28; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .sd-chapter { padding: 20px 18px; }
  .sd-chapter-header { flex-direction: column; }
  .sd-callout { grid-template-columns: 1fr; }
}
