/* تمام‌صفحه — مثل AvataScreen.tsx */
.ic-avatar-screen {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  background: #fff;
  direction: rtl;
  animation: ic-avatar-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-avatar-screen[hidden] {
  display: none !important;
}

@keyframes ic-avatar-slide-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ic-avatar-screen-head {
  flex-shrink: 0;
}

.ic-avatar-screen-close {
  visibility: visible;
}

.ic-avatar-screen-close[hidden] {
  display: grid !important;
  visibility: visible;
}

.ic-avatar-screen-close img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(1486%) hue-rotate(191deg) brightness(95%) contrast(91%);
}

.ic-avatar-screen-body {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 25px 40px;
  text-align: center;
}

.ic-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 60px;
  margin: 10px 0 12px;
  overflow: hidden;
  background: #eef2f8;
}

.ic-avatar-skeleton {
  position: absolute;
  inset: 0;
  border-radius: 60px;
  background: linear-gradient(90deg, #e8ecf3 0%, #f5f7fb 50%, #e8ecf3 100%);
  background-size: 200% 100%;
  animation: ic-avatar-shimmer 1.1s ease infinite;
}

.ic-avatar-skeleton[hidden] {
  display: none !important;
}

@keyframes ic-avatar-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.ic-avatar-photo-btn {
  display: block;
  width: 110px;
  height: 110px;
  padding: 0;
  border: 0;
  border-radius: 60px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}

.ic-avatar-photo-btn.is-default {
  cursor: default;
}

.ic-avatar-photo-btn img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 60px;
}

.ic-avatar-photo-btn img.is-loading {
  opacity: 0;
}

.ic-avatar-name-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 0;
  direction: ltr; /* مثل AvataScreen: diamond → tick → name */
}

.ic-avatar-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ic-avatar-name {
  margin: 0 0 0 0px;
  font-size: 18px;
  font-weight: 700;
  color: #2d3a4a;
  text-align: center;
}

.ic-avatar-badge-img {
  display: block;
  flex-shrink: 0;
}

.ic-avatar-badge-img--diamond {
  width: 14.5px;
  height: 14.5px;
  margin-top: 0px;
  filter: brightness(0) saturate(100%) invert(74%) sepia(16%) saturate(741%) hue-rotate(191deg) brightness(97%) contrast(90%);
}

.ic-avatar-badge-img--tick {
  width: 15.5px;
  height: 15.5px;
}

.ic-avatar-role {
  margin: 7px 0 6px;
  font-size: 11px;
  text-align: center;
}

.ic-avatar-role.is-special {
  color: #4e91e6;
}

.ic-avatar-role.is-free {
  color: #8e8e93;
}

.ic-avatar-role.is-expert {
  margin-bottom: 14px;
}

.ic-avatar-role.is-anim {
  animation: ic-avatar-role-pop 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) both;
  animation-delay: 0.35s;
}

@keyframes ic-avatar-role-pop {
  from {
    opacity: 0;
    transform: scale(1.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ic-avatar-expert-tag {
  align-self: center;
  background: #f3ecff;
  padding: 5px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: #725fea;
}

.ic-avatar-expert-tag[hidden] {
  display: none !important;
}

.ic-avatar-membership,
.ic-avatar-membership-today {
  margin: 0 0 25px;
  padding: 0 20px;
  font-size: 14px;
  color: #4e91e6;
  text-align: center;
  position: relative;
}

.ic-avatar-membership-today {
  font-size: 12px;
  color: #7e8a9a;
}

.ic-avatar-membership-val {
  font-size: 16px;
  font-weight: 700;
  color: #2d3a4a;
}

.ic-avatar-membership-unit {
  font-size: 12px;
  color: #7e8a9a;
  margin: 0 2px;
}

.ic-avatar-membership.is-blurred {
  filter: blur(5px);
  user-select: none;
}

.ic-avatar-membership-mask {
  position: absolute;
  inset: 0;
}

/* ImageViewer — پس‌زمینه سیاه + زوم */
.ic-avatar-viewer {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-avatar-viewer[hidden] {
  display: none !important;
}

.ic-avatar-viewer-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ic-avatar-viewer-close img {
  width: 28px;
  height: 28px;
  display: block;
  filter: brightness(0) invert(1);
}

.ic-avatar-viewer-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.ic-avatar-viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.ic-cmt-avatar-btn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

body.ic-avatar-modal-open .ic-avatar-screen {
  z-index: 1400;
}

@media (min-width: 801px) {
  .ic-phone-shell > .ic-avatar-screen {
    left: calc(50% - var(--ic-phone-width, 430px) / 2);
    right: auto;
    width: var(--ic-phone-width, 430px);
    max-width: 100%;
  }
}
