.lucis-key-platform-dropdown {
  display: flex;
  max-height: 76vh;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  transition-property: opacity, transform !important;
}

.lucis-key-platform-dropdown .lucis-key-platform-panel {
  flex: 0 0 auto;
  border-bottom: 1px solid rgb(243 244 246);
  padding: 11px 12px 12px;
}

.dark .lucis-key-platform-dropdown .lucis-key-platform-panel {
  border-bottom-color: rgb(55 65 81 / 0.72);
}

.lucis-platform-heading,
.lucis-platform-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lucis-platform-heading {
  margin-bottom: 9px;
  color: rgb(55 65 81);
  font-size: 12px;
  font-weight: 650;
}

.dark .lucis-platform-heading {
  color: rgb(209 213 219);
}

.lucis-platform-heading-count,
.lucis-platform-results-count,
.lucis-platform-count {
  color: rgb(156 163 175);
  font-size: 11px;
  font-weight: 500;
}

.lucis-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.lucis-platform-button {
  --lucis-platform-color: #147a59;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgb(229 231 235);
  border-radius: 8px;
  background: rgb(249 250 251);
  padding: 7px 9px;
  color: rgb(55 65 81);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.lucis-platform-button::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--lucis-platform-color);
  content: '';
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.lucis-platform-button:hover {
  border-color: color-mix(in srgb, var(--lucis-platform-color) 42%, rgb(209 213 219));
  background: rgb(255 255 255);
}

.lucis-platform-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--lucis-platform-color) 45%, transparent);
  outline-offset: 1px;
}

.lucis-platform-button.selected {
  border-color: color-mix(in srgb, var(--lucis-platform-color) 58%, rgb(209 213 219));
  background: color-mix(in srgb, var(--lucis-platform-color) 7%, white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lucis-platform-color) 11%, transparent);
}

.lucis-platform-button.selected::after {
  opacity: 1;
  transform: scaleX(1);
}

.dark .lucis-platform-button {
  border-color: rgb(55 65 81 / 0.9);
  background: rgb(31 41 55 / 0.72);
  color: rgb(229 231 235);
}

.dark .lucis-platform-button:hover {
  border-color: color-mix(in srgb, var(--lucis-platform-color) 48%, rgb(75 85 99));
  background: rgb(31 41 55);
}

.dark .lucis-platform-button.selected {
  border-color: color-mix(in srgb, var(--lucis-platform-color) 62%, rgb(75 85 99));
  background: color-mix(in srgb, var(--lucis-platform-color) 12%, rgb(17 24 39));
}

.lucis-platform-mark {
  position: relative;
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgb(229 231 235);
  border-radius: 7px;
  background: white;
}

.dark .lucis-platform-mark {
  border-color: rgb(75 85 99 / 0.72);
  background: rgb(17 24 39);
}

.dark .lucis-platform-mark img {
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.lucis-platform-mark img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.lucis-platform-fallback {
  color: var(--lucis-platform-color);
  font-size: 10px;
  font-weight: 750;
}

.lucis-platform-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.lucis-platform-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lucis-platform-count {
  overflow: hidden;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lucis-key-platform-dropdown .select-search {
  flex: 0 0 auto;
}

.lucis-platform-results {
  flex: 0 0 auto;
  border-bottom: 1px solid rgb(243 244 246);
  padding: 8px 14px 7px;
  color: rgb(55 65 81);
  font-size: 12px;
}

.dark .lucis-platform-results {
  border-bottom-color: rgb(55 65 81 / 0.72);
  color: rgb(209 213 219);
}

.lucis-key-platform-dropdown .select-options {
  min-height: clamp(168px, 23vh, 224px);
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
}

.lucis-key-platform-dropdown .select-option[hidden] {
  display: none !important;
}

.lucis-platform-empty {
  padding: 18px 12px;
  color: rgb(156 163 175);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 639px) {
  .lucis-key-platform-dropdown {
    max-height: calc(100vh - 24px);
  }

  .lucis-platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lucis-platform-button {
    min-height: 45px;
  }

  .lucis-key-platform-dropdown .select-options {
    min-height: clamp(168px, 22vh, 196px);
  }
}

@media (min-width: 640px) and (max-width: 760px) {
  .lucis-platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lucis-platform-button,
  .lucis-platform-button::after {
    transition-duration: 1ms !important;
  }
}
