/* Serverpod markdown directives, rendered by lib/src/blog/markdown_renderer.dart
   and specified in doc/serverpod_markdown_spec.md. The renderer emits the class
   names below; all styling lives here. */

/* Inline: button */
.blog-content a.blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: #db2777;
  transition: background-color 150ms ease;
}

.blog-content a.blog-button:hover {
  color: #fff;
  background: #be185d;
}

.blog-content a.blog-button-secondary {
  font-weight: 500;
  background: #374151;
}

.blog-content a.blog-button-secondary:hover {
  background: #1f2937;
}

/* Wrapping flex row so a wrapped line gets real vertical spacing, not just
   line-height. Gap matches /community. */
.blog-content p:has(> a.blog-button),
.blog-content p:has(> a.blog-link) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.blog-content p:has(> .blog-chip) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Inline: arrow link */
.blog-content a.blog-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #db2777;
  text-decoration: none;
}

.blog-content a.blog-link:hover {
  color: #be185d;
}

.blog-link-arrow {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
}

/* Inline: chip */
.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 500;
}

.blog-chip-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #374151;
}

/* Numbered headings */
.blog-content h2.blog-step,
.blog-content h3.blog-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  color: #111827;
}

.blog-content h2.blog-step {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.blog-content h3.blog-step {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #db2777;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

/* Callouts */
.blog-callout {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid;
  border-radius: 0.5rem;
}

.blog-callout > *:last-child {
  margin-bottom: 0;
}

.blog-callout p {
  font-size: 1rem;
}

.blog-callout-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  opacity: 0.85;
}

.blog-callout-icon {
  width: 1.0625rem;
  height: 1.0625rem;
  flex-shrink: 0;
}

.blog-callout-info {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.blog-callout-info .blog-callout-title {
  color: #075985;
}

.blog-callout-tip {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.blog-callout-tip .blog-callout-title {
  color: #065f46;
}

.blog-callout-note {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.blog-callout-note .blog-callout-title {
  color: #374151;
}

.blog-callout-warning,
.blog-callout-caution {
  background: #fffbeb;
  border-color: #fde68a;
}

.blog-callout-warning .blog-callout-title,
.blog-callout-caution .blog-callout-title {
  color: #92400e;
}

.blog-callout-danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.blog-callout-danger .blog-callout-title {
  color: #991b1b;
}

/* Details */
.blog-details {
  margin-bottom: 0.75rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.blog-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #111827;
}

.blog-details-summary::-webkit-details-marker {
  display: none;
}

.blog-details-chevron {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 1rem;
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 150ms ease;
}

.blog-details[open] .blog-details-chevron {
  transform: rotate(180deg);
}

.blog-details-body {
  margin-top: 0.75rem;
}

/* Grid */
.blog-grid {
  display: grid;
  margin: 2rem 0;
  column-gap: 2rem;
  row-gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.blog-grid-1 {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .blog-grid-2,
  .blog-grid-3,
  .blog-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .blog-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.blog-grid-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.blog-grid-text {
  color: #374151;
}

.blog-grid-bullet-check {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: #ec4899;
}

/* Same footprint as the check marker so both bullets indent text equally. */
.blog-grid-bullet-circle {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: #ec4899;
}

/* Card */
.blog-card {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: #f9fafb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.blog-card > *:first-child {
  margin-top: 0;
}

.blog-card > *:last-child {
  margin-bottom: 0;
}

/* Icons fill the box their wrapper sets */
.blog-chip-icon svg,
.blog-callout-icon svg {
  width: 100%;
  height: 100%;
}

/* Thicken stroked provider icons to visually match filled brand marks */
.blog-chip-icon svg[fill='none'] {
  stroke-width: 2.25;
}
