service-switcher { position: relative; display: block; flex: none; }
service-switcher *, service-switcher *::before, service-switcher *::after { box-sizing: border-box; }
service-switcher[hidden], .service-switcher-panel[hidden] { display: none; }

.service-switcher-trigger {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line, #8885);
  border-radius: 50%;
  color: inherit;
  background: var(--card, transparent);
  cursor: pointer;
}

.service-switcher-trigger span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -5px -5px, 0 -5px, 5px -5px, -5px 0, 5px 0, -5px 5px, 0 5px, 5px 5px;
}

.service-switcher-trigger:hover,
.service-switcher-trigger[aria-expanded="true"] { background: color-mix(in srgb, currentColor 12%, var(--card, transparent)); }

.service-switcher-panel {
  position: absolute;
  z-index: 60;
  inset: calc(100% + 10px) 0 auto auto;
  width: min(292px, calc(100vw - 32px));
  padding: 9px;
  border: 1px solid var(--line, #8885);
  border-radius: 18px;
  background: var(--card, #fff);
  box-shadow: 0 14px 36px #0003;
}

.service-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-switcher-grid a {
  display: flex;
  min-height: 82px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7px 3px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.service-switcher-grid a:hover,
.service-switcher-grid a[aria-current] { background: color-mix(in srgb, currentColor 8%, transparent); }
.service-switcher-grid a[aria-current] { border-color: color-mix(in srgb, currentColor 30%, transparent); font-weight: 650; }
service-switcher :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.service-switcher-icon {
  display: grid;
  width: 39px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #ffffff3d;
  border-radius: 26%;
  color: #fff;
  background: linear-gradient(145deg, var(--service-top, #6960a3), var(--service-bottom, #30294d));
  box-shadow: inset 0 1px 2px #ffffff38, 0 2px 6px #0003;
  font-size: 20px;
  font-weight: 650;
}

[data-service="news"] { --service-top: #548ff2; --service-bottom: #23449e; }
[data-service="finance"] { --service-top: #35bc9e; --service-bottom: #115c4c; }
[data-service="docs"] { --service-top: #587da8; --service-bottom: #263d64; }
[data-service="family"] { --service-top: #56876f; --service-bottom: #264b40; }
[data-service="monitoring"] { --service-top: #995e71; --service-bottom: #553543; }

@media (max-width: 600px) {
  .service-switcher-trigger { width: 32px; height: 32px; }
}
