/*
 * Unified iSmart Parenting Hub article toolkit.
 *
 * Authors choose meaning in Gutenberg. The theme owns visual treatment.
 */

.single-post-layout .isp-callout {
  --isp-callout-accent: #31769f;
  --isp-callout-border: #cfe8f6;
  --isp-callout-surface: #f5fbfe;
  width: min(calc(100% - 32px), 820px);
  margin: clamp(30px, 5vw, 46px) auto 0;
  padding: clamp(20px, 3.8vw, 30px);
  border: 1px solid var(--isp-callout-border);
  border-left: 4px solid var(--isp-callout-accent);
  border-radius: 18px;
  background: var(--isp-callout-surface);
  box-shadow: 0 10px 28px rgba(68, 68, 68, .045);
  color: var(--isp-ink);
}

.single-post-layout .isp-callout--compact {
  padding: clamp(16px, 3vw, 22px);
  border-radius: 15px;
}

.single-post-layout .isp-callout__label-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.single-post-layout .isp-callout__icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--isp-callout-accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--isp-callout-accent) 10%, #fff);
  color: var(--isp-callout-accent);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
}

.single-post-layout .isp-callout__label {
  color: var(--isp-callout-accent);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.single-post-layout .isp-callout__heading {
  margin: 0 0 9px;
  color: var(--isp-ink);
  font-size: clamp(1.15rem, 2.2vw, 1.42rem);
  font-weight: 850;
  letter-spacing: -.015em;
  line-height: 1.25;
}

.single-post-layout .isp-callout__content {
  color: #4f4c4e;
  font-size: 1.02rem;
  line-height: 1.7;
}

.single-post-layout .isp-callout--compact .isp-callout__content {
  font-size: .98rem;
  line-height: 1.62;
}

.single-post-layout .isp-callout__content > *:first-child,
.single-post-layout .isp-article-conclusion__text > *:first-child {
  margin-top: 0;
}

.single-post-layout .isp-callout__content > *:last-child,
.single-post-layout .isp-article-conclusion__text > *:last-child {
  margin-bottom: 0;
}

/* High emphasis */
.single-post-layout .isp-callout--key-takeaway {
  --isp-callout-accent: #286f9a;
  --isp-callout-border: #bcddec;
  --isp-callout-surface: #f1f9fd;
  box-shadow: 0 14px 34px rgba(35, 120, 170, .07);
}

.single-post-layout .isp-callout--when-to-get-help {
  --isp-callout-accent: #8d3f62;
  --isp-callout-border: #e3bfd0;
  --isp-callout-surface: #fff7fa;
}

/* Action emphasis */
.single-post-layout .isp-callout--quick-tip,
.single-post-layout .isp-callout--do-this-first,
.single-post-layout .isp-callout--try-this,
.single-post-layout .isp-callout--next-step {
  --isp-callout-accent: #2d7a73;
  --isp-callout-border: #bee1dc;
  --isp-callout-surface: #f3fbf9;
}

.single-post-layout .isp-callout--say-this {
  --isp-callout-accent: #985079;
  --isp-callout-border: #e5c8d8;
  --isp-callout-surface: #fff8fb;
}

.single-post-layout .isp-callout--avoid-this {
  --isp-callout-accent: #a34f50;
  --isp-callout-border: #e7c9c7;
  --isp-callout-surface: #fff8f6;
}

/* Supporting emphasis */
.single-post-layout .isp-callout--watch-for {
  --isp-callout-accent: #8a6836;
  --isp-callout-border: #eadbbd;
  --isp-callout-surface: #fffaf0;
}

.single-post-layout .isp-callout--remember,
.single-post-layout .isp-callout--good-to-know {
  --isp-callout-accent: #62618d;
  --isp-callout-border: #d8d7ea;
  --isp-callout-surface: #f8f8fd;
}

/* Say This comparison */
.single-post-layout .isp-say-this__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.single-post-layout .isp-say-this__option {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(68, 68, 68, .10);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}

.single-post-layout .isp-say-this__option--try {
  border-color: color-mix(in srgb, var(--isp-callout-accent) 32%, transparent);
  background: #fff;
}

.single-post-layout .isp-say-this__option-label {
  display: block;
  margin-bottom: 7px;
  color: #6d696d;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.single-post-layout .isp-say-this__option blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--isp-ink);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.62;
}

.single-post-layout .isp-say-this__option--try blockquote {
  font-weight: 700;
}

.single-post-layout .isp-copy-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--isp-callout-accent) 38%, transparent);
  border-radius: 999px;
  background: #fff;
  color: var(--isp-callout-accent);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.single-post-layout .isp-copy-action:hover,
.single-post-layout .isp-copy-action:focus-visible {
  background: color-mix(in srgb, var(--isp-callout-accent) 7%, #fff);
  box-shadow: 0 7px 18px rgba(68, 68, 68, .07);
  transform: translateY(-1px);
}

.single-post-layout .isp-copy-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--isp-callout-accent) 22%, transparent);
  outline-offset: 2px;
}

.single-post-layout .isp-copy-action.is-copied {
  background: color-mix(in srgb, var(--isp-callout-accent) 12%, #fff);
}

/* Article conclusion remains a structural section, but matches toolkit rhythm. */
.single-post-layout .isp-article-conclusion {
  width: min(calc(100% - 32px), 820px);
  margin: clamp(42px, 6vw, 62px) auto 0;
  padding: clamp(26px, 4vw, 36px);
  border: 1px solid var(--isp-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(68, 68, 68, .035);
}

.single-post-layout .isp-article-conclusion h2 {
  margin: 0 0 13px;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.single-post-layout .isp-article-conclusion__text {
  color: #555255;
  font-size: 1.03rem;
  line-height: 1.72;
}

/* Shared interaction language for existing layout components. */
.single-post-layout .isp-related-card,
.single-post-layout .single-post-navigation a {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.single-post-layout .isp-related-card__media img {
  transition: transform 240ms cubic-bezier(.2, .72, .25, 1);
}

@media (hover: hover) {
  .single-post-layout .isp-related-card:hover {
    border-color: color-mix(in srgb, var(--isp-primary) 32%, var(--isp-border));
    box-shadow: 0 16px 34px rgba(68, 68, 68, .085);
    transform: translateY(-3px);
  }

  .single-post-layout .isp-related-card:hover .isp-related-card__media img {
    transform: scale(1.025);
  }

  .single-post-layout .single-post-navigation a:hover {
    transform: translateY(-2px);
  }
}

.single-post-layout .isp-related-card:focus-within {
  border-color: var(--isp-primary);
  box-shadow: 0 14px 30px rgba(68, 68, 68, .08);
}

.single-post-layout .post-tags a {
  display: inline-flex;
  margin: 4px 5px 4px 0;
  padding: 6px 10px;
  border: 1px solid var(--isp-border);
  border-radius: 999px;
  background: #fff;
  color: #5f5c5e;
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.single-post-layout .post-tags a:hover,
.single-post-layout .post-tags a:focus-visible {
  border-color: #b9dced;
  background: #f4fbff;
  color: #2378aa;
}

/* Reveal only elements that start below the viewport. JS adds these classes. */
.single-post-layout .isp-toolkit-reveal {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 420ms ease, transform 420ms cubic-bezier(.2, .72, .25, 1);
}

.single-post-layout .isp-toolkit-reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 620px) {
  .single-post-layout .isp-callout,
  .single-post-layout .isp-article-conclusion {
    width: min(calc(100% - 24px), 820px);
  }

  .single-post-layout .isp-callout {
    padding: 18px;
    border-radius: 15px;
  }

  .single-post-layout .isp-callout--compact {
    padding: 15px;
  }

  .single-post-layout .isp-callout__icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .single-post-layout .isp-say-this__comparison {
    grid-template-columns: 1fr;
  }

  .single-post-layout .isp-say-this__option {
    padding: 14px;
  }

  .single-post-layout .isp-article-conclusion {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-post-layout .isp-copy-action,
  .single-post-layout .isp-related-card,
  .single-post-layout .isp-related-card__media img,
  .single-post-layout .single-post-navigation a,
  .single-post-layout .post-tags a,
  .single-post-layout .isp-toolkit-reveal {
    transition: none !important;
  }

  .single-post-layout .isp-copy-action:hover,
  .single-post-layout .isp-copy-action:focus-visible,
  .single-post-layout .isp-related-card:hover,
  .single-post-layout .isp-related-card:hover .isp-related-card__media img,
  .single-post-layout .single-post-navigation a:hover,
  .single-post-layout .isp-toolkit-reveal {
    opacity: 1;
    transform: none;
  }
}
