/* MathPro Tutors v5.3 · secure teacher profile pictures */
[data-photo-container] { position: relative; overflow: hidden; }
[data-photo-container] [data-photo-image] { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
[data-photo-container] [data-photo-fallback] { width: 100%; height: 100%; display: grid; place-items: center; color: inherit; font: inherit; font-style: normal; }
[data-photo-container] [data-photo-fallback][hidden],
[data-photo-container] [data-photo-image][hidden] { display: none !important; }

.mp-admin-content .teacher-photo-field { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 22px; padding: 18px; border: 1px solid var(--mp-line, #dfe3eb); background: #f8f9fb; }
.mp-admin-content .teacher-photo-preview { width: 116px; height: 116px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d7dce6; border-radius: 10px; background: linear-gradient(145deg, #1a1f2c, #d81b60); color: #fff; font-size: 30px; font-weight: 800; box-shadow: 0 8px 24px rgba(16, 24, 40, .1); }
.mp-admin-content .teacher-photo-copy { min-width: 0; }
.mp-admin-content .teacher-photo-copy > strong { display: block; margin-bottom: 4px; color: var(--mp-ink, #1a1f2c); font-size: 14px; }
.mp-admin-content .teacher-photo-copy > p { max-width: 680px; margin: 0 0 12px; color: var(--mp-muted, #697386); font-size: 12px; line-height: 1.55; }
.mp-admin-content .teacher-photo-copy > small { display: block; margin-top: 8px; color: var(--mp-muted, #697386); font-size: 10px; }
.mp-admin-content .teacher-photo-upload { position: relative; width: max-content; min-height: 40px; display: inline-flex !important; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid var(--mp-magenta, #d81b60); border-radius: 7px; background: var(--mp-magenta, #d81b60); color: #fff !important; font-size: 11px !important; font-weight: 800 !important; cursor: pointer; box-shadow: 0 7px 18px rgba(183, 0, 77, .13); }
.mp-admin-content .teacher-photo-upload:hover { background: #b9004d; border-color: #b9004d; }
.mp-admin-content .teacher-photo-upload:focus-within { outline: 3px solid rgba(216, 27, 96, .18); outline-offset: 2px; }
.mp-admin-content .teacher-photo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.mp-admin-content .teacher-directory-identity { min-width: 210px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; }
.mp-admin-content .teacher-directory-avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg, #1a1f2c, #d81b60); color: #fff; font-size: 12px; font-weight: 800; }
.mp-admin-content .teacher-directory-identity > span:last-child { min-width: 0; }
.mp-admin-content .teacher-directory-identity strong,
.mp-admin-content .teacher-directory-identity small { display: block; overflow-wrap: anywhere; }
.mp-admin-content .teacher-profile-hero .teacher-avatar,
.teacher-profile-card .teacher-avatar,
body.mp-portal-dashboard .teacher-avatar { overflow: hidden; padding: 0; }
.mp-admin-content .teacher-profile-hero .teacher-avatar > span,
.teacher-profile-card .teacher-avatar > span,
body.mp-portal-dashboard .teacher-avatar > span { display: grid; place-items: center; width: 100%; height: 100%; }

body.mathguru-theme .pro-tutor-avatar,
body.mathguru-theme .sky-directory-avatar,
body.mathguru-theme .mp-profile-avatar { overflow: hidden; padding: 0; }
body.mathguru-theme .pro-tutor-avatar img,
body.mathguru-theme .sky-directory-avatar img,
body.mathguru-theme .mp-profile-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
body.mathguru-theme .pro-tutor-avatar > i,
body.mathguru-theme .sky-directory-avatar > i { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-style: normal; font-weight: 850; }

@media (max-width: 620px) {
  .mp-admin-content .teacher-photo-field { grid-template-columns: 1fr; }
  .mp-admin-content .teacher-photo-preview { width: 104px; height: 104px; }
  .mp-admin-content .teacher-photo-upload { width: 100%; }
}

@media print {
  .mp-admin-content .teacher-photo-upload { display: none !important; }
}
