/* Playful Classroom (v08) — Профиль пользователя */

.profile-page {
  display: flex;
  justify-content: center;
  padding: 1rem;
}
.profile-page .auth-sticky {
  max-width: 500px;
  width: 100%;
}

/* ── Аватар ──────────────────────────────────── */
.profile-avatar-section {
  text-align: center;
  margin-bottom: 1.2rem;
}
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  width: 100px;
  height: 100px;
  /* свой containing block — иначе absolute уезжает к .fade-in с transform */
  transform: translateZ(0);
}
.profile-avatar-img {
  width: 100px;
  height: 100px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e0e6ed;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.profile-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #b0bccb;
  border: 3px dashed #d4dce6;
}
.profile-avatar-edit,
.profile-avatar-delete {
  position: absolute;
  bottom: 2px;
  z-index: 3;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, background 0.15s;
}
.profile-avatar-edit {
  right: 2px;
  left: auto;
  top: auto;
  background: var(--accent, #1f5bb5);
  color: #fff;
  font-size: 0.8rem;
}
.profile-avatar-edit:hover {
  transform: scale(1.1);
}
.profile-avatar-delete {
  left: 2px;
  right: auto;
  top: auto;
  background: #c45a4a;
  color: #fff;
  font-size: 0.75rem;
  border: none;
  appearance: none;
  -webkit-appearance: none;
}
.profile-avatar-delete:hover {
  transform: scale(1.1);
  background: #a84838;
}
#id_avatar {
  display: none;
}

/* ── Форма ───────────────────────────────────── */
.profile-form {
  margin-bottom: 0.5rem;
}
.profile-field-group {
  margin-bottom: 0.75rem;
}
.profile-label {
  display: block;
  font-family: var(--font-chalk);
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.2rem;
}
.profile-field {
  width: 100%;
  background: #fff;
  border: 1.5px solid #d4dce6;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--sb-ink, #2c3e50);
  transition: border-color 0.15s;
}
.profile-field:focus {
  outline: none;
  border-color: var(--accent, #1f5bb5);
  box-shadow: 0 0 0 3px rgba(31, 91, 181, 0.1);
}
.profile-field--readonly {
  background: #f7f9fc;
  color: #888;
  cursor: default;
}
.profile-name-input {
  width: 100%;
  background: #fff;
  border: 1px dashed #bbb;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--sb-ink, #2c3e50);
  transition: border-color 0.15s;
}
.profile-name-input:focus {
  outline: none;
  border-color: var(--accent, #1f5bb5);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(31, 91, 181, 0.1);
}
.profile-field-error {
  color: #e23b3b;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}
textarea.profile-field {
  resize: vertical;
}

/* ── Разделитель ─────────────────────────────── */
.profile-divider {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 1rem 0;
}

/* ── Прочая информация ───────────────────────── */
.profile-info p {
  font-family: var(--font-chalk);
  font-size: 1rem;
  color: #555;
  margin: 0.25rem 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stat {
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  text-align: center;
}
.stat__label {
  display: block;
  font-family: var(--font-chalk);
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.15rem;
}
.stat__value {
  display: block;
  font-family: var(--font-chalk);
  font-size: 1.4rem;
  color: #444;
}
.stat__value--small {
  font-size: 1rem;
  color: #888;
}
.stat__value i {
  color: #ff6b35;
}

.profile-page .btn-v08-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
}

/* ─── Тёмная тема ──────────────────────────────────────────────── */
.theme-dark .profile-field {
  background: #222438;
  border-color: var(--sb-line, #363850);
  color: var(--sb-ink, #c8d0e0);
}
.theme-dark .profile-field--readonly {
  background: #1a1c2e;
  color: var(--sb-muted);
}
.theme-dark .profile-name-input {
  background: #222438;
  border-color: #5a5a5a;
  color: var(--sb-ink, #c8d0e0);
}
.theme-dark .profile-label {
  color: var(--sb-ink-soft, #8890a8);
}
.theme-dark .profile-info p {
  color: var(--sb-ink-soft, #8890a8);
}
.theme-dark .profile-divider {
  border-color: var(--sb-line, #363850);
}
.theme-dark .stat {
  background: rgba(255,255,255,0.06);
}
.theme-dark .stat__label {
  color: var(--sb-muted);
}
.theme-dark .stat__value {
  color: var(--sb-ink);
}
.theme-dark .stat__value--small {
  color: var(--sb-muted);
}

.theme-dark .auth-sticky a.btn-v08-cta {
  background: #4a3834;
  color: #d8ccc6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.theme-dark .auth-sticky a.btn-v08-cta:hover {
  background: #564038;
  color: #ece2dc;
  transform: scale(1.02);
}
.theme-dark .auth-sticky a.btn-v08-cta i {
  color: #c4a89a;
}
.theme-dark .profile-avatar-delete {
  background: #8a4840;
}
.theme-dark .profile-avatar-delete:hover {
  background: #a85848;
}

.feedback-intro {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 1rem;
  line-height: 1.45;
}
.feedback-hint,
.feedback-after {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.35;
}
.feedback-after {
  margin-top: 1.25rem;
  text-align: center;
}
.feedback-thanks {
  text-align: center;
  padding: 0.5rem 0.25rem 0.75rem;
}
.feedback-thanks__icon {
  font-size: 2.4rem;
  color: #3d8b5f;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.feedback-thanks__title {
  font-family: var(--font-chalk);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--sb-ink, #2c3e50);
  margin: 0 0 0.65rem;
  line-height: 1.25;
}
.feedback-thanks__text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: #555;
  line-height: 1.45;
  margin: 0 0 1.25rem;
}
.feedback-thanks__again {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.theme-dark .feedback-intro {
  color: #c8c0b8;
}
.theme-dark .feedback-hint,
.theme-dark .feedback-after {
  color: #9a9088;
}
.theme-dark .feedback-thanks__icon {
  color: #6fcf97;
}
.theme-dark .feedback-thanks__title {
  color: #ece2dc;
}
.theme-dark .feedback-thanks__text {
  color: #c8c0b8;
}

@media (max-width: 480px) {
  .profile-stats {
    grid-template-columns: 1fr;
  }
}
