/**
 * Digilayf for Health Sciences child theme: submission guide on /about/submissions
 * (GUIDE-01–GUIDE-03). Loaded after digilayf-home.css; reuses the --da-*
 * tokens. The steps use the wider guide column, prose stays at reading width.
 */

/* The steps use the whole guide column; everything else keeps the reading width. */
.dla-guide .page-content {
  max-width: none;
}

.dla-guide .page-content > :not(.dla-guide-steps) {
  max-width: 76ch;
}

.dla-guide h2 {
  margin-top: 2.5rem;
}

.dla-guide-note {
  color: var(--da-text-muted);
}

/* Five conceptual steps */

.dla-steps {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.dla-step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--da-border);
  border-radius: var(--da-radius);
  background: var(--da-surface-tint);
}

.dla-step-number {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--da-navy);
  color: var(--da-on-dark);
  font-weight: 700;
}

.dla-guide .dla-step-title {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.35rem 0 0.25rem;
  color: var(--da-navy);
  font-size: 1.05rem;
  line-height: 1.3;
  /* PT Serif ships only 400 and 700; a hairline stroke gives a slightly
     stronger title without the width jump (and line breaks) of bold. */
  -webkit-text-stroke: 0.35px currentColor;
}

/* Decorative title icon, masked so it follows the accent text tone. */
.dla-step-icon {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.05rem;
  background: var(--da-cyan-strong);
  -webkit-mask: var(--dla-step-icon) center / contain no-repeat;
  mask: var(--dla-step-icon) center / contain no-repeat;
}

.dla-step-icon--type { --dla-step-icon: var(--dla-icon-guide-type, url("../icons/guide-type.svg")); }
.dla-step-icon--upload { --dla-step-icon: var(--dla-icon-guide-upload, url("../icons/guide-upload.svg")); }
.dla-step-icon--review { --dla-step-icon: var(--dla-icon-guide-review, url("../icons/guide-review.svg")); }
.dla-step-icon--declaration { --dla-step-icon: var(--dla-icon-guide-declaration, url("../icons/guide-declaration.svg")); }
.dla-step-icon--send { --dla-step-icon: var(--dla-icon-guide-send, url("../icons/guide-send.svg")); }

/* Secondary to the title: smaller, in the muted palette tone. */
.dla-guide .dla-step-text {
  margin: 0.5rem 0 0;
  color: var(--da-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Wide columns: the steps sit in one row, number above the text. */
@media (min-width: 992px) {
  .dla-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dla-step {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .dla-step-number {
    grid-row: auto;
    margin-bottom: 0.5rem;
  }
}

/* Collapsible sections */

.dla-disclosure {
  border: 1px solid var(--da-border);
  border-radius: var(--da-radius);
  background: var(--da-surface);
}

.dla-disclosure + .dla-disclosure {
  margin-top: 0.75rem;
}

.dla-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.85rem 1rem;
  border-radius: var(--da-radius);
  cursor: pointer;
  list-style: none;
}

.dla-disclosure > summary::-webkit-details-marker {
  display: none;
}

/* Chevron: decorative, the open state is conveyed by the native control. */
.dla-disclosure > summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: auto;
  border-right: 2px solid var(--da-cyan-strong);
  border-bottom: 2px solid var(--da-cyan-strong);
  transform: rotate(45deg);
  transition: transform var(--da-hover-duration) var(--da-hover-easing);
}

.dla-disclosure[open] > summary::after {
  transform: rotate(-135deg);
}

.dla-disclosure > summary:hover {
  background: var(--da-surface-muted);
}

.dla-guide .dla-disclosure > summary h3 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1.1rem;
}

.dla-disclosure[open] > summary {
  border-bottom: 1px solid var(--da-border);
  border-radius: var(--da-radius) var(--da-radius) 0 0;
}

.dla-disclosure-body {
  max-width: none;
  padding: 1rem 1rem 1.25rem;
  border-radius: 0 0 var(--da-radius) var(--da-radius);
  background: var(--da-surface-muted);
  font-size: 15px;
}

.dla-guide .dla-disclosure-body p,
.dla-guide .dla-disclosure-body li {
  font-size: 15px;
}

.dla-disclosure-body h4 {
  margin-top: 1.25rem;
  font-size: 1rem;
}

.dla-disclosure-body > :first-child,
.dla-disclosure-body > :first-child h4 {
  margin-top: 0;
}

.dla-guide-more {
  margin-bottom: 0;
  font-weight: 600;
}

/* Article types: each type is one block, its start link belongs to it. */
.dla-disclosure-body .section_policy + .section_policy {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--da-border);
}

.dla-disclosure-body .section_policy h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.dla-disclosure-body .section_policy > * {
  margin: 0;
}

.dla-disclosure-body .section_policy > * + * {
  margin-top: 10px;
}

/* Start link under each article type: the theme's secondary button (.btn). */
.dla-guide-type-start {
  margin: 10px 0 0;
}

.dla-guide .dla-guide-type-link {
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.dla-guide .dla-guide-type-link:hover,
.dla-guide .dla-guide-type-link:focus-visible {
  background: var(--da-cyan);
  border-color: var(--da-cyan);
  color: var(--da-on-accent);
}

@media (prefers-reduced-motion: reduce) {
  .dla-disclosure > summary::after {
    transition: none;
  }
}
