@property --mls-border-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0turn;
}

.mls-regions {
  --mls-bg: #090a0b;
  --mls-bg-2: #12171b;
  --mls-text: #f4f7f8;
  --mls-muted: #9aa7ad;
  position: fixed;
  right: var(--mls-side, 20px);
  bottom: var(--mls-bottom, 112px);
  z-index: 99996;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  pointer-events: none;
  font-family: inherit;
  contain: layout style;
}

.mls-regions.mls-has-slide-up {
  opacity: 0;
  transform: translateY(18px);
  animation: mls-slide-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.7s forwards;
}

@keyframes mls-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mls-regions .mls-tooltip {
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  transform: translateY(6px);
  background: rgba(9, 10, 11, 0.96);
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--mls-cyan) 40%, transparent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 12px color-mix(in srgb, var(--mls-cyan) 18%, transparent);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 2;
}

.mls-regions .mls-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 22px;
  border: 6px solid transparent;
  border-top-color: rgba(9, 10, 11, 0.96);
}

.mls-regions.mls-has-tooltip:not(.mls-is-open):hover .mls-tooltip,
.mls-regions.mls-has-tooltip:not(.mls-is-open):focus-within .mls-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mls-regions .mls-trigger {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: stretch;
  margin: 0;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  color: var(--mls-cyan-bright);
  background:
    conic-gradient(from var(--mls-border-angle), #0b0b0b, #090a0b 25%, #060606 50%, #090a0b 75%, #0b0b0b) padding-box,
    conic-gradient(
      from var(--mls-border-angle),
      transparent 18%,
      var(--mls-cyan) 34%,
      var(--mls-cyan-bright) 50%,
      var(--mls-cyan-dim) 66%,
      transparent 82%
    ) border-box,
    #090a0b border-box;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--mls-cyan) 35%, transparent),
    0 0 28px color-mix(in srgb, var(--mls-cyan) 14%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.5);
  animation: mls-border-spin 4s linear infinite;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Soft float — CSS transform only (GPU-friendly, tiny cost) */
.mls-regions:not(.mls-is-open) .mls-trigger {
  animation:
    mls-border-spin 4s linear infinite,
    mls-soft-float 3.2s ease-in-out infinite;
}

.mls-regions.mls-has-pulse:not(.mls-is-open) .mls-trigger {
  animation:
    mls-border-spin 4s linear infinite,
    mls-soft-float 3.2s ease-in-out infinite,
    mls-pulse-glow 2.8s ease-in-out infinite;
}

.mls-regions.mls-has-pulse.mls-is-open .mls-trigger {
  animation: mls-border-spin 4s linear infinite, mls-pulse-glow 2.8s ease-in-out infinite;
}

@keyframes mls-soft-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* One-time attention ping after load (no loop spam) */
.mls-regions:not(.mls-is-open) .mls-trigger-stack {
  position: relative;
}

.mls-regions:not(.mls-is-open) .mls-trigger-stack::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--mls-cyan) 50%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: mls-attention-ring 1.15s ease-out 2.4s 1;
}

@keyframes mls-attention-ring {
  0% {
    opacity: 0.65;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes mls-border-spin {
  to {
    --mls-border-angle: 1turn;
  }
}

@keyframes mls-pulse-glow {
  0%,
  100% {
    box-shadow:
      0 0 12px color-mix(in srgb, var(--mls-cyan) 35%, transparent),
      0 0 28px color-mix(in srgb, var(--mls-cyan) 14%, transparent),
      0 10px 28px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow:
      0 0 20px color-mix(in srgb, var(--mls-cyan) 55%, transparent),
      0 0 40px color-mix(in srgb, var(--mls-cyan) 24%, transparent),
      0 10px 30px rgba(0, 0, 0, 0.55);
  }
}

.mls-regions .mls-trigger:hover,
.mls-regions .mls-trigger:focus-visible {
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  outline: none;
}

.mls-regions.mls-is-open .mls-trigger {
  transform: translateY(-1px);
}

.mls-regions .mls-trigger-aura {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, color-mix(in srgb, var(--mls-cyan) 28%, transparent) 0%, transparent 70%);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.mls-regions .mls-trigger-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    color-mix(in srgb, var(--mls-cyan) 10%, transparent) 40%,
    rgba(255, 255, 255, 0.22) 50%,
    color-mix(in srgb, var(--mls-cyan) 10%, transparent) 60%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
  animation: mls-shine-sweep 5.2s ease-in-out 2.2s infinite;
}

@keyframes mls-shine-sweep {
  0%,
  68% {
    left: -120%;
  }
  100% {
    left: 140%;
  }
}

.mls-regions .mls-trigger-inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(9, 10, 11, 0.98) 0%, rgba(18, 23, 27, 0.98) 100%);
  color: var(--mls-cyan-bright);
}

.mls-regions .mls-trigger-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mls-cyan) 55%, transparent));
}

.mls-regions:not(.mls-is-open) .mls-trigger-icon {
  animation: mls-icon-wiggle 5.5s ease-in-out infinite;
}

@keyframes mls-icon-wiggle {
  0%,
  82%,
  100% {
    transform: rotate(0deg);
  }
  86% {
    transform: rotate(-10deg);
  }
  90% {
    transform: rotate(9deg);
  }
  94% {
    transform: rotate(-5deg);
  }
  97% {
    transform: rotate(3deg);
  }
}

.mls-regions .mls-trigger-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.mls-regions .mls-panel {
  pointer-events: none;
  position: relative;
  width: min(320px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
  z-index: 3;
}

.mls-regions.mls-is-open .mls-panel {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.mls-regions .mls-panel-aura {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--mls-cyan) 55%, transparent),
    transparent 40%,
    color-mix(in srgb, var(--mls-cyan-dim) 35%, transparent)
  );
  opacity: 0.85;
  filter: blur(0.5px);
  z-index: 0;
  pointer-events: none;
}

.mls-regions .mls-panel-inner {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(14, 18, 22, 0.98) 0%, rgba(8, 9, 11, 0.98) 100%);
  border: 1px solid color-mix(in srgb, var(--mls-cyan) 22%, transparent);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 32px color-mix(in srgb, var(--mls-cyan) 12%, transparent);
  backdrop-filter: blur(12px);
}

.mls-regions .mls-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mls-regions .mls-panel-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mls-cyan);
}

.mls-regions .mls-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--mls-text);
  letter-spacing: 0.01em;
}

.mls-regions .mls-panel-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--mls-muted);
}

.mls-regions .mls-panel-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--mls-cyan) 25%, transparent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--mls-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mls-regions .mls-panel-close:hover,
.mls-regions .mls-panel-close:focus-visible {
  background: color-mix(in srgb, var(--mls-cyan) 16%, transparent);
  border-color: var(--mls-cyan);
  color: var(--mls-cyan-bright);
  outline: none;
}

.mls-regions .mls-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mls-regions.mls-is-open .mls-item {
  animation: mls-item-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mls-regions.mls-is-open .mls-item:nth-child(1) {
  animation-delay: 0.04s;
}
.mls-regions.mls-is-open .mls-item:nth-child(2) {
  animation-delay: 0.09s;
}
.mls-regions.mls-is-open .mls-item:nth-child(3) {
  animation-delay: 0.14s;
}
.mls-regions.mls-is-open .mls-item:nth-child(4) {
  animation-delay: 0.19s;
}
.mls-regions.mls-is-open .mls-item:nth-child(5) {
  animation-delay: 0.24s;
}
.mls-regions.mls-is-open .mls-item:nth-child(n + 6) {
  animation-delay: 0.28s;
}

@keyframes mls-item-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mls-regions .mls-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mls-regions a.mls-link:hover,
.mls-regions a.mls-link:focus-visible {
  background: color-mix(in srgb, var(--mls-cyan) 10%, rgba(255, 255, 255, 0.03));
  border-color: color-mix(in srgb, var(--mls-cyan) 45%, transparent);
  transform: translateX(-2px);
  box-shadow: 0 0 18px color-mix(in srgb, var(--mls-cyan) 12%, transparent);
  outline: none;
}

.mls-regions .mls-item-current .mls-link {
  background: color-mix(in srgb, var(--mls-cyan) 14%, rgba(255, 255, 255, 0.02));
  border-color: color-mix(in srgb, var(--mls-cyan) 55%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--mls-cyan) 10%, transparent) inset;
  cursor: default;
}

.mls-regions .mls-flag {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px color-mix(in srgb, var(--mls-cyan) 10%, transparent);
}

.mls-regions .mls-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.mls-regions .mls-item-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--mls-text);
  letter-spacing: 0.01em;
}

.mls-regions .mls-item-sub {
  font-size: 11px;
  color: var(--mls-muted);
  line-height: 1.35;
}

.mls-regions .mls-here-tag {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #041014;
  background: linear-gradient(135deg, var(--mls-cyan-bright), var(--mls-cyan));
  padding: 5px 8px;
  border-radius: 999px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--mls-cyan) 40%, transparent);
}

.mls-regions .mls-arrow {
  display: inline-flex;
  color: var(--mls-cyan);
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mls-regions a.mls-link:hover .mls-arrow,
.mls-regions a.mls-link:focus-visible .mls-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.mls-regions .mls-trigger-stack {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.mls-regions .mls-trigger-stack .mls-trigger {
  pointer-events: auto;
}

.mls-mobile-info {
  display: none;
}

/* Crawlable regional links for search bots — always in HTML source */
.mls-crawl-nav {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mls-crawl-nav-title {
  margin: 0;
}

.mls-crawl-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mls-crawl-nav-list a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 782px) {
  .mls-regions {
    right: max(14px, var(--mls-side, 20px));
    bottom: var(--mls-mobile-bottom, 120px);
  }

  .mls-regions .mls-trigger-stack {
    align-items: center;
  }

  .mls-regions.mls-mobile-icon-only .mls-trigger-label {
    display: none;
  }

  .mls-regions.mls-mobile-icon-only .mls-trigger {
    border-radius: 50%;
  }

  .mls-regions.mls-mobile-icon-only .mls-trigger-inner {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .mls-regions.mls-mobile-icon-only .mls-trigger-icon {
    width: 22px;
    height: 22px;
  }

  .mls-regions.mls-mobile-icon-only .mls-mobile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
    pointer-events: none;
    max-width: 92px;
    text-align: center;
  }

  .mls-regions.mls-mobile-icon-only .mls-mobile-hint {
    display: block;
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--mls-cyan-bright);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .mls-regions.mls-mobile-icon-only .mls-mobile-subtitle {
    display: block;
    font-family: inherit;
    font-size: 8px;
    font-weight: 500;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.82);
  }

  .mls-regions .mls-tooltip {
    display: none;
  }

  .mls-regions .mls-panel {
    width: min(248px, calc(100vw - 48px));
    gap: 8px;
  }

  .mls-regions .mls-panel-aura {
    border-radius: 14px;
  }

  .mls-regions .mls-panel-inner {
    border-radius: 12px;
    padding: 10px;
  }

  .mls-regions .mls-panel-head {
    gap: 8px;
    margin-bottom: 8px;
  }

  .mls-regions .mls-panel-kicker {
    margin-bottom: 2px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .mls-regions .mls-panel-title {
    font-size: 13px;
    line-height: 1.2;
  }

  .mls-regions .mls-panel-subtitle {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.3;
  }

  .mls-regions .mls-panel-close {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }

  .mls-regions .mls-list {
    gap: 5px;
  }

  .mls-regions .mls-link {
    gap: 8px;
    padding: 8px 8px 8px 7px;
    border-radius: 9px;
  }

  .mls-regions .mls-flag {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 16px;
  }

  .mls-regions .mls-item-label {
    font-size: 12px;
  }

  .mls-regions .mls-item-sub {
    font-size: 9px;
  }

  .mls-regions .mls-here-tag {
    font-size: 7px;
    padding: 3px 6px;
    letter-spacing: 0.04em;
  }

  .mls-regions .mls-arrow svg {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 380px) {
  .mls-regions.mls-mobile-icon-only .mls-mobile-subtitle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mls-regions,
  .mls-regions .mls-trigger,
  .mls-regions .mls-trigger-shine,
  .mls-regions .mls-trigger-icon,
  .mls-regions .mls-trigger-stack::before,
  .mls-regions .mls-panel,
  .mls-regions .mls-item,
  .mls-regions .mls-link,
  .mls-regions .mls-arrow {
    animation: none !important;
    transition: none !important;
  }

  .mls-regions.mls-has-slide-up {
    opacity: 1;
    transform: none;
  }
}
