/* 欣懋渼麗綻案｜我們加的樣式。舊廠商的版面與樣式在 css/style.css，沒有改。
   這裡只放接上我們架構才需要的：預覽標示、誘餌欄位、個資視窗（取代 fancybox）、提示訊息、表單送出後的訊息。 */

/* 預覽標示：共用程式在預覽版的頁尾插入 <div class="preview-flag">，樣式照其他預覽站 */
.preview-flag { position: fixed; top: 0; left: 50%; z-index: 4000; padding: 4px 14px; font-size: 12px; letter-spacing: 1px; color: #fff; background: #961c1c; border-radius: 0 0 4px 4px; transform: translateX(-50%); pointer-events: none; }
@media (max-width: 768px) {
  .preview-flag { left: auto; right: 0; padding: 3px 8px; font-size: 11px; letter-spacing: 0; border-radius: 0 0 0 4px; transform: none; }
}

/* 誘餌欄位：真人看不到，機器人會填 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 個資視窗：原本用 fancybox 開，改成瀏覽器內建的 <dialog>。class 不能叫 modal、toast：會和舊站的 Bootstrap 撞名被藏起來。外框的白底、陰影、圓角照舊站 #privacy-windows 的設定 */
.site-dialog { --modal-fade: .33s; width: fit-content; max-width: calc(100vw - 30px); max-height: calc(100vh - 88px); margin: auto; padding: 24px; overflow: auto; color: inherit; background: #fff; border: 0; border-radius: 5px; box-shadow: 0 2px 15px #222; }
.site-dialog::backdrop { background: rgba(15, 15, 17, .87); }
.site-dialog[open] { animation: modal-in var(--modal-fade) ease both; }
.site-dialog.is-closing { animation: modal-out var(--modal-fade) ease both; }
.modal__close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; font-size: 24px; line-height: 44px; color: #555; background: none; border: 0; cursor: pointer; }
.modal__close::after { content: "×"; }
.modal__close:hover { color: #000; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-out { from { opacity: 1; } to { opacity: 0; } }

/* 提示訊息（送出失敗、網路不穩） */
.site-toast { position: fixed; left: 50%; bottom: 70px; z-index: 5000; max-width: calc(100vw - 30px); padding: 10px 18px; font-size: 15px; color: #fff; background: rgba(0, 0, 0, .85); border-radius: 4px; opacity: 0; transform: translateX(-50%); transition: opacity .25s; pointer-events: none; }
.site-toast.is-on { opacity: 1; }

/* 表單送出後的訊息（預覽版：說明沒有送出；正式版：感謝訊息）。字用舊站表單的白（表單在紅底上） */
.form-done { width: 100%; padding: 30px 10px; text-align: center; color: #FFF; }
.form-done strong { display: block; margin: 0 0 12px; font-size: 1.35em; letter-spacing: 1px; }
.form-done p { margin: 0; font-size: 1em; line-height: 1.7; color: #FFF; }
.form-button.is-sending { pointer-events: none; opacity: .7; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .site-dialog[open], .site-dialog.is-closing { animation: none; }
}

