/* Avatar editor: laid out like Roblox's own editor — a preview card with the
   scaling sliders on the left, category tabs and item grids on the right. */

.ae-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ae-head h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1f1f1f;
}

.ae-more {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border: 0;
  border-radius: 3px;
  background: #02b757;
  color: #fff;
  cursor: pointer;
}

.ae-more:hover { background: #00a04c; }

.ae-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ae-layout[hidden] { display: none; }

@media (max-width: 820px) {
  .ae-layout { grid-template-columns: 1fr; }
}

/* ── Left: preview + scaling ── */
.ae-left {
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 10px;
}

.ae-stage {
  position: relative;
  background: #eef2f6;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.ae-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
}

.ae-stage img.zoomed { transform: scale(1.35); }

.ae-type {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(0, 120, 200, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 3px;
}

.ae-2d {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border: 1px solid #cfd6dd;
  border-radius: 3px;
  background: #fff;
  color: #444;
  cursor: pointer;
}

.ae-2d:hover { background: #f2f5f8; }

.ae-scale {
  padding: 12px 2px 4px;
  display: grid;
  gap: 12px;
}

.ae-scale-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f1f1f;
}

.ae-slider { display: grid; gap: 6px; }

.ae-slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b6b6b;
}

.ae-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #d5d5d5;
  outline: none;
}

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

.ae-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #b9b9b9;
  cursor: pointer;
}

.ae-redraw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #767676;
  padding: 10px 2px 0;
}

.ae-redraw button {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
}

.ae-redraw button:hover { background: #eaeaea; }

/* ── Right: tabs + grids ── */
.ae-right {
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 0 14px;
  min-width: 0;
}

.ae-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #e4e4e4;
  padding: 0 10px;
  overflow-x: auto;
}

.ae-tab {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #5a5a5a;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 12px 14px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.ae-tab:hover { color: #1f1f1f; }

.ae-tab.active {
  color: #1f1f1f;
  border-bottom-color: #00a2ff;
}

.ae-crumb {
  font-size: 13px;
  color: #767676;
  padding: 10px 14px 8px;
}

.ae-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  padding: 0 14px;
}

.ae-item {
  position: relative;
  display: grid;
  gap: 6px;
  border: 1px solid #e2e2e2;
  border-radius: 3px;
  padding: 8px 8px 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.ae-item:hover { border-color: #b9d9ef; }

.ae-item.worn {
  border-color: #02b757;
  box-shadow: 0 0 0 1px #02b757 inset;
}

.ae-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f6f8fa;
  border-radius: 2px;
}

.ae-item .ae-name {
  font-size: 12px;
  line-height: 1.25;
  color: #4a4a4a;
  max-height: 2.5em;
  overflow: hidden;
}

.ae-item .ae-price {
  font-size: 12px;
  font-weight: 700;
  color: #02b757;
}

.ae-item .ae-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 22px solid #02b757;
  border-left: 22px solid transparent;
  border-radius: 0 2px 0 0;
}

.ae-item .ae-corner::after {
  content: "";
  position: absolute;
  top: -19px;
  right: 3px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ae-recommended { margin-top: 18px; }

.ae-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 8px;
}

.ae-subhead h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1f1f1f;
}

.ae-seeall {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border: 0;
  border-radius: 3px;
  background: #00a2ff;
  color: #fff;
  cursor: pointer;
}

.ae-seeall:hover { background: #0090e6; }

.ae-search {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
}

.ae-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  outline: none;
}

.ae-search input:focus { border-color: #00a2ff; }

.ae-search button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid #02b757;
  border-radius: 3px;
  background: #02b757;
  color: #fff;
  cursor: pointer;
}

.ae-search button:hover { background: #00a04c; }

.ae-note {
  padding: 0 14px;
  font-size: 13px;
  color: #767676;
}
