/* Centre-independent scope colours. The 500 tone is the editorial colour. */
[data-vn-scope="general"] {
  --vn-scope-50: #ebfbf4;
  --vn-scope-100: #d7f7e9;
  --vn-scope-200: #afeed2;
  --vn-scope-300: #82e5b9;
  --vn-scope-400: #4bd99a;
  --vn-scope-500: #05ca73;
  --vn-scope-600: #04ac62;
  --vn-scope-700: #03894e;
  --vn-scope-800: #03653a;
  --vn-scope-900: #024527;
}
[data-vn-scope="extraescolars"] {
  --vn-scope-50: #fef6ed;
  --vn-scope-100: #fdeedb;
  --vn-scope-200: #fbdcb8;
  --vn-scope-300: #f9c990;
  --vn-scope-400: #f6b15f;
  --vn-scope-500: #f39321;
  --vn-scope-600: #cf7d1c;
  --vn-scope-700: #a56416;
  --vn-scope-800: #7a4a11;
  --vn-scope-900: #53320b;
}
[data-vn-scope="suport-educatiu"], [data-vn-scope="terapies"], [data-vn-scope="families"] {
  --vn-scope-50: #edfafb;
  --vn-scope-100: #dbf5f6;
  --vn-scope-200: #b6ebed;
  --vn-scope-300: #8ee1e3;
  --vn-scope-400: #5cd3d7;
  --vn-scope-500: #1cc2c7;
  --vn-scope-600: #18a5a9;
  --vn-scope-700: #138487;
  --vn-scope-800: #0e6164;
  --vn-scope-900: #0a4244;
}
[data-vn-scope="formacio"] {
  --vn-scope-50: #edf2ef;
  --vn-scope-100: #dbe6de;
  --vn-scope-200: #b8ccbe;
  --vn-scope-300: #90b099;
  --vn-scope-400: #5e8d6c;
  --vn-scope-500: #206133;
  --vn-scope-600: #1b522b;
  --vn-scope-700: #164223;
  --vn-scope-800: #10311a;
  --vn-scope-900: #0b2111;
}
[data-vn-scope="formacio-subvencionada"], [data-vn-scope="formacio-privada"] {
  --vn-scope-50: #ecf3fa;
  --vn-scope-100: #dae8f5;
  --vn-scope-200: #b4d1ea;
  --vn-scope-300: #8bb7df;
  --vn-scope-400: #5797d0;
  --vn-scope-500: #166ebe;
  --vn-scope-600: #135ea2;
  --vn-scope-700: #0f4b81;
  --vn-scope-800: #0b375f;
  --vn-scope-900: #072541;
}

.vn-news .vn-scope-label[data-vn-scope], .vn-news .vn-filters button[data-vn-scope],
.filters button[data-vn-scope], .av-facts .av-fact[data-vn-scope],
.im-course-fields [data-vn-scope], select[data-vn-scope], select option[data-vn-scope] {
  color: var(--vn-scope-800); background-color: var(--vn-scope-50); border-color: var(--vn-scope-200);
}
.vn-news .vn-scope-label[data-vn-scope] { border-radius: 1rem; padding: .17em .65em; align-self: flex-start; }
.vn-news .vn-filters button[data-vn-scope]::before, .vn-news .vn-scope-label[data-vn-scope]::before {
  content:''; flex: none; width:.6rem; height:.6rem; border-radius:50%; background:var(--vn-scope-500);
}
.vn-news .vn-filters button[data-vn-scope]:hover, .filters button[data-vn-scope]:hover { background:var(--vn-scope-100); border-color:var(--vn-scope-400); }
.vn-news .vn-filters button[data-vn-scope][aria-pressed=true], .filters button[data-vn-scope][aria-pressed=true] {
  background:var(--vn-scope-800); color:#fff; border-color:var(--vn-scope-800);
}
.vn-news .vn-filters button[data-vn-scope]:focus-visible, .filters button[data-vn-scope]:focus-visible, select[data-vn-scope]:focus-visible {
  outline:2px solid var(--vn-scope-700); outline-offset:2px;
}
#ambits .card[data-vn-scope] > img, .card[data-category][data-vn-scope] > img { border-bottom:4px solid var(--vn-scope-500); }
#ambits .card[data-vn-scope] small, .card[data-category][data-vn-scope] small { color:var(--vn-scope-800); background:var(--vn-scope-100); }
.aula-centre li[data-vn-scope]::before { background:var(--vn-scope-500); }
details.im-detail > summary[data-vn-scope], details.row > summary[data-vn-scope] {
  border-inline-start:3px solid var(--vn-scope-500); padding-inline-start:.8em; color:var(--vn-scope-800);
}
details[open].im-detail > summary[data-vn-scope], details[open].row > summary[data-vn-scope] {background:var(--vn-scope-50);}
:is(.sub,.hero,.pagetop,.im-hero,.av-hero) h1[data-vn-scope], :is(.sectionhead,.im-catalog) h2[data-vn-scope] {
  text-decoration: underline; text-decoration-color: var(--vn-scope-500); text-decoration-thickness:.075em; text-underline-offset:.14em;
}

.eyebrow[data-vn-scope], .crumb a[data-vn-scope] {color:var(--vn-scope-800);background-color:var(--vn-scope-50);}

/* Escola de Lleure on the Village Niu homepage. */
#ambits .card:has(.escola-joventut, a[href*="escola-de-lleure"]) {
  --service-mark: #166ebe;
  --service-wash: #dae8f5;
  --service-ink: #0b375f;
  --vn-scope-500: var(--service-mark);
  --vn-scope-100: var(--service-wash);
  --vn-scope-800: var(--service-ink);
}
#ambits .card:has(.escola-joventut, a[href*="escola-de-lleure"]) .read {
  color: var(--service-ink);
  border-color: var(--service-mark);
  background: var(--service-wash);
}
#ambits .card:has(.escola-joventut, a[href*="escola-de-lleure"]) .read:is(:hover, :focus-visible) {
  color: white;
  background: var(--service-mark);
}
#ambits .card:has(.escola-joventut, a[href*="escola-de-lleure"]) a:focus-visible { outline-color: var(--service-mark); }

.aules-grid .aula-centre li[data-ambit="formacio"]::before {
  background-color: #166ebe;
}

#cataleg > .sectionhead > h2,
.sub:has(+ section .av-catalog[data-village-feed]) h1 {
  text-decoration: none;
}

/* Centre-specific colours for the information form. */

#consulta select[name="service"],
#consulta select[name="service"] option {
  background-color: #fff;
  border-color: #a8a8a8;
  box-shadow: none;
}

#consulta select[name="service"] option:is([value="general"], [value="orientacio-academica-laboral"], [value="projectes-publics"], [value="vacants"]),
#consulta select[name="service"]:has(option:is([value="general"], [value="orientacio-academica-laboral"], [value="projectes-publics"], [value="vacants"]):checked) {
  color: #05ca73;
}

#consulta select[name="service"] option:is([value="reforc"], [value="nee"], [value="etapa"], [value="psico"]),
#consulta select[name="service"]:has(option:is([value="reforc"], [value="nee"], [value="etapa"], [value="psico"]):checked) {
  color: #1cc2c7;
}

#consulta select[name="service"] option:is([value="formacio-treball"], [value="cursos-mida"], [value="acreditacions"]),
#consulta select[name="service"]:has(option:is([value="formacio-treball"], [value="cursos-mida"], [value="acreditacions"]):checked) {
  color: #166ebe;
}

#consulta select[name="service"] option:is([value="activitats-lleure"]),
#consulta select[name="service"]:has(option:is([value="activitats-lleure"]):checked) {
  color: #f39321;
}

#consulta select[name="service"] option:disabled {
  color: #fff;
  background-color: #c8c8c8;
}
