/*
  Styles for the Cloud Provider connection guide only. Colours, type, spacing and radii all read
  the tokens defined on :root in styles.css; nothing here defines a new colour.
*/

/* Intro */
.guide-intro { padding-block: var(--space-xl) var(--space-lg); background: linear-gradient(var(--color-bg), var(--color-panel)); border-bottom: 1px solid var(--color-border); }
.guide-intro .wrap { display: grid; gap: var(--space-md); justify-items: start; }
.guide-intro h1 { font-family: var(--font-display); font-size: var(--font-size-xl); font-weight: var(--weight-regular); letter-spacing: -0.01em; max-width: 26ch; }
.guide-intro .kicker { color: var(--color-accent); font-size: var(--font-size-xs); letter-spacing: 0.1em; text-transform: uppercase; font-weight: var(--weight-medium); margin: 0; }
.guide-intro__lead { font-size: var(--font-size-lg); color: var(--color-muted); }

/* Walkthrough clip under the intro: the shared .clip/.frame rules and site.js toggle do the rest */
.guide-clip { padding-block: var(--space-xl) 0; }
.guide-clip figure { margin: 0; max-width: 60rem; }

/* Two columns on desktop: a sticky "On this page" list beside the content */
.guide-layout { display: grid; gap: var(--space-xl); padding-block: var(--space-xl) var(--space-2xl); }
.guide-body { display: grid; gap: var(--space-2xl); min-width: 0; }
@media (min-width: 960px) {
  .guide-layout { grid-template-columns: 14rem minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
  .toc { position: sticky; top: var(--space-xl); }
}

.guide-section { display: grid; gap: var(--space-md); padding-block: 0; min-width: 0; scroll-margin-top: var(--space-xl); }
.guide-section > h2 { font-family: var(--font-display); font-size: var(--font-size-xl); font-weight: var(--weight-regular); }
.guide-section > p { color: var(--color-text); }
.guide-section a { color: var(--color-accent); }

/* On this page */
.toc { padding: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-rest); min-width: 0; }
.toc__title { font-family: var(--font-body); font-size: var(--font-size-xs); letter-spacing: 0.1em; text-transform: uppercase; font-weight: var(--weight-medium); color: var(--color-accent); margin-bottom: var(--space-sm); }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.toc a { display: block; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; font-size: var(--font-size-sm); line-height: 1.35; }
.toc a:hover { background: var(--color-accent-soft); color: var(--color-accent); }
@media (min-width: 960px) {
  .toc ul { display: grid; gap: var(--space-2xs); }
}

/* Card grids: one column on phones, three on desktop */
.trio, .duo { display: grid; gap: var(--space-md); min-width: 0; }
.trio > .card, .duo > .card { min-width: 0; }
@media (min-width: 768px) { .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trio .card:hover, .duo .card:hover { transform: none; }
.trio .card__title, .duo .card__title { font-size: var(--font-size-md); }

/* Ordered steps with a numbered badge; each step pairs text with a drawn window */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xl); counter-reset: step; }
.step, .pair { display: grid; gap: var(--space-lg); align-items: center; min-width: 0; }
.step { counter-increment: step; }
@media (min-width: 768px) {
  .step, .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); }
}
.step__text { display: grid; gap: var(--space-sm); min-width: 0; align-content: start; }
.step__text p { color: var(--color-text); }
.step__title { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); font-size: var(--font-size-lg); font-weight: var(--weight-medium); color: var(--color-strong); }
.step__title::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-medium);
}
.pair .step__text { align-content: center; }

/* Plain ordered list in the "Before you start" prose */
.prose-list { margin: 0; padding-left: 1.5rem; display: grid; gap: var(--space-sm); color: var(--color-text); max-width: var(--measure); }
.prose-list li::marker { color: var(--color-accent); font-weight: var(--weight-medium); }

/* Illustrations: a small drawn app or browser window */
.illus { min-width: 0; }
.illus__caption { margin-top: var(--space-xs); font-size: var(--font-size-xs); color: var(--color-muted); text-align: center; }
.mock {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-rest);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  overflow: hidden;
}
.mock__bar { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); background: var(--color-panel); border-bottom: 1px solid var(--color-border); min-width: 0; }
.mock__dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-border-strong); flex: none; }
.mock__bar b { margin-left: var(--space-xs); font-size: var(--font-size-xs); font-weight: var(--weight-medium); color: var(--color-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mock__url { flex: 1; min-width: 0; padding: var(--space-2xs) var(--space-md); margin-left: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-muted); font-size: var(--font-size-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__body { display: grid; gap: var(--space-sm); align-content: start; padding: var(--space-md); min-width: 0; }
.mock__title { font-weight: var(--weight-bold); color: var(--color-strong); }
.mock__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); min-width: 0; }
.mock__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}
.mock__btn--target { box-shadow: 0 0 0 3px var(--color-accent-soft); animation: guide-press 4.8s ease-in-out infinite; }
.mock__btn--target::after {
  content: "";
  position: absolute;
  inset: -0.45rem;
  border-radius: inherit;
  border: 2px solid var(--color-accent);
  opacity: 0;
  pointer-events: none;
  animation: guide-ripple 4.8s ease-out infinite;
}
.mock__chip { display: inline-flex; padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-bg); font-size: var(--font-size-xs); font-family: var(--font-mono); overflow-wrap: anywhere; }
.mock__note { color: var(--color-muted); font-size: var(--font-size-xs); }
.mock__status { display: flex; align-items: center; gap: var(--space-sm); color: var(--color-strong); font-weight: var(--weight-medium); }
.mock__dot--ok { background: var(--color-ok); }
.mock__warn {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-warn) 12%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-warn) 45%, var(--color-surface));
  color: var(--color-strong);
  font-size: var(--font-size-xs);
}
.mock__warn strong { font-size: var(--font-size-sm); }
.mock__perm { justify-content: space-between; padding-top: var(--space-sm); border-top: 1px solid var(--color-border); }
.mock__list { margin: 0; padding: 0; list-style: none; display: grid; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.mock__list li { padding: var(--space-xs) var(--space-md); }
.mock__list li + li { border-top: 1px solid var(--color-border); }
.mock__list .is-selected { background: var(--color-selected); color: var(--color-strong); font-weight: var(--weight-medium); }
.mock--browser .mock__bar { background: var(--color-panel); }

/* Motion: a short press on the target, then the result appears. Static with reduced motion. */
@keyframes guide-press {
  0%, 34%, 52%, 100% { transform: scale(1); }
  40% { transform: scale(0.96); }
}
@keyframes guide-ripple {
  0%, 36% { opacity: 0; transform: scale(0.9); }
  42% { opacity: 1; transform: scale(1); }
  62%, 100% { opacity: 0; transform: scale(1.3); }
}
@keyframes guide-reveal {
  0%, 44% { opacity: 0; transform: translateY(0.3rem); }
  56%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
.mock__result { animation: guide-reveal 4.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mock__btn--target,
  .mock__btn--target::after,
  .mock__result { animation: none; }
  .mock__btn--target::after { display: none; }
}

/* Troubleshooting: native disclosure widgets, keyboard friendly */
.faq { display: grid; gap: var(--space-sm); min-width: 0; }
.faq details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); min-width: 0; }
.faq details[open] { border-color: var(--color-border-strong); box-shadow: var(--shadow-rest); }
.faq summary { cursor: pointer; font-weight: var(--weight-medium); color: var(--color-strong); padding: var(--space-xs) 0; line-height: 1.4; }
.faq summary:focus-visible { border-radius: var(--radius-sm); }
.faq details p { margin-top: var(--space-sm); color: var(--color-text); }
.faq details p + p { margin-top: var(--space-sm); }
