/* OMS Jobs — apply pill + progressive blur on single job pages.
   Markup, values and the blur layers follow the reference
   contact-pill-progressive-blur.html 1:1; only the font (Rubik), the
   z-index of the pill and the two OMS buttons differ. */

/* The blur sticks to the bottom of the viewport while scrolling through
   .job-detail and stops with it, before the theme footer. */
.job-detail {
  position: relative;
}

/* ------------------------------------------------------ Progressive blur */
.progressive-blur {
  z-index: 40;
  pointer-events: none;
  isolation: isolate;
  contain: paint;
  width: 100%;
  height: 15em;
  transform-style: preserve-3d;
  margin-top: -15em;
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  left: 0;
  overflow: hidden;
  transform: translateZ(0);
}
.progressive-blur__layer {
  width: 100%;
  height: 100%;
  position: absolute;
}
.progressive-blur__layer.is--1 {
  -webkit-backdrop-filter: blur(0.09375em);
          backdrop-filter: blur(0.09375em);
  -webkit-mask: linear-gradient(rgba(0,0,0,0) 50%, #000 62.5%, #000 75%, rgba(0,0,0,0) 87.5%);
          mask: linear-gradient(rgba(0,0,0,0) 50%, #000 62.5%, #000 75%, rgba(0,0,0,0) 87.5%);
}
.progressive-blur__layer.is--2 {
  -webkit-backdrop-filter: blur(0.1875em);
          backdrop-filter: blur(0.1875em);
  -webkit-mask: linear-gradient(rgba(0,0,0,0) 62.5%, #000 75%, #000 87.5%, rgba(0,0,0,0) 100%);
          mask: linear-gradient(rgba(0,0,0,0) 62.5%, #000 75%, #000 87.5%, rgba(0,0,0,0) 100%);
}
.progressive-blur__layer.is--3 {
  -webkit-backdrop-filter: blur(0.375em);
          backdrop-filter: blur(0.375em);
  -webkit-mask: linear-gradient(rgba(0,0,0,0) 75%, #000 87.5%, #000 100%);
          mask: linear-gradient(rgba(0,0,0,0) 75%, #000 87.5%, #000 100%);
}
.progressive-blur__layer.is--4 {
  -webkit-backdrop-filter: blur(0.75em);
          backdrop-filter: blur(0.75em);
  -webkit-mask: linear-gradient(rgba(0,0,0,0) 82%, #000 92%, #000 100%);
          mask: linear-gradient(rgba(0,0,0,0) 82%, #000 92%, #000 100%);
}
.progressive-blur__layer.is--5 {
  -webkit-backdrop-filter: blur(1.5em);
          backdrop-filter: blur(1.5em);
  -webkit-mask: linear-gradient(rgba(0,0,0,0) 88%, #000 100%);
          mask: linear-gradient(rgba(0,0,0,0) 88%, #000 100%);
}

/* ------------------------------------------------------------ Apply pill */
.contact-pill {
  pointer-events: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 9999;
  /* Hidden: fully below the screen edge; it slides and fades up from there. */
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
  transition: transform 400ms cubic-bezier(0, 0, 0.2, 1), opacity 400ms cubic-bezier(0, 0, 0.2, 1);
  font-family: Rubik, sans-serif;
}
.contact-pill.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.contact-pill__inner {
  pointer-events: auto;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 9999px;
  border: 1px solid #262626;
  background: #171717;
  -webkit-backdrop-filter: blur(40px);
          backdrop-filter: blur(40px);
  padding: 8px 8px 8px 8px;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4);
}

.contact-pill__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  padding-inline-start: 8px;
  white-space: nowrap;
}
.contact-pill__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.contact-pill__sub {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, .6);
}

.contact-pill__inner { padding-left: 20px; }

/* Icons only — set by contact-pill.js when the full pill would touch the
   sides of the screen (not at a fixed breakpoint: the full pill fits on
   most phones). */
.contact-pill--compact .contact-pill__inner { padding-left: 8px; }
.contact-pill--compact .contact-pill__text  { display: none; }

.contact-pill__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-pill__btn {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #fff;
  text-decoration: none;
  transition-property: color, background-color, border-color, fill, stroke, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.contact-pill__btn:hover,
.contact-pill__btn:focus {
  color: #fff;
  text-decoration: none;
}
.contact-pill__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.contact-pill__btn svg { width: 16px; height: 16px; }

/* Both buttons use the reference's dark colour system at rest (white icon,
   transparent / white/10 circle with a faint border) and take their brand
   colour on hover: WhatsApp green, OMS blue. */

/* WhatsApp: the plugin's glyph as a mask in the text colour. */
.contact-pill__btn--whatsapp {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .1);
}
.contact-pill__btn--whatsapp:hover,
.contact-pill__btn--whatsapp:focus-visible {
  background: #25D366;
  border-color: #25D366;
}
.contact-pill__btn--whatsapp .contact-pill__wa-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--oms-wa-icon, url(../img/whatsapp.svg)) center / contain no-repeat;
          mask: var(--oms-wa-icon, url(../img/whatsapp.svg)) center / contain no-repeat;
}

/* Form: the arrow — and, through its ::after stretched over the whole
   pill, everything that is not the WhatsApp button: a click anywhere else
   on the pill opens the application form, hovering anywhere turns the
   arrow blue. */
.contact-pill__btn--form {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}
.contact-pill__btn--form::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
}
.contact-pill__btn--whatsapp {
  position: relative;
  z-index: 1;
}
.contact-pill__btn--form:hover,
.contact-pill__btn--form:focus-visible {
  background: #00a3e0;
  border-color: #00a3e0;
}

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