/* Shared AR UI styles — used by every category page */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: #000;
}

#ui {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #fff;
  padding: 8px 12px env(safe-area-inset-bottom, 12px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#sliders-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px 8px;
  margin-bottom: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

#sliders-panel.hidden {
  display: none;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.slider-label {
  width: 44px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.slider-row input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.slider-val {
  width: 44px;
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

#sliders-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.save-btn {
  background: rgba(72, 199, 142, 0.2);
  border: 1px solid rgba(72, 199, 142, 0.5);
  border-radius: 7px;
  color: #48c78e;
  padding: 5px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}

.save-btn:hover {
  background: rgba(72, 199, 142, 0.35);
}
.save-btn.saved {
  background: rgba(72, 199, 142, 0.45);
  color: #fff;
}

.bottom-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  height: 44px;
  width: 44px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover,
.icon-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Loader */
#moksha-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.6s ease;
}
#moksha-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.ml-ring {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: ml-spin 0.9s linear infinite;
}
@keyframes ml-spin {
  to {
    transform: rotate(360deg);
  }
}
.ml-sub {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.3px;
  text-align: center;
  padding: 0 24px;
}

#moksha-error {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 24px;
  text-align: center;
}
#moksha-error.shown {
  display: flex;
}
#moksha-error h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
#moksha-error p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 320px;
}
