/* =============================================================
   barrio_npm_prototype — components
   Cards, buttons, forms, hero patterns, utility classes,
   gradient background utilities, page wrapper rules.
   ============================================================= */

/* ---------- Link & list normalisation ---------- */

a { text-decoration: none !important; }
.text-white a { color: #fff !important; }

ul { list-style-type: square; }
ul.square { list-style-type: square; }

/* ---------- Cards ----------
   Visual rules only — BS4 -ms-flex shims dropped; BS5 supports flex
   natively across all targeted browsers. */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #f9f9f9;
  background-clip: border-box;
  border: 0.0625rem solid rgba(231, 234, 243, 0.7);
  border-radius: 0.75rem;
  box-shadow: none !important;
}

.card-deck .card {
  margin-bottom: 15px;
}

@media (min-width: 576px) {
  .card-deck .card {
    flex: 1 0 0%;
    margin-right: 15px;
    margin-bottom: 0;
    margin-left: 15px;
  }
  .card-sm-gutters-1 .card {
    margin-right: 0.25rem;
    margin-left: 0.25rem;
  }
}

/* ---------- Buttons ----------
   Colour tokens (background, border) live in colors.css; visual rules here. */

button.button {
  text-transform: uppercase;
  margin-left: 0.5em;
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  color: #fff;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: background-color 0.1s ease-in-out,
              border-color 0.1s ease-in-out,
              box-shadow 0.1s ease-in-out;
}

button.button:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

button.button:focus,
button.button.focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

button.button:disabled {
  color: #fff;
}

button.button:not(:disabled):not(.disabled):active,
button.button:not(:disabled):not(.disabled).active {
  color: #fff;
  background-color: #0062cc;
  border-color: #005cbf;
}

.btn,
.btn:hover {
  color: black;
}

/* Drupal/bootstrap_barrio adds `.form-control` to submit inputs alongside
   `.btn`. BS5's `.form-control` is `display: block; width: 100%`, which
   stretches form action buttons (e.g. the user-logout confirm "Log out"
   submit) edge-to-edge. Restore button sizing where both classes co-occur. */
.btn.form-control {
  display: inline-block;
  width: auto;
}

.hero-button {
  border-top: 5px solid rgba(255, 255, 255, 0);
  border-bottom: 5px solid rgba(255, 255, 255, 0);
  border-radius: 10px;
  background: transparent;
  color: white;
  padding: 15px 30px;
  text-shadow:
    -1px -1px 0 rgba(28, 71, 74, 0.3),
     1px -1px 0 rgba(28, 71, 74, 0.3),
    -1px  1px 0 rgba(28, 71, 74, 0.3),
     1px  1px 0 rgba(28, 71, 74, 0.3);
}

.hero-button:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
}

/* ---------- Hero patterns ----------
   Legacy .bg-img-hero class used by content blocks and reference templates.
   barrio_npm_prototype's landing-page hero uses .np-hero (see proto.css). */

.bg-img-hero {
  height: 30em;
  padding-top: 0;
  background-position: left bottom;
}

.bg-img-hero-center {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 60%;
  background-color: rgba(217, 202, 166, 0.15);
}

.hero-text-left,
.hero-text-right {
  max-width: 300px;
}

h1.hero-left   { font-weight: 900; }
h2.hero-tagline { padding-top: 3rem; }

/* ---------- Forms — Drupal field & views exposed-form chrome ---------- */

/* Row alignment for exposed forms. BEF emits the form-items + form-actions
   inside an inner `<div class="d-flex flex-wrap">` wrapper (Bootstrap
   utility classes), not directly under `.views-exposed-form`, so this
   rule targets the wrapper. Without `align-items: flex-end`, the
   form-actions wrapper (which has no label) floats up to the top of the
   row while labelled form-items push their inputs down, leaving the
   SEARCH / RESET buttons visually misaligned ~one label height above the
   inputs they should sit beside. */
.views-exposed-form > .d-flex.flex-wrap {
  align-items: flex-end;
}

.views-exposed-form label {
  display: block;
  font-weight: 300;
}

/* General select rule kept for non-exposed-form contexts (block config UI,
   node edit forms, etc.). Inside `.views-exposed-form` the height + full
   visual-parity rule below takes precedence. */
select {
  height: 50px;
}

fieldset.js-form-item {
  display: block;
  padding-right: 0.75rem;
}

/* All exposed-filter form controls render at the same height and share
   typography / border treatment so a row of text inputs + selects looks
   like one coherent system. Supersedes the previous `fieldset.js-form-item
   select` rule. */
.views-exposed-form input[type="text"],
.views-exposed-form input[type="search"],
.views-exposed-form input[type="number"],
.views-exposed-form input[type="url"],
.views-exposed-form input[type="email"],
.views-exposed-form input[type="date"],
.views-exposed-form input[type="datetime-local"],
.views-exposed-form input[type="tel"],
.views-exposed-form input[type="password"],
.views-exposed-form select,
.views-exposed-form fieldset.js-form-item select {
  height: calc(1.6em + 1.625rem);
  padding: 0 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #1e2022;
  background-color: #fff;
  border: 0.0625rem solid #e7eaf3;
  border-radius: 0.3125rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Submit button — branded fill on `--npm-blue`, dark text for WCAG AA
   contrast (~6.5:1), matches the form-control row height and border
   radius. Replaces the stock BS5 .btn-primary loud blue so the SEARCH
   button reads on-brand alongside the muted cluster palette. */
.views-exposed-form button[type="submit"],
.views-exposed-form input[type="submit"] {
  height: calc(1.6em + 1.625rem);
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #1e2022;
  background: var(--npm-blue);
  border: 1px solid var(--npm-blue);
  border-radius: 0.3125rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
}

.views-exposed-form button[type="submit"]:hover,
.views-exposed-form input[type="submit"]:hover {
  background: color-mix(in srgb, var(--npm-blue), black 12%);
  border-color: color-mix(in srgb, var(--npm-blue), black 12%);
  color: #1e2022;
}

.views-exposed-form button[type="submit"]:focus-visible,
.views-exposed-form input[type="submit"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--npm-blue), black 25%);
  outline-offset: 2px;
}

/* Exposed-filter labels in views */
div > fieldset.js-form-item > label {
  text-transform: capitalize;
  font-size: larger;
  color: indianred;
}

.view-filters {
  padding: 1em;
}

input#edit-keys {
  background-color: white;
}

blockquote {
  margin: 1rem;
}

/* ---------- Gradient background utilities ----------
   Used inline from templates and content. Beige (#D9CAA6 base), blue
   (#C9D7D1 base), gray (#50514F base), warm-gray (#A59E96 base). */

.background-beige-gradient               { background: linear-gradient(rgba(217, 202, 166, 0.4), rgba(217, 202, 166, 0.1)) !important; }
.background-beige-gradient-light         { background: linear-gradient(rgba(217, 202, 166, 0.1), rgba(217, 202, 166, 0))   !important; }
.background-beige-gradient-light-reverse { background: linear-gradient(rgba(217, 202, 166, 0),   rgba(217, 202, 166, 0.1)) !important; }
.background-beige                        { background: linear-gradient(rgba(217, 202, 166, 0.3), rgba(217, 202, 166, 0.3)) !important; }

.background-blue-gradient                { background: linear-gradient(rgba(201, 215, 209, 0.4), rgba(201, 215, 209, 0.1)) !important; }
.background-blue-gradient-light          { background: linear-gradient(rgba(201, 215, 209, 0.1), rgba(201, 215, 209, 0))   !important; }
.background-blue                         { background: linear-gradient(rgba(201, 215, 209, 0.3), rgba(201, 215, 209, 0.3)) !important; }

.background-gray-gradient                { background: linear-gradient(rgba(80, 81, 79, 0.2),   rgba(80, 81, 79, 0))       !important; }
.background-gray-gradient-light          { background: linear-gradient(rgba(80, 81, 79, 0.1),   rgba(80, 81, 79, 0))       !important; }

.background-warmgray-gradient            { background: linear-gradient(rgba(165, 158, 150, 0.2), rgba(217, 202, 166, 0))   !important; }

.bg-grey          { background-color: #f2f2f2; }
.background-white { background-color: white !important; }

/* ---------- Page wrappers ---------- */

#main-wrapper {
  background-color: transparent;
  margin-bottom: 1em;
}
#main         { background-color: transparent; }

#main .node--type-front-page-item {
  padding: 20px;
}

.main-content {
  background-color: transparent;
}

/* Escape a contained .container to full-viewport width. Used by menu blocks
   and hero strips that should span edge-to-edge. */
.child-fullwidth {
  width: 100vw;
  position: relative;
  left: calc(-50vw + 50%);
}

/* ---------- Utility / layout helpers ---------- */

.comma-sep::after { content: ', '; }

.lh-1  { line-height: 1   !important; }
.lh-12 { line-height: 1.2 !important; }
.lh-15 { line-height: 1.5 !important; }

.mh-2  { min-height: 2em   !important; }
.mh-25 { min-height: 2.5em !important; }
.mh-3  { min-height: 3em   !important; }
.mh-35 { min-height: 3.5em !important; }

.fa-text-right { float: right; }
.feed-icon     { display: none; }

.about-more {
  display: block;
  padding: 1em;
}

/* Embedded video iframe wrapper (e.g. Vimeo on About) */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 30px;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =============================================================
   CTA pill list — reusable bilingual pill CTAs
   -------------------------------------------------------------
   Base component for the 4-CTA list rendered via
     templates/partials/_cta-list.html.twig
   Currently used on:
     - front-page hero  (.np-cta-list--hero, tangerina-hero.css)
     - mega-menu banner (.np-cta-list--mega, menu.css)
   Base rules here; variant-specific overrides live in the
   respective surface's CSS file.

   Per-pill tint: each pill blends 15% of a --npm-tukutuku-* hue
   into the base --np-link violet via the --cta-tint custom
   property, set by nth-child on the list. Default value
   (--np-link → self-mix identity) makes a "no tint" pill safe
   if the list grows past 4 items or a variant opts out via
   `--cta-tint: var(--np-link)` override. Hover darkens the
   already-tinted background by 12% black.
   ============================================================= */

.np-cta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.np-cta-pill {
  --cta-tint: var(--np-link);   /* default = self-mix identity */
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  /* 9px 17px = base 12px 20px minus the 3px border on each axis,
     so the border-box outer size stays the same as it was pre-border. */
  padding: 9px 17px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--np-link), var(--cta-tint) 15%);
  /* 3px border matches the bg (see rule). Both bg + border darken
     in sync on :hover — pill reads as a single solid chip in both
     states. Promoted from the hero variant 2026-08-20 so hero + mega
     surfaces share one style vocabulary; each surface owns only its
     layout tweaks (see tangerina-hero.css / menu.css). */
  border: 3px solid color-mix(in srgb, var(--np-link), var(--cta-tint) 15%);
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  line-height: 1.15;
}

/* Tukutuku accent tints — mirror the nested-apex sequence in the
   hero SVG (outer→inner: yellow, blue, navy, coral). Applies to
   any .np-cta-list surface (hero + mega). Hero swaps pills 3 and
   4 for visual reasons — see the override in tangerina-hero.css. */
.np-cta-list > .np-cta-pill:nth-child(1) { --cta-tint: var(--npm-tukutuku-yellow); }
.np-cta-list > .np-cta-pill:nth-child(2) { --cta-tint: var(--npm-tukutuku-blue);   }
.np-cta-list > .np-cta-pill:nth-child(3) { --cta-tint: var(--npm-tukutuku-navy);   }
.np-cta-list > .np-cta-pill:nth-child(4) { --cta-tint: var(--npm-tukutuku-coral);  }

/* Pill 1 gets the "secondary CTA" brand-blue identity — same
   `.btn-secondary` visual language the conference "View conference
   website" button uses. Distinct from the tinted-violet pills 2-4.
   Promoted from the hero variant 2026-08-20 so both surfaces share
   this treatment. Bare --npm-blue is too light for white text
   (~1.95:1); darkened 20% brings mi label (600 weight, 15px) to
   ~3.7:1 (AA large). Specificity `.np-cta-list > .np-cta-pill:first-child`
   = (0,3,0), overrides the base .np-cta-pill (0,1,0). */
.np-cta-list > .np-cta-pill:first-child {
  background: color-mix(in srgb, var(--npm-blue), black 20%);
  border-color: color-mix(in srgb, var(--npm-blue), black 20%);
}

.np-cta-pill:hover,
.np-cta-pill:focus {
  color: #fff;
  transform: translateY(-2px);
  /* Nested color-mix — darken the already-tinted bg by 20% black.
     Border darkens in sync so the solid-chip look holds through the
     interaction (matches pill 1's brand-blue hover shape). */
  background: color-mix(
    in srgb,
    color-mix(in srgb, var(--np-link), var(--cta-tint) 15%),
    black 20%
  );
  border-color: color-mix(
    in srgb,
    color-mix(in srgb, var(--np-link), var(--cta-tint) 15%),
    black 20%
  );
  text-decoration: none;
}

/* Pill 1 hover — self-darken from its rest brand-blue (20% black)
   to 32% black for the "pressed" affordance. Own :first-child:hover
   because the base :hover formula uses tinted violet, not --npm-blue.
   Specificity (0,4,0) beats base :hover (0,2,0). */
.np-cta-list > .np-cta-pill:first-child:hover,
.np-cta-list > .np-cta-pill:first-child:focus {
  background: color-mix(in srgb, var(--npm-blue), black 32%);
  border-color: color-mix(in srgb, var(--npm-blue), black 32%);
}

.np-cta-pill__mi {
  font-size: 0.95rem;
  font-weight: 600;
}
.np-cta-pill__en {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.85;
}
