/* ─────────────────────────────────────────────────────────────
   Pythonspot: native callout components
   Design rules: looks like part of the documentation, not an ad.
   - No full-bleed banners
   - No animation that draws the eye
   - Accent border + muted surface, same visual language as code.css
   ───────────────────────────────────────────────────────────── */

/* 1. End of article callout -------------------------------------- */
/* Neutral on purpose. It is a note at the end of the tutorial, not a
   banner, so it uses the same greys as the surrounding page. The only
   thing that stands out is the button. */
.ps-callout {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #cbd5e1;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 2.2rem 0 1.6rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
  clear: both;
}
.ps-callout-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  color: #64748b;
  margin: 0 0 6px;
}
.ps-callout-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.4;
}
.ps-callout-text {
  display: block;
  margin: 0 0 14px;
  color: #475569;
}

/* One primary action, one quiet link */
.ps-callout-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
}
.ps-btn {
  display: inline-block;
  background: #334155;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none !important;
  line-height: 1.4;
  white-space: nowrap;
}
.ps-btn:hover { background: #1e293b; text-decoration: none !important; }
.ps-btn--ghost {
  background: transparent;
  color: #1a0dab !important;
  border: 0;
  padding: 0;
  text-decoration: underline !important;
  font-weight: 400;
}
.ps-btn--ghost:hover { background: transparent; color: #010044 !important; }

/* 2. Inline tip (mid article) ----------------------------------- */
/* Deliberately not a box and not a coloured link. It has to read as a
   sentence the author wrote, because a coloured panel in the middle of
   a tutorial is the thing readers scroll past. The link uses the same
   colour as every other link in the body. */
.ps-tip {
  display: block;
  margin: 1.3rem 0;
  line-height: 1.75;
  color: inherit;
}
.ps-tip b { color: #0f172a; }
.ps-tip a,
.ps-tip a:visited { color: #1a0dab; text-decoration: underline; }
.ps-tip a:hover { color: #010044; }

/* 3. Related tutorials (internal linking) ----------------------- */
.ps-related {
  margin: 2.4rem 0 1rem;
  padding: 18px 20px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fff;
}
.ps-related h2 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  font-weight: 700;
  margin: 0 0 12px;
  border: none;
  line-height: 1.3;
}
.ps-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px 18px;
}
.ps-related li { margin: 0; padding: 0; }
.ps-related li a {
  display: block;
  font-size: .9rem;
  line-height: 1.5;
  padding: 5px 0;
  color: #1a0dab;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}
.ps-related li a:hover { text-decoration: underline; }

/* 4. Breadcrumb (visible, matches existing JSON-LD) ------------- */
.ps-crumbs {
  font-size: .78rem;
  color: #94a3b8;
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.6;
}
.ps-crumbs a { color: #64748b; text-decoration: none; }
.ps-crumbs a:hover { color: #1a0dab; text-decoration: underline; }
.ps-crumbs span { margin: 0 6px; color: #64748b; }

/* 5. The practice bar ------------------------------------------- */
/* Visible by default, because the link has to work with JavaScript
   blocked and because a link a reader has to scroll to find is a link
   they never click. It floats in the bottom corner and is a single line
   high, so it covers nothing. js/promo.js only ever takes it away, and
   only after the reader dismisses it. */
#ppc-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 0);
  background: #1a1a2e;
  color: #fff;
  padding: 6px 6px 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  border: 1px solid #2d2d4e;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .22);
  max-width: calc(100vw - 24px);
}
#ppc-bar.ps-hidden { display: none; }
.ps-no-bar #ppc-bar { display: none; }
/* Message plus a real button, inside one anchor so the whole unit is
   the target. Height stays at 44px and the message never exceeds 45
   characters, so nothing truncates on a phone. */
#ppc-bar .ppc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  min-width: 0;
}
.ppc-msg {
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ppc-bar .ppc-link .ps-btn {
  background: #0ea5e9;
  color: #082f49;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1;
}
#ppc-bar .ppc-link:hover .ps-btn { background: #38bdf8; }
#ppc-bar .ppc-link:hover .ppc-msg { color: #fff; }
#ppc-bar button {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 999px;
}
#ppc-bar button:hover { color: #e2e8f0; background: #2d2d4e; }
.ppc-spacer { display: none; }

/* 6. Tools strip on hub / index pages --------------------------- */
.ps-tools {
  max-width: 1000px;
  margin: 0 auto 28px;
  padding: 0 20px;
}
.ps-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.ps-tool {
  --ps-accent: #3b82f6;
  --ps-ink: #1d4ed8;
  display: block;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-top: 3px solid var(--ps-accent);
  border-radius: 5px;
  padding: 16px 18px;
  text-decoration: none !important;
  transition: box-shadow .15s;
}
.ps-tool--sql   { --ps-accent: #0ea5e9; --ps-ink: #0369a1; }
.ps-tool--linux { --ps-accent: #22c55e; --ps-ink: #15803d; }
.ps-tool:hover { box-shadow: 0 2px 10px rgba(15, 23, 42, .08); text-decoration: none !important; }
.ps-tool-name {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 5px;
  line-height: 1.35;
}
.ps-tool-desc {
  display: block;
  font-size: .85rem;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.55;
}
.ps-tool-cta {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ps-ink);
}
.ps-tool-cta::after { content: ' \2192'; }
.ps-section-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  font-weight: 700;
  margin: 26px 0 12px;
}

/* 7. Responsive ------------------------------------------------ */
@media (max-width: 750px) {
  #ppc-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    justify-content: space-between;
  }
  .ps-related ul { grid-template-columns: 1fr; }
  .ps-callout { padding: 16px; }
  .ps-callout-actions { gap: 10px; }
  #ppc-bar .ppc-link .ps-btn { padding: 7px 12px; font-size: 12px; }
  .ps-callout .ps-btn { font-size: .84rem; padding: 8px 14px; }
}
@media print {
  #ppc-bar, .ps-callout, .ps-tools { display: none !important; }
}
