/* SneckWorld — переключатель слоёв (тест) */

#sw-layers-panel {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 1000;
  width: 230px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px 8px 6px;
  background: rgba(18, 18, 22, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  color: #eeeeee;
  font: 500 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px) scale(0.98);
  transform-origin: bottom center;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.3, 0.9, 0.3, 1), visibility 0s linear 0.22s;
}

#sw-layers-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.3, 0.9, 0.3, 1), visibility 0s;
}

.sw-lp-title {
  padding: 0 6px 8px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.sw-lp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #cfcfcf;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sw-lp-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.sw-lp-row.on {
  color: #ffffff;
}

.sw-lp-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Переключатель-«таблетка» */
.sw-lp-switch {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
}

.sw-lp-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.3, 0.9, 0.3, 1);
}

.sw-lp-row.on .sw-lp-switch {
  background: #fad282;
}

.sw-lp-row.on .sw-lp-switch::after {
  transform: translateX(14px);
}

.sw-lp-empty {
  padding: 10px 6px;
  color: #8a8a8a;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 560px) {
  #sw-layers-panel {
    bottom: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sw-layers-panel,
  #sw-layers-panel * {
    transition: none !important;
  }
}
