/* password.css — "ลืมรหัสผ่าน?" ในหน้าล็อกอิน + หน้าต่างเปลี่ยนรหัสผ่าน · คู่กับ password.js
   กรอบ/สี/ปุ่ม มาจากหน้าต่างกลางของเกม (.st-modal/.st-box + กรอบซากุระใน Theme/sakura-kit.css · .pv-h/.pv-btn)
   ไฟล์นี้จัดแค่: ลำดับชั้น · ความกว้าง · ช่องกรอก · กล่องคำแนะนำลืมรหัส */

/* ---------- หน้าล็อกอิน ---------- */
.pw-forgot {
  font:
    600 13px Sarabun,
    sans-serif;
  color: #5a6175;
}

.pw-forgot summary {
  cursor: pointer;
  color: #c8424f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pw-forgot ul {
  margin: 6px 0 0;
  padding: 8px 10px 8px 26px;
  border-radius: 10px;
  background: #fff6e8;
  border: 1px solid #ecd7b0;
  font-weight: 400;
  line-height: 1.5;
}

.pw-forgot li + li {
  margin-top: 4px;
}

/* ---------- หน้าต่างเปลี่ยนรหัสผ่าน ---------- */
/* เปิดจากหน้าตั้งค่า → ต้องอยู่เหนือหน้าต่างตั้งค่า แต่ต่ำกว่าหน้าต่างเวอร์ชันใหม่ (9500) */
.st-modal.pw-modal {
  z-index: 9100;
}

/* 3 คลาส: ชนะกฎจอแนวนอนของ .st-modal .st-box (แผ่ 2 คอลัมน์) แบบเดียวกับ leave-confirm.css */
.st-modal.pw-modal .pw-box {
  display: block;
  width: min(360px, 100%);
}

.pw-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.pw-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font:
    600 13px Sarabun,
    sans-serif;
}

.pw-form input:not([type='checkbox']) {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #d9cdb8;
  background: #fff;
  color: #3b4255;
  font:
    16px Sarabun,
    sans-serif; /* 16px กัน iPhone ซูมหน้าเองตอนแตะช่อง */
}

.pw-form input:focus {
  outline: 2px solid #e07a98;
  outline-offset: 1px;
}

.pw-form .pw-show {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pw-err {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdecee;
  border: 1px solid #e8a0a8;
  color: #c8424f;
  font-size: 13px;
}

/* ห้ามหด — จอแนวนอนเตี้ย ๆ ปุ่มเคยถูกบีบจนเหลือเส้นบาง (กล่องเลื่อนดูแทน) */
.pw-form > * {
  flex: none;
}

.pw-form .pv-btn {
  justify-content: center; /* ความสูงปุ่มใช้ตามมาตรฐานเกม (Core/shared-ui.theme-5.css) */
}

/* จอแนวนอนเตี้ย (มือถือ) — ช่องกรอกเตี้ยลง ให้ปุ่มบันทึกอยู่ในจอโดยไม่ต้องเลื่อน */
@media (max-height: 460px) {
  .pw-form {
    gap: 6px;
  }

  .pw-form input:not([type='checkbox']) {
    padding: 7px 10px;
  }
}
