/* ✅ 留言彈窗整體外框 */
.feedback-popup-wrapper {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ✅ 留言表單主體 */
.feedback-popup {
  background-color: #1a001f;
  border: 2px solid #a020f0;
  border-radius: 12px;
  padding: 25px 30px;
  width: 100%;
  max-width: 480px;
  color: #fff;
  box-shadow: 0 0 12px #a020f088;
  font-family: "Microsoft JhengHei", sans-serif;
}

/* ✅ 標題 */
.feedback-popup h2 {
  font-size: 20px;
  color: #ffccff;
  margin-bottom: 20px;
  text-align: center;
}

/* ✅ 標籤文字 */
.feedback-popup label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #f0d9ff;
  font-size: 14px;
}

/* ✅ 輸入框、下拉選單、文字框 */
.feedback-popup input,
.feedback-popup select,
.feedback-popup textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #2a0038;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.feedback-popup textarea {
  resize: vertical;
}

/* ✅ 字數倒數提示 */
#char_counter {
  margin-top: 5px;
  font-size: 13px;
  color: #ccc;
  text-align: right;
}

/* ✅ 按鈕區塊 */
.feedback-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}

/* ✅ 按鈕樣式 */
.feedback-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  background-color: #a020f0;
  color: #fff;
  transition: background-color 0.3s;
}

/* ✅ 送出中 Spinner 狀態 */
.feedback-buttons button.feedback-is-submitting {
  opacity: 0.7;
  pointer-events: none;
}

/* ✅ 按鈕 hover */
.feedback-buttons button:hover {
  background-color: #c040ff;
}

/* ✅ 取消按鈕樣式 */
.feedback-cancel-btn {
  background-color: #444;
}

.feedback-cancel-btn:hover {
  background-color: #666;
}

/* ✅ Toast 提示樣式 */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #5e005e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 0 10px #000;
  max-width: 80%;
  text-align: center;
}

/* ✅ 響應式支援：手機畫面 */
@media (max-width: 480px) {
  .feedback-popup {
    padding: 20px;
    max-width: 90%;
  }
}
.custom-feedback-toast {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #7e30d2;
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 99999; /* 確保比任何東西都高 */
  box-shadow: 0 0 10px #aa66ff;
  animation: fadeInOut 2.5s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  10%, 90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}
