/*
 * Temporary compatibility for the shared navigation.
 * Bättre möten does not include the SA UI card styles used by the component.
 * Keep these rules scoped so they can leave with the theme.
 */

.sa-global-navigation .popover {
  display: none;
}

.sa-global-navigation .popover:is(:popover-open, .is-open) {
  display: block;
}

.sa-global-navigation .sa-ui-orange {
  --color-highlight: #eb5200;
  --color-surface-1: #fdede5;
  --color-surface-2: #fbdccc;
  --color-surface-3: #f7ba99;
}

.sa-global-navigation .sa-ui-green {
  --color-highlight: #00994f;
  --color-surface-1: #e3f9ef;
  --color-surface-2: #ccebdc;
  --color-surface-3: #7ed69b;
}

.sa-global-navigation .sa-ui-purple {
  --color-highlight: #a64dff;
  --color-surface-1: #f2e8ff;
  --color-surface-2: #e7cfff;
  --color-surface-3: #d8b0ff;
}

.sa-global-navigation .sa-ui-pink {
  --color-highlight: #ff74bf;
  --color-surface-1: #ffe8f5;
  --color-surface-2: #ffcfe9;
  --color-surface-3: #ffb7de;
}

.sa-global-navigation .sa-ui-badge-container {
  position: relative;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge {
  align-items: center;
  background-color: var(--color-surface-3);
  display: flex;
  flex-shrink: 0;
  justify-content: center;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge--circle {
  border-radius: 9999px;
  height: 40px;
  width: 40px;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge--oval {
  border-radius: 9999px;
  height: 32px;
  padding: 0 12px;
  width: fit-content;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge--half-oval {
  border-end-end-radius: 9999px;
  border-start-end-radius: 9999px;
  height: 32px;
  padding: 0 12px;
  width: fit-content;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge--outlined {
  background-color: var(--color-neutral-0);
  border: 1px solid var(--color-highlight);
  border-radius: 9999px;
  color: var(--color-highlight);
  height: 32px;
  padding: 0 12px;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge .text {
  color: var(--color-text);
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge.sa-ui-sub-primary {
  background-color: var(--color-neutral-800);
}

.sa-global-navigation .sa-ui-badge-container .sa-ui-badge.sa-ui-sub-primary span {
  color: var(--color-white);
}

.sa-global-navigation .sa-ui-spotlight-card-container {
  container-type: inline-size;
  min-width: 0;
}

.sa-global-navigation .sa-ui-spotlight-card {
  --spotlight-card-hover-background: var(--color-surface-3);

  background-color: var(--color-surface-2);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  text-align: left;
  text-decoration: none;
}

.sa-global-navigation .sa-ui-spotlight-card::before {
  background-color: var(--spotlight-card-hover-background);
  clip-path: circle(0 at 0 100%);
  content: "";
  inset: 0;
  position: absolute;
  transition: clip-path 600ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.sa-global-navigation .sa-ui-spotlight-card:is(a, a:hover, a:focus, a:focus-within) {
  color: var(--color-text);
  text-decoration: none;
}

.sa-global-navigation .sa-ui-spotlight-card:is(:hover, :focus-visible)::before {
  clip-path: circle(150% at 0 100%);
}

.sa-global-navigation .sa-ui-spotlight-card:focus-visible {
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: 3px;
}

.sa-global-navigation .sa-ui-spotlight-card__media {
  aspect-ratio: 4 / 3;
  border-end-end-radius: var(--radius-lg);
  display: none;
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.sa-global-navigation .sa-ui-spotlight-card__image {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease-out;
  width: 100%;
}

.sa-global-navigation .sa-ui-spotlight-card:is(:hover, :focus-visible) .sa-ui-spotlight-card__image {
  transform: scale(1.03);
}

.sa-global-navigation .sa-ui-spotlight-card__header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  position: relative;
  width: 100%;
  z-index: 1;
}

.sa-global-navigation .sa-ui-spotlight-card__label .sa-ui-badge-container {
  max-width: 100%;
}

.sa-global-navigation .sa-ui-spotlight-card__arrow {
  aspect-ratio: 1;
  background-color: var(--color-white);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  display: grid;
  place-items: center;
  transition: background-color 180ms ease;
}

.sa-global-navigation .sa-ui-spotlight-card:is(:hover, :focus-visible) .sa-ui-spotlight-card__arrow {
  background-color: var(--color-surface-1);
}

.sa-global-navigation .sa-ui-spotlight-card__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.sa-global-navigation .sa-ui-spotlight-card__title.h4 {
  display: block;
  font-family: var(--font-secondary);
  font-weight: 600;
  margin: 0;
}

.sa-global-navigation .sa-ui-spotlight-card__paragraph {
  color: var(--color-text-muted);
  display: block;
  margin: 0;
}

.sa-global-navigation .sa-ui-spotlight-card.sa-ui-sub-primary {
  --spotlight-card-hover-background: var(--color-neutral-600);

  background-color: var(--color-neutral-800);
  color: var(--color-white);
}

.sa-global-navigation .sa-ui-spotlight-card.sa-ui-sub-primary:is(a, a:hover, a:focus, a:focus-within) {
  color: var(--color-white);
}

.sa-global-navigation .sa-ui-spotlight-card.sa-ui-sub-primary .sa-ui-spotlight-card__paragraph {
  color: inherit;
}

.sa-global-navigation .sa-ui-spotlight-card.sa-ui-sub-primary .sa-ui-spotlight-card__arrow {
  color: var(--color-neutral-800);
}

@media (min-width: 48rem) {
  .sa-global-navigation .sa-ui-spotlight-card__media {
    display: block;
  }

  .sa-global-navigation .sa-ui-spotlight-card:has(.sa-ui-spotlight-card__media) .sa-ui-spotlight-card__header {
    inset: 0 0 auto;
    position: absolute;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-global-navigation .sa-ui-spotlight-card,
  .sa-global-navigation .sa-ui-spotlight-card::before,
  .sa-global-navigation .sa-ui-spotlight-card__image,
  .sa-global-navigation .sa-ui-spotlight-card__arrow {
    transition: none;
  }
}
