/* 头像设置 — 参考 bilibili 风格布局 */

.account-avatar {
  background: #fff;
}

.account-avatar-header {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 1.5rem;
  border-bottom: 1px solid #ddd;
}

.account-avatar-header-icon {
  width: 4px;
  height: 16px;
  margin-right: 5px;
  background-color: #ff7da1;
  border-radius: 4px;
  flex-shrink: 0;
}

.account-avatar-header-text {
  color: #ff7da1;
  font-size: 14px;
  font-weight: 500;
}

.account-avatar-content {
  padding: 3.5rem 1.25rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.avatar-clip-wrap {
  width: 182px;
  height: 182px;
  position: relative;
  flex-shrink: 0;
}

.avatar-choose-box {
  width: 182px;
  height: 84px;
  background: #f1f2f5;
  border: 1px solid #e5e9ef;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  padding-left: 23px;
  position: absolute;
  top: 49px;
  left: 0;
}

.avatar-choose-box:hover {
  background: #e5e9ef;
}

.avatar-choose-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: #99a2aa;
}

.avatar-choose-box span {
  font-size: 14px;
  color: #5a6267;
  line-height: 20px;
  margin-left: 6px;
}

.avatar-clip-cropper {
  width: 182px;
  height: 182px;
  position: relative;
}

.avatar-clip-cropper.is-dragover .avatar-crop-box {
  outline: 2px dashed #ff7da1;
  outline-offset: -2px;
}

.avatar-crop-box {
  width: 182px;
  height: 182px;
  overflow: hidden;
  background: #f1f2f5;
  border: 1px solid #e5e9ef;
  border-radius: 4px;
}

.avatar-crop-box > img {
  display: block;
  max-width: 100%;
}

.avatar-crop-box .cropper-container {
  width: 182px !important;
  height: 182px !important;
}

.avatar-reset-btn {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6d757a;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.avatar-reset-btn:hover {
  color: #ff7da1;
}

.avatar-reset-btn svg {
  fill: currentColor;
  flex-shrink: 0;
}

.avatar-border-line {
  width: 1px;
  height: 182px;
  background: #e5e9ef;
  flex-shrink: 0;
}

.avatar-preview-wrap {
  flex-shrink: 0;
}

.avatar-pre-container {
  width: 182px;
  height: 182px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #e6eaf0;
  background: #f1f2f5;
  position: relative;
}

.avatar-pre-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-pre-info {
  margin-top: 20px;
  font-size: 12px;
  color: #99a2aa;
  text-align: center;
}

.account-avatar-descript {
  margin: 0;
  padding: 0 1rem 0.5rem;
  line-height: 1.6;
  color: #99a2aa;
  font-size: 12px;
  text-align: center;
}

.account-avatar-footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
}

.avatar-submit-btn {
  height: 36px;
  min-width: 110px;
  padding: 0 1.25rem;
  border-radius: 4px;
  border: 0;
  color: #999;
  background: #ddd;
  font-size: 14px;
  line-height: 36px;
  cursor: default;
  transition: background 0.2s, color 0.2s;
}

.avatar-submit-btn.is-ready {
  cursor: pointer;
  background: #ff7da1;
  color: #fff;
}

.avatar-submit-btn.is-ready:hover {
  background: #ff6b94;
}

.avatar-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

@media (max-width: 575.98px) {
  .avatar-border-line {
    display: none;
  }

  .account-avatar-content {
    flex-direction: column;
    padding-top: 2rem;
  }
}
