/* 교사·학생 비밀번호 바꾸기 창(teacher-password.js). 팝업 안내(notice-popup.css)와 같은 손그림 창 모양이고,
   다른 테마 파일의 .modal 규칙보다 앞서도록 #teacherPasswordModal 범위로 씁니다. */
body.tp-open { overflow: hidden; }
body #teacherPasswordModal { z-index: 61; padding: 16px; background: rgb(28 30 52 / 52%); }
body #teacherPasswordModal.hidden { display: none; }
body #teacherPasswordModal [hidden] { display: none !important; }
body #teacherPasswordModal .tp-panel {
  box-sizing: border-box; display: flex; flex-direction: column;
  width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  color: #2c3566; background: #fffdf8; border: 2px solid #3a3f62; border-radius: 14px 6px 12px 7px / 7px 12px 6px 14px;
  box-shadow: 4px 6px 0 rgb(44 53 102 / 18%);
}
body #teacherPasswordModal .tp-head {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 18px;
  background: #eef3ff; border-bottom: 2px dashed #c9d4f0;
}
body #teacherPasswordModal .tp-eyebrow { font-size: calc(13px * var(--reading-scale, 1)); font-weight: 800; color: #4d5fb3; }
body #teacherPasswordModal #tpTitle { font-size: calc(19px * var(--reading-scale, 1)); font-weight: 800; line-height: 1.4; word-break: keep-all; }
body #teacherPasswordModal .tp-body { padding: 16px 20px 20px; }
body #teacherPasswordModal .tp-lead {
  margin: 0 0 14px; font-size: calc(15px * var(--reading-scale, 1)); line-height: 1.65; word-break: keep-all;
}
body #teacherPasswordModal .tp-form { display: grid; gap: 6px; }
body #teacherPasswordModal .tp-form label { margin-top: 6px; font-size: calc(14px * var(--reading-scale, 1)); font-weight: 800; }
body #teacherPasswordModal .tp-form input {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: calc(16px * var(--reading-scale, 1));
  color: #2c3566; background: #fff; border: 2px solid #c8c2ae; border-radius: 10px;
}
body #teacherPasswordModal .tp-form input:focus-visible { outline: 3px dashed #7d6bc7; outline-offset: 2px; border-color: #3a3f62; }
body #teacherPasswordModal .tp-rule { margin: 0; font-size: calc(13px * var(--reading-scale, 1)); line-height: 1.5; color: #6b6f86; }
body #teacherPasswordModal .tp-status { min-height: 1.5em; margin: 8px 0 0; font-size: calc(14px * var(--reading-scale, 1)); font-weight: 700; line-height: 1.5; }
body #teacherPasswordModal .tp-status[data-tone='error'] { color: #c4432f; }
body #teacherPasswordModal .tp-status[data-tone='loading'] { color: #4d5fb3; }
body #teacherPasswordModal .tp-done__text {
  margin: 0; padding: 12px 14px; font-size: calc(15px * var(--reading-scale, 1)); font-weight: 700; line-height: 1.6;
  color: #23613f; background: #eaf6ee; border: 1px dashed #8cc4a2; border-radius: 10px;
}
body #teacherPasswordModal .tp-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
body #teacherPasswordModal .tp-actions button {
  min-height: 44px; padding: 4px 18px; font: inherit; font-size: calc(15px * var(--reading-scale, 1)); font-weight: 800; cursor: pointer;
}
body #teacherPasswordModal .tp-later { color: #3a3f62; background: #fff; border: 2px solid #d7cdb5; border-radius: 999px; }
body #teacherPasswordModal .tp-later:hover { border-color: #3a3f62; background: #fff8e6; }
body #teacherPasswordModal .tp-submit {
  min-width: 112px; color: #fff; background: #2c3566; border: 2px solid #3a3f62;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; box-shadow: 2px 3px 0 #3a3f62;
}
body #teacherPasswordModal .tp-submit:hover { background: #222a55; }
body #teacherPasswordModal button:disabled { opacity: 0.6; cursor: progress; }
body #teacherPasswordModal button:focus-visible { outline: 3px dashed #7d6bc7; outline-offset: 2px; }
/* 머리말: '로그아웃' 앞의 '비밀번호 변경'(서버가 변경을 허용한 계정에만). 옆의 '사용법' 단추와 같은 모양입니다. */
body.curriculum-app .app-utilities .tp-open-btn {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 12px;
  font: inherit; font-size: calc(13px * var(--reading-scale, 1)); font-weight: 800; color: #3a3f62;
  background: #fff; border: 2px solid #3a3f62; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; cursor: pointer;
}
body.curriculum-app .app-utilities .tp-open-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.curriculum-app .app-utilities .tp-open-btn:hover { background: #fff8e6; box-shadow: 2px 3px 0 #3a3f62; }
body.curriculum-app .app-utilities .tp-open-btn:focus-visible { outline: 3px dashed #7d6bc7; outline-offset: 3px; }
.tp-open-btn[hidden] { display: none !important; }

@media (max-width: 640px) {
  body #teacherPasswordModal { padding: 0; align-items: end; }
  body #teacherPasswordModal .tp-panel { width: 100%; max-height: 92dvh; border-width: 2px 0 0; border-radius: 16px 16px 0 0; }
  body #teacherPasswordModal .tp-body { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
  body #teacherPasswordModal .tp-actions button { flex: 1 1 0; }
}
