/* =========================================================
   1mind Ashby Embed Theme (Hard Scoped)
   ONLY affects descendants of .careers-ashby
   ========================================================= */

/* Put all Ashby styling into a layer so it can't accidentally
   overpower other site CSS unless you want it to */
@layer ashby-theme {

  .careers-ashby {
    /* --- Theme tokens live ONLY in this scope --- */
    --bg: #07080a;
    --panel: #0f1115;
    --panel-2: #141821;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);

    --text: #e7eaf0;
    --text-dim: rgba(231,234,240,0.72);
    --text-faint: rgba(231,234,240,0.55);

    --accent: #7b6cff;
    --accent-2: #36d1ff;
    --accent-soft: rgba(123,108,255,0.14);

    --radius-lg: 18px;
    --radius-md: 12px;

    --shadow-soft: 0 8px 30px rgba(0,0,0,0.45);

    color: var(--text);
    font-family: inherit;
    isolation: isolate; /* prevents blend/stacking weirdness leaking out */
  }

  /* If Ashby injects its own font, this keeps it aligned, scoped only */
  .careers-ashby :where(*) {
    font-family: inherit !important;
    box-sizing: border-box;
  }

  /* Base Ashby containers Ashby uses across modes */
  .careers-ashby :where(
    .ashby-job-board,
    [data-ashby-job-board],
    .ashby-embed,
    .ashby-container
  ) {
    background: transparent !important;
    color: var(--text) !important;
  }

  /* Filters / search area */
  .careers-ashby :where(
    .ashby-filters,
    .ashby-search-bar,
    .ashby-department-filter,
    .ashby-location-filter,
    .ashby-filter-bar
  ) {
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 10px 12px !important;
    box-shadow: var(--shadow-soft) !important;
  }

  /* Inputs/selects scoped to embed */
  .careers-ashby :where(input[type="text"], input[type="search"], select, textarea) {
    background: transparent !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 12px !important;
    outline: none !important;
    font-size: 14px !important;
  }

  .careers-ashby :where(input, textarea)::placeholder {
    color: var(--text-faint) !important;
  }

  .careers-ashby :where(input, select, textarea):focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
  }

  /* Department headings */
  .careers-ashby :where(
    .ashby-department-heading,
    h2.ashby-department-title,
    .ashby-department h2
  ) {
    color: var(--text) !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    font-size: 18px !important;
    margin: 22px 0 10px !important;
  }

  /* Job list layout */
  .careers-ashby :where(.ashby-openings, .ashby-job-list) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Job cards/rows */
  .careers-ashby :where(
    .ashby-job-posting,
    .ashby-job-listing,
    a.ashby-job-link
  ) {
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 14px 16px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease !important;
    text-decoration: none !important;
    color: var(--text) !important;
  }

  .careers-ashby :where(
    .ashby-job-posting:hover,
    .ashby-job-listing:hover,
    a.ashby-job-link:hover
  ) {
    background: var(--panel-2) !important;
    border-color: var(--border-strong) !important;
    transform: translateY(-1px) !important;
  }

  /* Job title */
  .careers-ashby :where(
    .ashby-job-title,
    .ashby-job-posting-title,
    a.ashby-job-link > div:first-child
  ) {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--text) !important;
  }

  /* Job meta */
  .careers-ashby :where(
    .ashby-job-location,
    .ashby-job-meta,
    .ashby-job-posting-metadata,
    .ashby-job-detail
  ) {
    color: var(--text-dim) !important;
    font-size: 13px !important;
  }

  /* Tags / pills */
  .careers-ashby :where(
    .ashby-tag,
    .ashby-pill,
    .ashby-job-tag
  ) {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-dim) !important;
    border-radius: 999px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
  }

  /* Primary buttons */
  .careers-ashby :where(
    .ashby-apply-button,
    .ashby-button-primary,
    button.ashby-button
  ) {
    background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important;
    color: white !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 10px 14px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: transform 120ms ease, opacity 120ms ease !important;
  }

  .careers-ashby :where(
    .ashby-apply-button:hover,
    .ashby-button-primary:hover,
    button.ashby-button:hover
  ) {
    transform: translateY(-1px) !important;
    opacity: 0.95 !important;
  }

  /* Secondary buttons */
  .careers-ashby :where(.ashby-button-secondary, .ashby-back-button) {
    background: transparent !important;
    color: var(--text) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 999px !important;
    padding: 9px 13px !important;
    font-weight: 600 !important;
  }

  /* Links inside Ashby only */
  .careers-ashby :where(a) {
    color: var(--text) !important;
    text-decoration-color: rgba(255,255,255,0.25) !important;
    text-underline-offset: 3px !important;
  }
  .careers-ashby :where(a:hover) {
    color: white !important;
    text-decoration-color: rgba(255,255,255,0.6) !important;
  }

  /* Job detail container */
  .careers-ashby :where(.ashby-job-detail-container, .ashby-job-description) {
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 18px !important;
    box-shadow: var(--shadow-soft) !important;
  }

  /* Detail typography */
  .careers-ashby :where(.ashby-job-description h1, .ashby-job-description h2, .ashby-job-description h3) {
    color: var(--text) !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
  }
  .careers-ashby :where(.ashby-job-description p, .ashby-job-description li) {
    color: var(--text-dim) !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
  }

  /* Dividers */
  .careers-ashby :where(hr, .ashby-divider) {
    border-color: var(--border) !important;
    opacity: 1 !important;
  }

  /* Empty state */
  .careers-ashby :where(.ashby-empty-state, .ashby-no-results) {
    background: var(--panel) !important;
    border: 1px dashed var(--border-strong) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px !important;
    color: var(--text-dim) !important;
    text-align: center !important;
  }

  /* Mobile tweaks */
  @media (max-width: 640px) {
    .careers-ashby :where(.ashby-filters, .ashby-search-bar) {
      padding: 8px 10px !important;
    }
    .careers-ashby :where(.ashby-job-posting, .ashby-job-listing) {
      padding: 12px 14px !important;
    }
  }
}