﻿
/* Profile appearance modal */
.appearance-modal {
  width: min(880px, calc(100vw - 24px));
}

.appearance-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.appearance-preview-column {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.appearance-avatar-wrap {
  display: grid;
  min-height: 140px;
  place-items: center;
}

.appearance-avatar-preview {
  width: 132px !important;
  height: 132px !important;
  font-size: 38px !important;
}

.appearance-avatar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.appearance-cover-preview {
  width: 100%;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: center / cover no-repeat;
}

.appearance-hint {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.appearance-fields {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.appearance-frames {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px;
  max-height: 330px;
  overflow: auto;
  padding: 3px;
}

.appearance-frame {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.appearance-frame:hover,
.appearance-frame.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
}

.appearance-frame-preview {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
}

.appearance-frame-preview .avatar-frame-svg {
  width: 150%;
  height: 150%;
}

.appearance-frame small {
  width: 100%;
  overflow: hidden;
  font-size: 7.5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .appearance-layout {
    grid-template-columns: 1fr;
  }
  .appearance-cover-preview {
    max-width: 300px;
  }
  .appearance-frames {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    max-height: 280px;
  }
  .appearance-avatar-preview {
    width: 104px !important;
    height: 104px !important;
  }
}

.appearance-adjust {
  display: grid;
  gap: 5px;
  width: 100%;
  margin: 2px 0 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.appearance-adjust > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.appearance-adjust label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
}

.appearance-adjust input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.appearance-cover-preview {
  transform-origin: center;
  overflow: hidden;
  clip-path: inset(0 round 12px);
}

.appearance-avatar-wrap,
.appearance-cover-preview {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.appearance-avatar-wrap.is-dragging,
.appearance-cover-preview.is-dragging {
  cursor: grabbing;
}

.appearance-cover-preview {
  height: 120px;
}

.appearance-crop-controls {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 100%;
  margin: 0 0 6px;
}

.appearance-crop-controls input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.appearance-crop-controls small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  text-align: center;
}

.appearance-crop-controls .btn-text {
  font-size: 8px;
}
