/*
 * Open Roles component styles. Code components render in a shadow root, so these are scoped.
 * Colours and fonts use the site's Webflow variables (which inherit into the shadow root),
 * with Figma values as fallbacks.
 */
:host {
  --cf-ink: var(--swatch--dark-900, #1b0d02);
  --cf-ink-50: var(--swatch--dark-900-o50, #888079);
  --cf-ember: var(--swatch--orange-ember, #ef680e);
  --cf-white: var(--swatch--light-100, #ffffff);
  --cf-font: var(--_typography---font--primary-family, "DM Sans", Arial, sans-serif);
  display: block;
}

.cf-roles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  color: var(--cf-ink);
  font-family: var(--cf-font);
}

.cf-roles *,
.cf-roles *::before,
.cf-roles *::after {
  box-sizing: border-box;
}

.cf-roles__notice {
  margin: 0;
  padding: 10px 20px;
  border: 1px dashed var(--cf-ember);
  border-radius: 999px;
  color: var(--cf-ember);
  font-size: 15px;
}

/* Pills (Figma: btn-outline-sm) */
.cf-roles__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.cf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  height: 36px;
  padding: 0 20px;
  border: 0.5px solid var(--cf-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--cf-ink);
  font: 400 14px/1 var(--cf-font);
  white-space: nowrap;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
}

.cf-pill:hover {
  opacity: 1;
}

.cf-pill[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--cf-ember);
  background: var(--cf-ember);
  color: var(--cf-white);
}

.cf-pill:focus-visible,
.cf-cell__link:focus-visible {
  outline: 2px solid var(--cf-ember);
  outline-offset: 3px;
}

/* Role cells */
.cf-roles__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cf-cell.is-skeleton {
  height: 100px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cf-white) 60%, transparent);
  animation: cf-pulse 1.4s ease-in-out infinite;
}

@keyframes cf-pulse {
  50% {
    opacity: 0.5;
  }
}

.cf-cell__link {
  display: grid;
  grid-template-columns: 400fr 300fr 322fr auto;
  align-items: center;
  min-height: 100px;
  padding: 20px 30px 20px 40px;
  border-radius: 999px;
  background: var(--cf-white);
  box-shadow: 0 10px 15px rgba(239, 104, 14, 0.05);
  color: var(--cf-ink);
  text-decoration: none;
  transition: box-shadow 0.25s ease;
}

.cf-cell__link:hover {
  box-shadow: 0 14px 30px rgba(239, 104, 14, 0.12);
}

.cf-cell__title {
  margin: 0;
  padding-inline: 10px;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.cf-eyebrow {
  margin: 0;
  padding: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cf-cell__tag {
  color: var(--cf-ember);
}

.cf-arrow {
  display: grid;
  place-items: center;
  width: 36.5px;
  height: 36.5px;
  margin: 10px;
  border-radius: 999px;
  background: var(--cf-ember);
  transition: transform 0.25s ease;
}

.cf-arrow img {
  display: block;
}

.cf-cell__link:hover .cf-arrow {
  transform: translateX(4px);
}

.cf-roles__empty {
  margin: 0;
  padding: 40px 20px;
  text-align: center;
  color: var(--cf-ink-50);
}

/* Tablet and below */
@media (max-width: 991px) {
  .cf-cell__link {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title arrow"
      "tag arrow"
      "location arrow";
    column-gap: 16px;
    padding: 22px 22px 22px 32px;
    border-radius: 40px;
  }
  .cf-cell__title {
    grid-area: title;
    padding: 0;
    font-size: 21px;
    line-height: 28px;
  }
  .cf-cell__tag {
    grid-area: tag;
    margin-top: 8px;
    padding: 0;
  }
  .cf-cell__location {
    grid-area: location;
    margin-top: 2px;
    padding: 0;
  }
  .cf-arrow {
    grid-area: arrow;
    margin: 0;
  }
  .cf-cell.is-skeleton {
    border-radius: 40px;
  }
}

/* Mobile: pills scroll sideways */
@media (max-width: 767px) {
  .cf-roles {
    gap: 24px;
  }
  .cf-roles__filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cf-roles__filters::-webkit-scrollbar {
    display: none;
  }
  .cf-cell__link {
    padding: 20px 20px 20px 26px;
    border-radius: 28px;
  }
  .cf-cell__title {
    font-size: 19px;
    line-height: 25px;
  }
}

