/* 票卷登錄頁面樣式 */

/* 原本網頁的個資條款外框 */
.legal-terms-container {
  max-width: 100%;
  margin: 0 auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.terms-title {
  font-size: 20px;
  color: #111;
  margin-top: 0;
  margin-bottom: 10px;
  border-left: 4px solid #a3233b; /* 企業識別色 */
  padding-left: 10px;
}

.terms-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* 條款觸發連結區 */
.terms-link-wrapper {
  background-color: #fdf2f4;
  padding: 12px 15px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 15px;
}

.terms-link {
  color: #a3233b;
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

/* 三個 Radio 選項群組 */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.option-label {
  display: block;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.option-title {
  font-weight: bold;
}

/* 選項被停用時的狀態 */
.option-label.disabled-label {
  background-color: #f9f9f9;
  color: #999;
  cursor: not-allowed;
  border-color: #eee;
}
.option-label.disabled-label input {
  cursor: not-allowed;
}

/* 選項解除鎖定後的狀態 */
.option-label.enabled-label {
  background-color: #fff;
  color: #333;
  cursor: pointer;
}
.option-label.enabled-label:hover {
  border-color: #a3233b;
  background-color: #fff9fa;
}

/* 網頁底部送出區 */
.page-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.hint-text {
  font-size: 13px;
  color: #d9534f; /* 警告紅 */
  margin: 0;
}

/* 通用按鈕樣式 */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  transition: background-color 0.2s;
}
.btn:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}
.btn-next:not(:disabled) {
  background-color: #a3233b;
  color: #fff;
  cursor: pointer;
}
.btn-next:not(:disabled):hover {
  background-color: #821c2f;
}

/* ========================================== */
/* 彈出式視窗（Modal）樣式                     */
/* ========================================== */
.modal-overlay {
  display: none; /* 預設隱藏 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

/* 顯示視窗時切換成 flex 居中 */
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #fff;
  width: 90%;
  max-width: 580px;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content h2 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #111;
  text-align: center;
}

/* 必須滾動的條款文字框 */
.modal-terms-box {
  height: 280px;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  overflow-y: scroll; /* 強制垂直捲軸 */
  background-color: #fafafa;
  line-height: 1.7;
  font-size: 14px;
  color: #444;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.modal-hint-text {
  font-size: 13px;
  color: #d9534f; /* 警告紅 */
  margin-right: auto; /* 靠左推 */
}

.btn-modal-confirm:not(:disabled) {
  background-color: #28a745; /* 閱讀完畢用綠色 */
  color: white;
  cursor: pointer;
}
