/* ==========================================================================
   Object/Project
   設計: FLOCSS + BEM
   接頭辞: .cps-
   ========================================================================== */

/* 共有コンポーネント: カードスタイル
------------------------------------------------------------------- */
.cps-Card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  max-width: 600px;
  margin: 2em auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #333;
}

.cps-Card__Header {
  padding: 18px 25px;
  border-bottom: 1px solid #e0e0e0;
}

.cps-Card--has-bg-header .cps-Card__Header {
  background-color: #f9f9f9;
  border-radius: 12px 12px 0 0;
}

.cps-Card__Title {
  margin: 0;
  font-size: 1.25em;
  font-weight: 600;
  color: #1a1a1a;
}

.cps-Card__Body {
  padding: 25px;
}

/* データがない場合の共通スタイル */
.cps-Card__NoData {
  text-align: center;
  color: #666;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 0;
}

/* メッセージ表示 (.cps-Message)
------------------------------------------------------------------- */
.cps-Message {
  padding: 1em;
  margin-bottom: 1.5em;
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 3px;
}
.cps-Message--success {
  background-color: #f0fff4;
  border-left-color: #22c55e;
  color: #166534;
}
.cps-Message--error {
  background-color: #fff1f2;
  border-left-color: #ef4444;
  color: #991b1b;
}

/* Project: 申請フォーム
------------------------------------------------------------------- */
/* --- 申請状況表示エリア --- */
.cps-PointStatus {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid #e0e0e0;
  text-align: center;
}

.cps-PointStatus__Label {
  margin: 0 0 5px 0;
  font-size: 0.9em;
  color: #555;
}

.cps-PointStatus__AvailablePoints {
  margin: 0;
  font-size: 2.5em;
  font-weight: 700;
  color: #007bff; /* メインカラー */
  line-height: 1.2;
}

.cps-PointStatus__Detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #ccc;
  font-size: 0.9em;
  color: #444;
  text-align: left;
}

.cps-PointStatus__Detail p {
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
}

.cps-PointStatus__Pending {
  color: #d9534f;
}

/* --- 申請フォームエリア --- */
.cps-ApplicationForm__Group {
  margin-bottom: 20px;
}

.cps-ApplicationForm__Label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95em;
}

.cps-ApplicationForm__InputWrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cps-ApplicationForm__Input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  font-size: 1.1em;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cps-ApplicationForm__Input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none;
}

.cps-ApplicationForm__InputWrapper span {
  font-size: 1.1em;
  font-weight: 600;
  color: #555;
}

.cps-ApplicationForm__Textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  font-size: 1em;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.cps-ApplicationForm__Textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none;
}

/* --- 申請ボタン --- */
.cps-ApplicationForm__SubmitWrapper {
  text-align: center;
  margin-top: 25px;
}

.cps-ApplicationForm__SubmitButton {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 14px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  width: 100%;
}

.cps-ApplicationForm__SubmitButton:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* Project: 申請履歴一覧
------------------------------------------------------------------- */
/* --- 履歴リスト --- */
.cps-HistoryList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cps-HistoryList__Item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 15px;
}

.cps-HistoryList__Item:first-child {
  padding-top: 0;
}

.cps-HistoryList__Item:last-child {
  border-bottom: none;
}

.cps-HistoryList__Info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cps-HistoryList__Date {
  font-size: 0.9em;
  color: #555;
}

.cps-HistoryList__Points {
  font-size: 1.25em;
  font-weight: 600;
  color: #1a1a1a;
}

/* --- 履歴項目 (右側: ステータスとアクション) --- */
.cps-HistoryList__StatusWrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* --- ステータスバッジ --- */
.cps-StatusBadge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.85em;
  font-weight: 600;
  border-radius: 15px;
  min-width: 65px;
  text-align: center;
}
/* 承認済み (例: status='approved' or 'completed') */
.cps-StatusBadge--approved,
.cps-StatusBadge--completed {
  background-color: #d4edda;
  color: #155724;
}
/* 申請中 (例: status='pending') */
.cps-StatusBadge--pending {
  background-color: #fff3cd;
  color: #856404;
}
/* 却下 (例: status='rejected') */
.cps-StatusBadge--rejected {
  background-color: #f8d7da;
  color: #721c24;
}
/* キャンセル (例: status='cancelled') */
.cps-StatusBadge--cancelled {
  background-color: #e0e0e0;
  color: #666;
}

/* --- 申請中のアクションエリア --- */
.cps-HistoryList__Actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
}

.cps-HistoryList__Warning {
  color: #d9534f;
  font-weight: 600;
}

.cps-HistoryList__CancelLink {
  color: #007bff;
  text-decoration: none;
  border: 1px solid #007bff;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.cps-HistoryList__CancelLink:hover {
  background-color: #007bff;
  color: #fff;
}

/* --- データがない場合の表示 --- */
.cps-HistoryCard__NoData {
  text-align: center;
  color: #666;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0 0 0;
}

/* Project: 今年度の獲得数 (.cps-Summary)
------------------------------------------------------------------- */

/* --- 総獲得数 --- */
.cps-SummaryTotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 25px;
}

.cps-SummaryTotal__Label {
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.cps-SummaryTotal__Points {
  font-size: 1.8em;
  font-weight: 700;
  color: #007bff;
}

/* --- 内訳リスト --- */
.cps-SummaryList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cps-SummaryList__Item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cps-SummaryList__Item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.cps-SummaryList__Item:first-child {
  padding-top: 0;
}

.cps-SummaryList__Type {
  font-size: 0.95em;
  color: #444;
}

.cps-SummaryList__Points {
  font-size: 1.1em;
  font-weight: 600;
  background-color: #e9f5ff;
  color: #0056b3;
  padding: 4px 10px;
  border-radius: 15px;
  min-width: 60px;
  text-align: right;
}
