/* KJ Affiliate Widget — shell styles
 * --------------------------------------------------------------------------
 * Loaded into the open Shadow DOM of every <kj-embed>. Styles ONLY the
 * widget shell (FAB, overlay popup, backdrop, toolbar, side nav, loading
 * state, embed-content wrapper). Page-level content styling comes from the
 * KJ frontend stylesheet bundle that the fragment HTML carries with it.
 *
 * Per-affiliate branding flows through CSS custom properties set on :host
 * by the JS from /api/widget/config/<key>'s `palette` object.
 */

:host {
  /* Reset all inherited styles from the affiliate page. */
  all: initial;
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;

  /* Brand palette defaults — overridden inline by JS from config.palette. */
  --kj-primary: #c0392b;
  --kj-heading: #6a1f17;
  --kj-link: #a73224;
  --kj-text: #2a1714;
  --kj-text-secondary: #6e5e5b;
  --kj-border: #e0d6d3;
  --kj-bg: #fbf6f5;
  --kj-panel-header: #f0d8d3;
  --kj-navbar: #6e2118;

  /* Widget shell tokens */
  --kj-w-radius: 12px;
  --kj-w-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  --kj-w-z-fab: 2147483646;
  --kj-w-z-overlay: 2147483647;
}

* { box-sizing: border-box; }

/* ---------- Floating Action Button (overlay mode) ---------- */
.kj-w__fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--kj-w-z-fab);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 50px;
  background: var(--kj-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.kj-w__fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}
.kj-w__fab svg { width: 20px; height: 20px; fill: currentColor; }

.kj-w__fab--bottom-left  { right: auto; left: 20px; }
.kj-w__fab--top-right    { bottom: auto; top: 20px; }
.kj-w__fab--top-left     { bottom: auto; top: 20px; right: auto; left: 20px; }

/* ---------- Overlay popup ---------- */
.kj-w__backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--kj-w-z-overlay) - 1);
  background: rgba(0, 0, 0, 0.55);
  display: none;
  animation: kj-w-fade-in 0.2s ease;
}
.kj-w__backdrop.is-open { display: block; }

.kj-w__overlay {
  position: fixed;
  inset: 24px;
  z-index: var(--kj-w-z-overlay);
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: var(--kj-w-radius);
  box-shadow: var(--kj-w-shadow);
  overflow: hidden;
  animation: kj-w-slide-up 0.25s ease;
}
.kj-w__overlay.is-open { display: flex; }

@media (max-width: 768px) {
  .kj-w__overlay.is-open { inset: 0; border-radius: 0; }
}

/* ---------- Toolbar ---------- */
.kj-w__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 48px;
  background: var(--kj-primary);
  color: #fff;
}
.kj-w__toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.kj-w__toolbar-back,
.kj-w__toolbar-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kj-w__toolbar-back:hover,
.kj-w__toolbar-close:hover { background: rgba(255, 255, 255, 0.28); }
.kj-w__toolbar-back[hidden] { display: none; }
.kj-w__toolbar-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Body: nav sidebar + content ---------- */
.kj-w__body {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}
.kj-w__nav {
  width: 220px;
  flex-shrink: 0;
  background: var(--kj-nav-bg, var(--kj-navbar));
  color: var(--kj-nav-fc, #fff);
  overflow-y: auto;
  padding: 12px 0;
}
.kj-w__nav-item {
  display: block;
  padding: 10px 18px;
  color: var(--kj-nav-fc, rgba(255, 255, 255, 0.92));
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.kj-w__nav-item:hover { background: rgba(255, 255, 255, 0.10); }
.kj-w__nav-item.is-active {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}
.kj-w__nav-group { margin-top: 4px; }
.kj-w__nav-group > .kj-w__nav-item { font-weight: 600; }
.kj-w__nav-group-children { padding-left: 16px; display: none; }
.kj-w__nav-group.is-open .kj-w__nav-group-children { display: block; }

@media (max-width: 768px) {
  .kj-w__nav { display: none; }
}

/* ---------- Embedded content area ---------- */
.kj-w__content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  position: relative;
  background: #fff;
}
.kj-w__embed {
  /* The injected KJ page lives here. The KJ frontend CSS bundle that comes
     with each fragment provides all content styling. */
  display: block;
  min-height: 100%;
}

/* Inline mode: no popup, content sits in flow. */
.kj-w__inline-wrap {
  width: 100%;
  min-height: 200px;
  position: relative;
  background: #fff;
  border-radius: var(--kj-w-radius);
  overflow: hidden;
}
.kj-w__inline-wrap .kj-w__content { overflow: visible; }

/* Inline-mode back bar — sticks above the embed when the user has nav history. */
.kj-w__inline-back {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--kj-bg);
  border-bottom: 1px solid var(--kj-border);
  font-size: 13px;
  color: var(--kj-text);
}
.kj-w__inline-back.is-visible { display: flex; }
.kj-w__inline-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--kj-border);
  background: #fff;
  color: var(--kj-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
.kj-w__inline-back-btn:hover { background: var(--kj-panel-header); }
.kj-w__inline-back-trail {
  color: var(--kj-text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Loading state ---------- */
.kj-w__loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--kj-text-secondary);
  font-size: 14px;
  /* Asymmetric transition: appear instantly when navigation starts (no
     'is this thing alive?' lag), fade out after the new fragment lands
     so the swap doesn't feel abrupt. */
  transition: opacity 0.25s ease;
  transition-delay: 0s;
}
.kj-w__loading:not(.is-hidden) {
  opacity: 1;
  transition: none;
}
.kj-w__loading.is-hidden {
  opacity: 0;
  pointer-events: none;
  /* Without this, the absolutely-positioned loader still hijacks layout
     in some browsers and obscures clicks even though invisible. */
  visibility: hidden;
}
.kj-w__loading::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border: 2px solid var(--kj-border);
  border-top-color: var(--kj-primary);
  border-radius: 50%;
  animation: kj-w-spin 0.7s linear infinite;
}

/* ---------- Error / empty states ---------- */
.kj-w__error {
  padding: 24px;
  text-align: center;
  color: var(--kj-text-secondary);
  font-size: 14px;
}

/* ---------- Faceted-filter chip bar (job list page) ----------
   Injected into the empty #jobFacetedFilters placeholder by the widget JS
   when on /job-offers. Doesn't aim to recreate the OWL chip-bar's full
   richness — provides field-of-law / function / location dropdowns,
   removable active chips, results count, and live re-fetch via the
   existing /api/widget/jobs endpoint. */
.kj-w__facets {
  margin-top: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--kj-border);
  border-radius: 8px;
}
.kj-w__facet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kj-w__facet-select {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--kj-border);
  border-radius: 6px;
  background: #fff;
  color: var(--kj-text);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%236e5e5b'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.kj-w__facet-select:focus {
  outline: none;
  border-color: var(--kj-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kj-primary) 18%, transparent);
}
.kj-w__facet-clear {
  padding: 7px 12px;
  border: 1px solid var(--kj-border);
  border-radius: 6px;
  background: var(--kj-bg);
  color: var(--kj-text-secondary);
  font-size: 12px;
  cursor: pointer;
}
.kj-w__facet-clear:hover {
  background: var(--kj-panel-header);
  color: var(--kj-heading);
}
.kj-w__facet-clear[hidden] { display: none; }
.kj-w__facet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.kj-w__facet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--kj-primary);
  color: #fff;
  font-size: 12px;
  border-radius: 100px;
  line-height: 1;
}
.kj-w__facet-chip-x {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.kj-w__facet-chip-x:hover { background: rgba(255, 255, 255, 0.4); }
.kj-w__facet-count {
  margin-top: 10px;
  font-size: 12px;
  color: var(--kj-text-secondary);
}
.kj-w__facet-count strong { color: var(--kj-heading); }
.kj-w__facet-loading {
  text-align: center;
  padding: 24px;
  color: var(--kj-text-secondary);
  font-size: 14px;
}
/* Subtle dimming + cursor while a fragment refetch is in flight; cards
   remain visible (no flash-to-empty) but feel inert until swap lands. */
.kj-w__loading-overlay {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* ---------- Autocomplete dropdown ---------- */
/* Anchor wrapper inserted around the search input on the embed list page. */
.kj-w__ac-anchor {
  position: relative;
  display: block;
  width: 100%;
}
.kj-w__ac-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 100;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--kj-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}
.kj-w__ac-dropdown.is-open { display: block; }
/* "Alle Ergebnisse" footer — sticks to the bottom of the scroll
   container so it's always reachable, instead of scrolling away
   below a long result list. */
.kj-w__ac-all {
  position: sticky;
  bottom: 0;
  z-index: 1;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-top: 1px solid var(--kj-border);
  background: #fff;
  color: var(--kj-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.kj-w__ac-all:hover { background: var(--kj-bg); }
/* Autocomplete row: the detail column must shrink (min-width:0) and
   the job name + employer must truncate with an ellipsis — otherwise
   a long job title overflows its column and collides with the
   right-aligned city. */
.kj-w__ac-item .o_search_result_item_detail { min-width: 0; }
.kj-w__ac-item [data-kj-ac-name],
.kj-w__ac-item [data-kj-ac-employer] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kj-w__ac-item [data-kj-ac-city-wrap] { padding-left: 8px; }
/* Re-assert the affiliate palette on the autocomplete row text. The
   SSR template borrows Odoo's `.h6` / `.btn-link` classes for
   briefcase-icon layout parity, but those carry KJ's own colours
   (incl. #ce0000 red on `.btn-link`). The dropdown lives in the
   widget's shadow root — outside #wrapwrap — so theme.css never
   reaches it; style the data-kj-ac-* hooks here instead. !important
   beats the bundled `.btn-link` / `.dropdown-item` colour. */
.kj-w__ac-item [data-kj-ac-name] {
  color: var(--kj-heading) !important;
}
.kj-w__ac-item [data-kj-ac-employer],
.kj-w__ac-item [data-kj-ac-city] {
  color: var(--kj-text-secondary) !important;
}
.kj-w__ac-all.kj-w__ac-all { color: var(--kj-primary) !important; }
/* Row briefcase icon — hardcoded KJ red in the bundle. KJ's rule
   (`.o_searchbar_form .o_dropdown_menu .dropdown-item
   .o_search_result_item …`) is ~5 classes deep, so match the
   dropdown's own class chain to land at (0,6,0) and win. */
.kj-w__ac-dropdown.o_dropdown_menu
  .kj-w__ac-item.dropdown-item
  .o_search_result_item .o_image_64_contain {
  color: var(--kj-primary) !important;
}
.kj-w__ac-item {
  display: flex;
  flex-direction: column;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--kj-bg);
  font-size: 13px;
  color: var(--kj-text);
}
.kj-w__ac-item:last-child { border-bottom: none; }
.kj-w__ac-item:hover,
.kj-w__ac-item.is-active { background: var(--kj-bg); }
.kj-w__ac-item-title {
  font-weight: 600;
  color: var(--kj-heading);
}
.kj-w__ac-item-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--kj-text-secondary);
}
.kj-w__ac-empty {
  padding: 14px;
  text-align: center;
  color: var(--kj-text-secondary);
  font-size: 13px;
}

/* ---------- In-widget Apply modal ---------- */
.kj-w__apply-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--kj-w-z-overlay) + 1);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px;
  animation: kj-w-fade-in 0.18s ease;
}
.kj-w__apply-overlay.is-open { display: flex; }

.kj-w__apply-dialog {
  background: #fff;
  border-radius: var(--kj-w-radius);
  box-shadow: var(--kj-w-shadow);
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  animation: kj-w-slide-up 0.22s ease;
}
.kj-w__apply-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--kj-border);
  background: var(--kj-bg);
}
.kj-w__apply-dialog header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--kj-heading);
}
.kj-w__apply-dialog header button {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--kj-text-secondary);
}
/* 2-column body: left = position details (sticky on tall forms),
   right = the form */
.kj-w__apply-body {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  align-items: start;
}
.kj-w__apply-position {
  background: var(--kj-bg);
  padding: 18px 20px;
  border-right: 1px solid var(--kj-border);
  font-size: 13px;
  color: var(--kj-text);
}
.kj-w__apply-position h4 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--kj-text-secondary);
  font-weight: 600;
}
.kj-w__apply-position .kj-w__apply-job-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--kj-heading);
  line-height: 1.3;
  margin-bottom: 12px;
}
.kj-w__apply-position dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.kj-w__apply-position dt {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--kj-text-secondary);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.kj-w__apply-position dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--kj-text);
}
@media (max-width: 720px) {
  .kj-w__apply-body { grid-template-columns: 1fr; }
  .kj-w__apply-position {
    border-right: none;
    border-bottom: 1px solid var(--kj-border);
  }
}
.kj-w__apply-form { padding: 18px 20px 8px; }
.kj-w__apply-form .row { display: flex; gap: 10px; }
.kj-w__apply-form .row > * { flex: 1; }
.kj-w__apply-form label {
  display: block;
  font-size: 12px;
  color: var(--kj-text-secondary);
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 500;
}
.kj-w__apply-form input[type="text"],
.kj-w__apply-form input[type="email"],
.kj-w__apply-form input[type="tel"],
.kj-w__apply-form input[type="url"],
.kj-w__apply-form textarea,
.kj-w__apply-form input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--kj-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--kj-text);
  background: #fff;
}
.kj-w__apply-form textarea { min-height: 80px; resize: vertical; }
.kj-w__apply-form input:focus, .kj-w__apply-form textarea:focus {
  outline: none;
  border-color: var(--kj-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kj-primary) 18%, transparent);
}
/* Honeypot field — hidden from real users + screen readers */
.kj-w__apply-form .kj-w__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px; overflow: hidden;
}
/* Consent checkbox row — small, tight, palette-coloured link if any. */
.kj-w__apply-form .kj-w__apply-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--kj-text-secondary, #555);
  font-weight: normal;
}
.kj-w__apply-form .kj-w__apply-consent input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
  width: auto;
  accent-color: var(--kj-primary);
}
.kj-w__apply-actions {
  padding: 14px 20px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--kj-border);
  background: var(--kj-bg);
  position: sticky;
  bottom: 0;
}
.kj-w__apply-actions button {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--kj-border);
  background: #fff;
  color: var(--kj-text);
  cursor: pointer;
}
.kj-w__apply-actions button.kj-w__btn-primary {
  background: var(--kj-primary);
  border-color: var(--kj-primary);
  color: #fff;
}
.kj-w__apply-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.kj-w__apply-status {
  padding: 12px 20px;
  font-size: 13px;
  border-top: 1px solid var(--kj-border);
}
.kj-w__apply-status[data-state="success"] { color: #186a3b; background: #e8f7ee; }
.kj-w__apply-status[data-state="error"]   { color: #a01818; background: #fbecec; }

/* ---------- In-widget Job-alert ("Suche speichern") modal ---------- */
.kj-w__alert-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--kj-w-z-overlay) + 1);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px;
  animation: kj-w-fade-in 0.18s ease;
}
.kj-w__alert-overlay.is-open { display: flex; }
.kj-w__alert-dialog {
  background: #fff;
  border-radius: var(--kj-w-radius);
  box-shadow: var(--kj-w-shadow);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  animation: kj-w-slide-up 0.22s ease;
}
.kj-w__alert-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--kj-border);
  background: var(--kj-bg);
}
.kj-w__alert-dialog header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--kj-heading);
}
.kj-w__alert-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--kj-text-secondary);
}
.kj-w__alert-body { padding: 18px 20px 4px; }
.kj-w__alert-intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--kj-text-secondary);
}
.kj-w__alert-criteria {
  font-size: 12px;
  color: var(--kj-text-secondary);
  background: var(--kj-bg);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.kj-w__alert-criteria strong { color: var(--kj-text); }
.kj-w__alert-form label {
  display: block;
  font-size: 12px;
  color: var(--kj-text-secondary);
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 500;
}
.kj-w__alert-form input[type="email"],
.kj-w__alert-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--kj-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--kj-text);
  background: #fff;
}
.kj-w__alert-form input:focus,
.kj-w__alert-form select:focus {
  outline: none;
  border-color: var(--kj-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kj-primary) 18%, transparent);
}
.kj-w__alert-form .kj-w__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px; overflow: hidden;
}
.kj-w__alert-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--kj-text-secondary, #555);
  font-weight: normal;
}
.kj-w__alert-consent input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
  width: auto;
  accent-color: var(--kj-primary);
}
.kj-w__alert-actions {
  padding: 14px 20px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--kj-border);
  background: var(--kj-bg);
}
.kj-w__alert-actions button {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--kj-border);
  background: #fff;
  color: var(--kj-text);
  cursor: pointer;
}
.kj-w__alert-actions button.kj-w__btn-primary {
  background: var(--kj-primary);
  border-color: var(--kj-primary);
  color: #fff;
}
.kj-w__alert-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.kj-w__alert-status {
  padding: 12px 20px;
  font-size: 13px;
  border-top: 1px solid var(--kj-border);
}
.kj-w__alert-status[data-state="success"] { color: #186a3b; background: #e8f7ee; }
.kj-w__alert-status[data-state="error"]   { color: #a01818; background: #fbecec; }

/* ---------- Faceted filter — mobile fallback ---------- */
/* KJ hides the dropdown panel below 1024px (its origin swaps to a
   bottom-sheet there). The widget's SSR template ships only the
   desktop panel, so force it visible — flowing in-document, full
   width — when the visitor opens it on a narrow viewport. The
   `.kj-faceted-filters` prefix lifts specificity to (0,3,0) over
   KJ's `.kj-chip-bar-mode .kj-dropdown-panels` (0,2,0). */
@media (max-width: 1023.98px) {
  .kj-faceted-filters .kj-dropdown-panels.is-open {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin-top: 8px;
  }
  .kj-faceted-filters .kj-dropdown-panels.is-open .kj-dropdown-panel {
    max-width: 100% !important;
  }
}

/* ---------- Animations ---------- */
@keyframes kj-w-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes kj-w-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kj-w-spin {
  to { transform: rotate(360deg); }
}
