/*
 * De tegels van modules en producten, gedeeld door /abonnementen/, de
 * modulepagina's en de productpagina's (src/site/moduletegel.ts), naar het
 * voorbeeld van VaaS-Zorg. Een basismodule is een tegel, een losse module een
 * map, een product een kaart met zijn afkorting. Leisteen waar VaaS-Zorg navy
 * heeft, Oker waar het lime heeft.
 */

.ab-icoon {
  width: 16px;
  height: 16px;
}

.ab-tegel__ic {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgb(255 255 255 / 16%);
}

.ab-merk {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--colour-surface);
  color: var(--colour-base);
  font-size: 0.6875rem;
  font-weight: 800;
}

.ab-merk--opbouw {
  border-radius: 6px;
  background: var(--status-aandacht-bg, #fbf1dd);
  color: var(--status-aandacht-text, #7a5a1e);
}

.ab-inhoud {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--colour-base);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--colour-accent-strong);
  text-underline-offset: 3px;
}

.ab-inhoud:focus-visible,
.ab-koppel:has(input:focus-visible),
.ab-product:focus-visible,
.ab-venster__x:focus-visible {
  outline: 2px solid var(--colour-accent);
  outline-offset: 2px;
}

/* De basis: een tegel met een gekleurde kop. */
.ab-tegels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.ab-tegel {
  display: flex;
  flex-direction: column;
  min-height: 124px;
  overflow: hidden;
  border: 1px solid var(--colour-line);
  border-radius: 14px;
  background: var(--colour-surface);
  box-shadow: var(--shadow-card);
}

.ab-tegel__kap {
  display: flex;
  flex: none;
  gap: 8px;
  align-items: center;
  height: 38px;
  padding: 0 10px 0 11px;
  background: linear-gradient(135deg, #5a7fa1, var(--colour-slate-60));
  color: var(--colour-surface);
}

.ab-tegel__lijf {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 9px 11px 9px;
}

.ab-tegel__naam {
  margin: 0;
  color: var(--colour-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.ab-tegel__voet {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--colour-line);
  color: var(--colour-text-muted);
  font-size: 0.8125rem;
}

/* Een losse module: een map met tabblad, achterflap en omslag. */
.ab-mappen {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px 12px;
}

.ab-map {
  position: relative;
  padding-top: 22px;
}

.ab-map::before {
  position: absolute;
  inset: 12px 0 40px;
  border-radius: 14px;
  background: var(--colour-slate-60);
  content: "";
}

.ab-map__tab {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 112px;
  height: 24px;
  padding: 6px 13px 0;
  border-radius: 12px 0 0;
  background: #2f5372;
  clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
  color: var(--colour-accent);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ab-map__omslag {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 128px;
  padding: 12px 13px;
  border-radius: 0 14px 0 0;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 3.5%) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 3.5%) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #2f5372, var(--colour-base) 80%);
  color: var(--colour-surface);
}

.ab-map__top {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
}

.ab-map__naam {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--colour-surface);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ab-map__tel {
  margin-top: 4px;
  color: var(--colour-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ab-map__streep {
  flex: none;
  width: 30px;
  height: 3px;
  margin-top: auto;
  background: var(--colour-accent);
}

.ab-map__voet {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--colour-line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: var(--colour-surface);
  box-shadow: var(--shadow-card);
}

.ab-map__voet .ab-inhoud {
  margin-left: auto;
}

.ab-koppel {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 24px;
  margin-left: auto;
  color: var(--colour-surface);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.ab-koppel input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--colour-accent);
  cursor: pointer;
}

/* Gekoppeld: tabblad en rand in Oker. */
.ab-map.ab-gekozen .ab-map__tab {
  background: var(--colour-accent);
  color: var(--colour-ink);
}

.ab-map.ab-gekozen::before {
  background: var(--colour-accent-strong);
}

.ab-map.ab-gekozen .ab-map__voet {
  border-color: var(--colour-accent);
  box-shadow: 0 0 0 1px var(--colour-accent);
}

/* In ontwikkeling: gestreepte omslag, niet te koppelen. */
.ab-map--opbouw .ab-map__omslag {
  background: repeating-linear-gradient(135deg, #d4dfe9 0 8px, #eef3f7 8px 16px);
  color: var(--colour-text-muted);
}

.ab-map--opbouw .ab-map__naam {
  color: var(--colour-base);
}

.ab-map--opbouw .ab-map__tab {
  background: #d4dfe9;
  color: var(--colour-text-muted);
}

.ab-map--opbouw .ab-map__tel {
  color: var(--colour-text-muted);
}

.ab-map--opbouw::before {
  background: var(--colour-line);
}

.ab-map--opbouw .ab-tegel__ic {
  background: var(--colour-surface);
  color: var(--colour-text-muted);
}

.ab-map--opbouw .ab-map__streep {
  background: #c6d8e8;
}

/* De producten als blokjes: Leisteen in het platform, Leisteen 60 om te downloaden, Oker een dienst. */
.ab-stapel {
  display: flex;
}

.ab-blok {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: -3px;
  border: 2px solid var(--colour-surface);
  border-radius: 7px;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 14%);
  color: var(--colour-surface);
  font-size: 0.5625rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.ab-blok:first-child {
  margin-left: 0;
}

.ab-blok--platform {
  background: var(--colour-base);
  color: var(--colour-accent);
}

.ab-blok--download {
  background: var(--colour-slate-60);
}

.ab-blok--dienst {
  background: var(--colour-accent-strong);
}

.ab-rest {
  margin-left: 4px;
  color: var(--colour-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.ab-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--colour-text-muted);
  font-size: 0.8125rem;
}

.ab-legenda__kleur {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: -1px;
}

.ab-producten {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ab-product {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--colour-line);
  border-radius: 12px;
  background: var(--colour-surface);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
}

a.ab-product:hover {
  border-color: var(--colour-slate-60);
}

.ab-blok--groot {
  width: 42px;
  height: 42px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 14%);
  font-size: 0.8125rem;
}

.ab-product__tekst {
  flex: 1;
  min-width: 0;
}

.ab-product__tekst b {
  display: block;
  color: var(--colour-base);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.ab-product__tekst span {
  display: block;
  margin-top: 1px;
  color: var(--colour-text-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.ab-product__tekst .ab-product__stand {
  margin-top: 3px;
  font-weight: 600;
}

.ab-product__stand--beschikbaar {
  color: var(--status-ok-text, #1f5631) !important;
}

.ab-product__stand--ontwikkeling {
  color: var(--status-aandacht-text, #7a5a1e) !important;
}

.ab-product__soort {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--colour-fond);
  color: var(--colour-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ab-product__pijl {
  flex: none;
  width: 10px;
  color: var(--colour-base);
  font-size: 1.25rem;
  font-weight: 800;
}

@media (max-width: 560px) {
  .ab-product__soort {
    display: none;
  }
}

/* Het blokje met een omgevouwen hoek, zoals een product bij VaaS-Zorg. */
.ab-blok--groot {
  position: relative;
}

.ab-blok--groot::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 0 10px 0 6px;
  background: rgb(255 255 255 / 35%);
  content: "";
}

/* Een product als tegel: geen map, maar een kaart met zijn afkorting. De rand
   bovenaan heeft de kleur van zijn soort. */
.pt-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pt {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 14px 14px 0;
  border: 1px solid var(--colour-line);
  border-top: 4px solid var(--colour-base);
  border-radius: 14px;
  background: var(--colour-surface);
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.pt--download {
  border-top-color: var(--colour-slate-60);
}

.pt--dienst {
  border-top-color: var(--colour-accent-strong);
}

.pt:has(a:hover) {
  border-color: var(--colour-slate-60);
  box-shadow: 0 6px 18px rgb(36 66 92 / 10%);
}

.pt__kop {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pt__soort {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--colour-fond);
  color: var(--colour-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pt__naam {
  margin: 12px 0 0;
  color: var(--colour-base);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.pt__naam a {
  color: inherit;
  text-decoration: none;
}

/* De hele tegel is klikbaar; de link in de naam draagt de klik. */
.pt__naam a::after {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  content: "";
}

.pt__naam a:focus-visible {
  outline: none;
}

.pt:has(.pt__naam a:focus-visible) {
  outline: 2px solid var(--colour-accent);
  outline-offset: 2px;
}

.pt__zin {
  margin: 4px 0 12px;
  color: var(--colour-text-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pt__voet {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-top: auto;
  border-top: 1px solid var(--colour-line);
  font-size: 0.8125rem;
}

.pt__stand {
  font-weight: 600;
}

.pt__stand--beschikbaar {
  color: var(--status-ok-text, #1f5631);
}

.pt__stand--ontwikkeling {
  color: var(--status-aandacht-text, #7a5a1e);
}

.pt__stand--gepland {
  color: var(--colour-text-muted);
}

.pt__verder {
  color: var(--colour-base);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--colour-accent-strong);
  text-underline-offset: 3px;
}

/* Nog geen eigen pagina: gestreept, zoals een module in ontwikkeling. */
.pt--gepland {
  border-top-color: var(--colour-line);
  background: repeating-linear-gradient(135deg, #f7f9fb 0 8px, var(--colour-surface) 8px 16px);
}

.pt--gepland .ab-blok--groot {
  background: #c6d3df;
  color: var(--colour-surface);
}

@media (prefers-reduced-motion: reduce) {
  .pt {
    transition: none;
  }
}
