/* Shared look for all CAMSS / Interoperable Europe documentation sets. */

:root {
  --camss-blue: #004494;      /* EC corporate blue */
  --camss-yellow: #ffd617;
  --camss-blue-soft: #e8eef7;
}

.wy-side-nav-search,
.wy-nav-top {
  background-color: var(--camss-blue);
}
.wy-side-nav-search > a,
.wy-side-nav-search .version {
  color: #fff;
}
.wy-nav-content a {
  color: var(--camss-blue);
}
.wy-nav-content {
  max-width: 960px;
}

/* Lead paragraph on landing pages */
.rst-content .lead p {
  font-size: 1.15em;
  color: #404040;
}

/* EIF Recommendation boxes */
.rst-content .admonition.eif-recommendation {
  background: var(--camss-blue-soft);
  border-left: 4px solid var(--camss-blue);
}
.rst-content .admonition.eif-recommendation .admonition-title {
  background: var(--camss-blue);
}
.rst-content .admonition.eif-recommendation .admonition-title::before {
  content: "\f0eb"; /* lightbulb icon from the theme's Font Awesome */
}

/* Criteria overview table: let long questions wrap */
.rst-content table.criteria-table td,
.rst-content table.docutils td {
  white-space: normal;
  vertical-align: top;
}
.rst-content table.criteria-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

/* ==========================================================================
   Content pages
   ========================================================================== */

/* Small label under a page title, e.g. "15 criteria · A2–A16" */
.rst-content p.page-meta {
  display: inline-block;
  margin: -8px 0 20px;
  padding: 2px 10px;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--camss-blue);
  background: var(--camss-blue-soft);
  border-radius: 12px;
}

/* Principle headings (h2) on category pages */
.rst-content h2 {
  padding-bottom: 6px;
  border-bottom: 2px solid var(--camss-blue-soft);
}

/* Each criterion (a section whose title is an h3) is a card */
.rst-content section:has(> h3) {
  margin: 28px 0;
  padding: 20px 22px 6px;
  border: 1px solid #e1e4e5;
  border-top: 3px solid var(--camss-blue);
  border-radius: 0 0 4px 4px;
  background: #fff;
}
.rst-content section:has(> h3) > h3 {
  margin-top: 0;
  line-height: 1.35;
}

/* "Evidence to look for" / "What it covers" */
.rst-content p.rubric {
  margin: 0 0 6px;
  font-family: Lato, "proxima-nova", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a737d;
}
.rst-content .criterion-evidence {
  margin-bottom: 20px;
  padding: 14px 16px 2px;
  background: #f8f8f8;
  border-left: 3px solid #6a737d;
}
.rst-content .criterion-evidence p.rubric::before {
  content: "\f002"; /* search icon (theme's Font Awesome) */
  font-family: FontAwesome;
  margin-right: 6px;
}
.rst-content .criterion-scope p.rubric::before {
  content: "\f05a"; /* info icon */
  font-family: FontAwesome;
  margin-right: 6px;
}
.rst-content .criterion-scope {
  margin-bottom: 20px;
}

/* Use-case user stories */
.rst-content .user-story {
  margin: 0 0 16px;
  padding: 12px 16px 0;
  border-left: 3px solid var(--camss-blue);
  background: #f8f8f8;
  font-style: italic;
}

/* Criteria overview table */
.rst-content table.criteria-table {
  width: 100%;
}
.rst-content table.criteria-table thead th {
  background: var(--camss-blue);
  color: #fff;
  border-color: var(--camss-blue);
}
.rst-content table.criteria-table td:first-child a {
  display: inline-block;
  min-width: 2.6em;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--camss-blue-soft);
  text-align: center;
  text-decoration: none;
}
.rst-content table.criteria-table tbody tr:hover td {
  background: #f3f6fa;
}

/* Glossary */
.rst-content dl.glossary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0;
  border-top: 1px solid #e1e4e5;
}
.rst-content dl.glossary > dt,
.rst-content dl.glossary > dd {
  margin: 0;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid #e1e4e5;
  background: none;
}
.rst-content dl.glossary > dt {
  font-weight: 700;
  color: var(--camss-blue);
  border-top: 0;
  font-size: 100%;
}
.rst-content dl.glossary > dd p {
  margin: 0;
}
@media (max-width: 480px) {
  .rst-content dl.glossary {
    grid-template-columns: 1fr;
  }
  .rst-content dl.glossary > dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* ==========================================================================
   Home page (docs/index.rst)
   Uses the theme's fonts, borders (#e1e4e5) and spacing; only adds layout.
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */
.rst-content .hero {
  background: var(--camss-blue-soft);
  border-left: 4px solid var(--camss-blue);
  padding: 20px 24px 8px;
  margin-bottom: 32px;
}
.rst-content .hero p.lead {
  font-size: 1.15em;
  line-height: 1.6;
  color: #404040;
  margin-bottom: 16px;
}
.rst-content p.hero-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 2px 10px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--camss-blue);
  background: #fff;
  border: 1px solid var(--camss-blue);
  border-radius: 12px;
}

/* Buttons: same shape and weight as the theme's .btn */
.rst-content .hero-actions p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rst-content .hero-actions a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--camss-blue);
  border-radius: 2px;
  font-weight: 700;
  text-decoration: none;
  line-height: normal;
  transition: background-color 0.1s, color 0.1s;
}
.rst-content .hero-actions a:first-child {
  background: var(--camss-blue);
  color: #fff;
}
.rst-content .hero-actions a:first-child:hover {
  background: #003576;
}
.rst-content .hero-actions a:not(:first-child) {
  background: #fff;
  color: var(--camss-blue);
}
.rst-content .hero-actions a:not(:first-child):hover {
  background: #f3f6fa;
}
.rst-content .hero-actions a.external::after {
  color: inherit;  /* keep the theme's external-link icon readable on blue */
}

/* Numbered steps -------------------------------------------------------- */
.rst-content .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  counter-reset: step;
  margin-bottom: 32px;
}
.rst-content .step {
  counter-increment: step;
  position: relative;
  padding: 44px 16px 4px;
  border-top: 3px solid var(--camss-blue);
  background: #f8f8f8;
}
.rst-content .step::before {
  content: counter(step);
  position: absolute;
  top: 12px;
  left: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--camss-blue);
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.rst-content .step p {
  font-size: 0.95em;
  margin-bottom: 12px;
}

/* Cards ------------------------------------------------------------------ */
.rst-content .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.rst-content .card {
  position: relative;
  padding: 16px 18px 4px;
  border: 1px solid #e1e4e5;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rst-content .card:hover,
.rst-content .card:focus-within {
  border-color: var(--camss-blue);
  box-shadow: 0 2px 8px rgba(0, 68, 148, 0.12);
}
/* first paragraph = title; its link makes the whole card clickable */
.rst-content .card > p:first-child {
  font-family: "Roboto Slab", "ff-tisa-web-pro", Georgia, Arial, sans-serif;
  font-size: 1.05em;
  font-weight: 700;
  margin-bottom: 6px;
}
.rst-content .card > p:first-child a {
  text-decoration: none;
}
.rst-content .card > p:first-child a::before {
  content: "";
  position: absolute;
  inset: 0;
}
.rst-content .card p {
  font-size: 0.95em;
  margin-bottom: 12px;
}
.rst-content .card p.card-meta {
  font-size: 0.8em;
  font-weight: 700;
  color: #6a737d;
  margin-bottom: 8px;
}
.rst-content .card.card-accent {
  background: var(--camss-blue-soft);
  border-color: var(--camss-blue);
}
.rst-content .card-grid-compact .card > p:first-child {
  font-size: 1em;
}

/* Useful links ---------------------------------------------------------- */
.rst-content .quick-links {
  padding: 14px 0;
  border-top: 1px solid #e1e4e5;
  font-size: 0.95em;
}

/* Information-only cards (no link, no hover) */
.rst-content .card-grid-static .card:hover {
  border-color: #e1e4e5;
  box-shadow: none;
}
.rst-content .card-grid-static .card > p:first-child {
  color: #404040;
}
