/* Change outfit modal: preview on the left, part tabs, color grid and toggles on the right (see theme.css) */
#outfit-modal .modal-body > .change-outfit-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
}

/* Left column: preview with the outfit type selector below it */
.outfit-preview-column {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  width: 194px;
}

#outfit-modal .outfit-canvas-wrapper {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 194px;
  border: 1px solid black;
  border-radius: 6px;
  background-image: radial-gradient(circle at 50% 45%, var(--color-accent-haze), transparent 65%), var(--gradient-card);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* The 64px preview canvas is shown at triple size with sharp pixels */
#outfit-example {
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
}

/* Shared look of the small symbol buttons (rotate, previous and next outfit); scoped to the preview column so the
   close cross keeps the shared look of every modal */
#outfit-modal .outfit-preview-column button.symbol-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  max-width: 24px;
  margin: 0;
  font-size: 13px;
  color: var(--color-icon-light);
  border: 1px solid black;
  border-radius: 5px;
  background-image: var(--gradient-surface);
  box-shadow: var(--shadow-raised);
}

#outfit-modal .outfit-preview-column button.symbol-button:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-image: var(--gradient-surface-light);
}

#outfit-modal .outfit-preview-column button.symbol-button .material-icons {
  font-size: 18px;
  pointer-events: none;
}

#outfit-modal #rotate-outfit {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 1;
}

/* Outfit type selector: previous, name and next */
.change-outfit {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

#outfit-span {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: bold;
  color: var(--color-accent-text);
  border: 1px solid black;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Right column */
.outfit-color-picker-wrapper {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
}

/* Part tabs: shared tab look (ui-tabs / ui-tab, see controls.css), the four tabs share the width */
.outfit-color-picker-wrapper .outfit-button-row {
  flex: 0 0 auto;
}

#outfit-modal .outfit-face-picker {
  flex: 1 1 0;
  justify-content: center;
  gap: 6px;
  padding: 5px 0;
}

/* Current color of the part, shown inside its tab */
.outfit-part-color {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid black;
  border-radius: 3px;
  pointer-events: none;
}

/* Color grid */
.outfit-color-picker {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px;
  border: 1px solid black;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.outfit-color-picker-row {
  display: flex;
  flex-direction: row;
  gap: 3px;
}

.outfit-color-picker-row > button {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  background-image: none;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.1s;
}

.outfit-color-picker-row > button:hover {
  border-color: var(--color-accent);
  background-image: none;
  transform: scale(1.15);
}

/* Color of the selected part */
.outfit-color-picker-row > button.selected {
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 5px var(--color-accent-glow);
  transform: scale(1.15);
}

/* Addon and animation toggle switches (input.settings-switch, see settings.css) */
.outfit-toggles {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.outfit-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.outfit-toggle:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}
