/* ============================================================================
 * Button Component Styles
 * 按鈕元件樣式
 * ============================================================================ */

/* 登出按鈕 */
.btn-logout {
  padding: 8px 16px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.3s;
}

.btn-logout:hover {
  background: #d32f2f;
}

/* 篩選按鈕 */
.btn-filter {
  padding: 8px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-filter:hover {
  background: #5568d3;
}

/* 重置按鈕 */
.btn-reset {
  padding: 8px 20px;
  background: #666;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-reset:hover {
  background: #555;
}

/* 新增按鈕 */
.btn-add {
  padding: 8px 16px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-add:hover {
  background: #45a049;
}

/* 取消按鈕 */
.btn-cancel {
  padding: 10px 24px;
  background: #f5f5f5;
  color: #666;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-cancel:hover {
  background: #e0e0e0;
}

/* 提交按鈕 */
.btn-submit {
  padding: 10px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #5568d3;
}

/* 主要按鈕 */
.btn-primary {
  padding: 10px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #5568d3;
}

/* 次要按鈕 */
.btn-secondary {
  padding: 10px 24px;
  background: white;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

/* 危險按鈕（刪除用） */
.btn-danger {
  padding: 10px 24px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #d32f2f;
}

.btn-danger:active {
  transform: scale(0.98);
}

/* 小尺寸按鈕 */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 編輯圖示按鈕 */
.btn-edit-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #667eea;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.3s;
}

.btn-edit-icon:hover {
  background: #e8ebf7;
}

/* 刪除合約按鈕 - 右上角 X 圖示 */
.btn-delete-contract {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  background: #f44336;
  color: white;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  padding: 0;
}

.btn-delete-contract:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

/* 提前解約連結 */
.btn-terminate-contract {
  color: #ff9800;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  margin-left: 8px;
  border: none;
  background: none;
  padding: 0;
}

.btn-terminate-contract:hover {
  color: #f57c00;
  text-decoration: underline;
}

/* 連結樣式按鈕 */
.user-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.user-link:hover {
  text-decoration: underline;
}

.edit-link {
  color: #667eea;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
}

.edit-link:hover {
  text-decoration: underline;
}

/* 更新匯款狀態連結 */
.link-update-payment {
  color: #667eea;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  margin-left: 8px;
  border: none;
  background: none;
  padding: 0;
}

.link-update-payment:hover {
  color: #5568d3;
  text-decoration: underline;
}

/* 分頁容器 */
.pagination-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

/* 分頁按鈕 */
.pagination-buttons {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-buttons button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}

.pagination-buttons button:hover:not(:disabled) {
  background: #f5f5f5;
}

.pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-buttons button.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 管理員管理專用按鈕 */
.btn-delete-small {
  padding: 4px 12px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s;
}

.btn-delete-small:hover {
  background: #d32f2f;
}

.btn-danger {
  padding: 10px 24px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-danger:hover {
  background: #d32f2f;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background: #e3f2fd;
  color: #1976d2;
}

.badge-secondary {
  background: #f5f5f5;
  color: #666;
}
