/* แผ่นคำขอใหม่ด้านล่าง + snackbar ยกเลิก (ทีม UX 23 ต.ค. 2569)
   ไม่มี public/css/approval.css ในโปรเจกต์ จึงแยกเป็นไฟล์นี้ · ปุ่มใช้คลาส .btn เดิมจาก theme.css */

.bottom-sheet {
  position: fixed; z-index: 7; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(460px, calc(100vw - 24px));
  padding: 14px 16px; background: var(--bg-2); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 0); visibility: visible;
  transition: transform 0.28s ease, visibility 0.28s;
}
.bottom-sheet.hidden { transform: translate(-50%, calc(100% + 40px)); visibility: hidden; }
@media (max-width: 899px) { .bottom-sheet, .snackbar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

.bs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.bs-later { background: none; border: none; color: var(--text-muted); font: inherit; font-size: 13px; padding: 6px 4px; cursor: pointer; }
.bs-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.bs-until, .bs-more { display: block; color: var(--text-muted); font-size: 12.5px; }
.bs-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bs-acts .btn { min-height: 44px; }

.snackbar {
  position: fixed; z-index: 8; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(460px, calc(100vw - 24px)); box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; overflow: hidden; background: var(--bg-surface-2, var(--bg-2)); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 14px; line-height: 1.4;
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}
.snackbar.show { transform: translate(-50%, 0); visibility: visible; }
.snackbar .bs-msg { min-width: 0; overflow-wrap: anywhere; }
.snackbar .btn { min-height: 36px; flex: none; }
.snackbar .bs-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent, #38bdf8);
  transform-origin: left center; animation: bs-shrink 5s linear forwards;
}
@keyframes bs-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .bottom-sheet, .snackbar { transition: none; }
  .snackbar .bs-bar { animation-duration: 5s; }
}
