/* avatar.css */
/* ── Base wrap ─────────────────────────────────────────── */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  letter-spacing: -.5px;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  border: 2px solid var(--gold-15);
}

/* ── Tamanhos ───────────────────────────────────────────── */
.avatar-sm  { width: 36px;  height: 36px;  font-size: 15px; }
.avatar-md  { width: 52px;  height: 52px;  font-size: 22px; }
.avatar-lg  { width: 75px;  height: 75px;  font-size: 34px; }
.avatar-xl  { width: 110px; height: 110px; font-size: 46px; border-width: 3px; }
.avatar-2xl { width: 140px; height: 140px; font-size: 58px; border-width: 4px; }

/* ── Imagem ─────────────────────────────────────────────── */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Inicial (fallback) ─────────────────────────────────── */
.avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: inherit;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  color: #1a1209;
}

/* ── Editable (overlay câmera) ──────────────────────────── */
.avatar-editable {
  cursor: pointer;
}

.avatar-edit-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .2s ease;
  cursor: pointer;
  border-radius: 50%;
}

.avatar-edit-btn svg {
  width: 40%;
  height: 40%;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.avatar-editable:hover .avatar-edit-btn {
  opacity: 1;
}

/* ── Spinner de loading no upload ───────────────────────── */
.avatar-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--gold);
  animation: avatarSpin .7s linear infinite;
  background: rgba(0,0,0,.4);
}

@keyframes avatarSpin {
  to { transform: rotate(360deg); }
}

/* ── Upload progress toast ──────────────────────────────── */
.avatar-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card-bg, #1a1209);
  border: 1px solid var(--gold);
  color: var(--text1, #f0e6cc);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
}
.avatar-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Professional card com foto grande (agenda / painel) ──────── */
.professional-card-photo {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg2);
  border: 1px solid var(--border, var(--gold-15));
  border-radius: 14px;
  transition: border-color .2s ease;
}
.professional-card-photo:hover {
    background: var(--bg3);
  border-color: var(--gold-40);
}
.professional-card-photo .avatar-wrap {
  flex-shrink: 0;
}
.professional-card-photo-info {
  flex: 1;
  min-width: 0;
}
.professional-card-photo-info h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Admin modal — preview de avatar ────────────────────── */
.avatar-upload-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--gold-05);
  border: 1px dashed var(--gold-30);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.avatar-upload-preview:hover {
  border-color: rgba(201,168,76,.6);
  background: var(--gold-08);
}
.avatar-upload-preview-text {
  flex: 1;
}
.avatar-upload-preview-text strong {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 2px;
}
.avatar-upload-preview-text span {
  font-size: 11px;
  color: var(--text3, #7a6a4a);
}

/* ── Sidebar ─────────────────────── */
.avatar-sidebar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 2px solid var(--gold-40);
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #1a1209;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

/* ── Index — professional section avatar ─────────────────────── */
.professional-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #1a1209;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.professional-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ── Index — review avatar ──────────────────────────────── */
.review-avatar-pub {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #1a1209;
}
.review-avatar-pub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ── Minha conta — avatar grande editável ────────────────── */
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--card-bg, #1a1209);
  border: 1px solid var(--border, var(--gold-15));
  border-radius: 14px;
}
.profile-avatar-section .avatar-wrap {
  flex-shrink: 0;
}
.profile-avatar-section-info strong {
  display: block;
  font-size: 18px;
  color: var(--text1, #f0e6cc);
  margin-bottom: 4px;
}
.profile-avatar-section-info span {
  font-size: 13px;
  color: var(--text3, #7a6a4a);
}
.profile-avatar-section-info .btn-change-avatar {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--gold-40);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.profile-avatar-section-info .btn-change-avatar:hover {
  background: var(--gold-10);
  border-color: rgba(201,168,76,.7);
}
