/**
 * AnteEnti User Avatars
 * Site-wide avatar polish + profile-page avatar editor.
 */

.anteenti-user-avatar,
#buddypress .anteenti-user-avatar,
#anspress .anteenti-user-avatar,
img.anteenti-user-avatar,
.anteenti-question-card__avatar img,
.anteenti-answer-card__avatar img,
.anteenti-profile-avatar,
.anteenti-contributor-avatar,
.anteenti-feed-contributor-avatar {
  border-radius: 999px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  display: inline-block;
  flex: 0 0 auto;
}

.anteenti-question-card__avatar img,
.anteenti-answer-card__avatar img {
  background: #fff7ed;
  box-shadow: 0 2px 8px rgba(78, 45, 24, 0.10);
}

.anteenti-question-card__avatar,
.anteenti-question-card__avatar img {
  width: 40px !important;
  height: 40px !important;
}

.anteenti-answer-card__avatar,
.anteenti-answer-card__avatar img {
  width: 44px !important;
  height: 44px !important;
}

.anteenti-profile-avatar,
.anteenti-profile-avatar-wrap img {
  background: #fff7ed;
}

.anteenti-avatar-settings {
  width: min(100%, 880px);
  margin: 28px auto 96px;
  padding: 0 16px;
  font-family: "Anek Telugu", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.anteenti-avatar-profile-editor {
  width: min(100%, 980px);
  margin: 18px auto 22px;
  padding: 0 16px;
  font-family: "Anek Telugu", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.anteenti-avatar-profile-editor summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  background: #fffaf2;
  border: 1px solid rgba(124, 45, 18, 0.14);
  border-radius: 20px;
  padding: 14px 18px;
  color: #3c1713;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(94, 57, 26, 0.08);
}

.anteenti-avatar-profile-editor summary::-webkit-details-marker {
  display: none;
}

.anteenti-avatar-profile-editor summary::after {
  content: "⌄";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(31, 146, 82, 0.1);
  color: #147a42;
  flex: 0 0 auto;
}

.anteenti-avatar-profile-editor[open] summary::after {
  content: "⌃";
}

.anteenti-avatar-profile-editor summary small {
  color: #7a665c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.anteenti-avatar-profile-editor .anteenti-avatar-settings {
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
}

.anteenti-avatar-profile-editor .anteenti-avatar-card {
  box-shadow: 0 12px 28px rgba(94, 57, 26, 0.08);
}

.anteenti-avatar-card {
  background: #fffaf2;
  border: 1px solid rgba(124, 45, 18, 0.14);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(94, 57, 26, 0.10);
}

.anteenti-avatar-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.anteenti-avatar-current {
  width: 116px;
  height: 116px;
  border-radius: 999px;
  padding: 5px;
  background: linear-gradient(135deg, #fef3c7, #ffffff);
  border: 1px solid rgba(124, 45, 18, 0.12);
  box-shadow: 0 8px 20px rgba(94, 57, 26, 0.13);
  flex: 0 0 auto;
}

.anteenti-avatar-current img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.anteenti-avatar-card h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  color: #24110f;
  font-weight: 800;
}

.anteenti-avatar-card p {
  margin: 0;
  color: #6f5a4e;
  font-size: 16px;
  line-height: 1.55;
}

.anteenti-avatar-notice {
  border-radius: 16px;
  padding: 12px 14px;
  margin: 14px 0;
  font-weight: 700;
}

.anteenti-avatar-notice--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.16);
}

.anteenti-avatar-notice--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid rgba(153, 27, 27, 0.16);
}

.anteenti-avatar-form {
  display: grid;
  gap: 18px;
}

.anteenti-avatar-option,
.anteenti-avatar-upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid rgba(124, 45, 18, 0.14);
  border-radius: 22px;
  padding: 14px;
  cursor: pointer;
}

.anteenti-avatar-option input[type="radio"],
.anteenti-avatar-upload-box input[type="radio"] {
  accent-color: #1f9252;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.anteenti-avatar-option img {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.anteenti-avatar-option-body {
  flex: 1 1 auto;
  min-width: 0;
}

.anteenti-avatar-option-title,
.anteenti-avatar-upload-box strong,
.anteenti-avatar-section-title {
  display: block;
  color: #3c1713;
  font-weight: 800;
}

.anteenti-avatar-option-text,
.anteenti-avatar-upload-box small {
  display: block;
  color: #7a665c;
  font-size: 14px;
  line-height: 1.45;
}

.anteenti-avatar-section-title {
  margin-top: 6px;
  font-size: 18px;
}

.anteenti-avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.anteenti-avatar-choice {
  position: relative;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 2px solid rgba(124, 45, 18, 0.10);
  border-radius: 22px;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.anteenti-avatar-choice:hover,
.anteenti-avatar-choice.is-selected,
.anteenti-avatar-choice:has(input:checked) {
  border-color: #1f9252;
  box-shadow: 0 8px 20px rgba(31, 146, 82, 0.14);
  transform: translateY(-1px);
}

.anteenti-avatar-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.anteenti-avatar-choice img {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.anteenti-avatar-upload-box {
  flex-wrap: wrap;
}

.anteenti-avatar-upload-box span {
  flex: 1 1 220px;
}

.anteenti-avatar-upload-box input[type="file"] {
  flex: 1 1 260px;
  max-width: 100%;
  font: inherit;
  color: #5f463a;
}

.anteenti-avatar-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 22px;
  background: #1f9252;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none !important;
  box-shadow: 0 12px 24px rgba(31, 146, 82, 0.20);
  cursor: pointer;
}

.anteenti-avatar-button:hover,
.anteenti-avatar-button:focus {
  background: #147a42;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .anteenti-avatar-settings {
    margin: 16px auto 110px;
    padding: 0 12px;
  }

  .anteenti-avatar-profile-editor {
    margin: 14px auto 18px;
    padding: 0 12px;
  }

  .anteenti-avatar-profile-editor summary {
    align-items: flex-start;
    border-radius: 18px;
    padding: 13px 14px;
  }

  .anteenti-avatar-profile-editor summary small {
    max-width: 180px;
    font-size: 12px;
  }

  .anteenti-avatar-profile-editor .anteenti-avatar-settings {
    margin-bottom: 0;
    padding: 0;
  }

  .anteenti-avatar-card {
    border-radius: 22px;
    padding: 18px;
  }

  .anteenti-avatar-header {
    align-items: flex-start;
    gap: 14px;
  }

  .anteenti-avatar-current {
    width: 86px;
    height: 86px;
  }

  .anteenti-avatar-card p {
    font-size: 14px;
  }

  .anteenti-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .anteenti-avatar-choice {
    border-radius: 18px;
    padding: 7px;
  }

  .anteenti-avatar-choice img {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 380px) {
  .anteenti-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
