/* ============================================================
   mypage.css — マイページ共通スタイル
   対象: mypage.html / mypage-test.html
   ============================================================ */

/* === ウェルカムバー === */
.welcome-bar {
  background: linear-gradient(135deg, #1a5276, #2980b9);
  color: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.welcome-avatar {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.welcome-name { font-size: 17px; font-weight: 700; }
.welcome-sub  { font-size: 12px; opacity: 0.8; margin-top: 2px; }

/* === 予約カード === */
.reservation-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  position: relative;
  background: #fff;
}
.reservation-card.confirmed { border-color: #2980b9;       background: #eaf4fb; }
.reservation-card.completed { border-color: var(--success); background: #eafaf1; }
.reservation-card.cancelled { border-color: var(--border);  background: #f8f9fa; opacity: 0.7; }
.reservation-card.partial   { border-color: var(--warning); background: #fef9e7; }

.res-header  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 8px; }
.res-type    { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.res-date    { font-size: 13px; color: var(--text-mid); margin-top: 2px; }
.res-time    { font-size: 16px; font-weight: 700; color: var(--primary); }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.exam-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.exam-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,0.7);
  font-size: 13px;
}
.exam-item-icon { font-size: 18px; display:inline-flex; align-items:center; gap:2px; }

/* 胃がん検診アイコン用テキストバッジ */
.exam-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-family: 'Noto Sans JP', sans-serif;
  vertical-align: middle;
}
.stomach-icon {
  background: #e67e22;
  color: #fff;
  border: 1.5px solid #d35400;
}
.lung-icon {
  background: #2980b9;
  color: #fff;
  border: 1.5px solid #1a6fa6;
}
/* 受診状況エリアのアイコンサイズ調整 */
.exam-status-icon { font-size: 22px; display:inline-flex; align-items:center; gap:3px; }

/* === ログインカード === */
.login-card {
  max-width: 420px; margin: 0 auto;
}

/* === キャンセル処理中オーバーレイ === */
#cancel-processing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}
#cancel-processing-overlay.show { display: flex; }
#cancel-processing-overlay .processing-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
#cancel-processing-overlay .processing-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 12px;
}

/* === 日程変更モーダル === */
#change-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 12px;
}
.change-slot-item {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 14px;
}
.change-slot-item:hover    { border-color: var(--primary); background: #eaf4fb; }
.change-slot-item.selected { border-color: var(--primary); background: #d4eaf7; }
.change-slot-item.full     { opacity: 0.45; cursor: not-allowed; }
.change-slot-time { font-weight: 700; color: var(--primary); font-size: 15px; }
.change-slot-meta { font-size: 12px; color: var(--text-mid); margin-top: 2px; }

/* === 日程変更処理中オーバーレイ === */
#change-processing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}
#change-processing-overlay.show { display: flex; }
#change-processing-overlay .processing-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* === スマホ最適化 (≤600px) === */
@media (max-width: 600px) {
  /* ウェルカムバー */
  .welcome-bar    { padding: 14px; gap: 10px; margin-bottom: 14px; }
  .welcome-avatar { width: 42px; height: 42px; font-size: 20px; }
  .welcome-name   { font-size: 15px; }
  .welcome-sub    { font-size: 11px; }

  /* マイページメニュー */
  .mypage-menu        { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  .mypage-menu-item   { padding: 14px 8px; gap: 6px; }
  .mypage-menu-icon   { font-size: 28px; }
  .mypage-menu-label  { font-size: 12px; }
  .mypage-menu-desc   { font-size: 10px; display: block; } /* スマホでも説明文を表示 */

  /* 予約カード */
  .reservation-card { padding: 12px 10px; }
  .res-type { font-size: 14px; }
  .res-time { font-size: 15px; }
  .res-date { font-size: 12px; }

  /* ボタン */
  .btn-sm          { padding: 8px 14px; font-size: 13px; } /* タッチターゲット拡大 */
  .btn-danger.btn-sm { min-height: 36px; }

  /* モーダル */
  .modal-box   { padding: 18px 14px; }
  .modal-title { font-size: 15px; }

  /* 受診状況 */
  .exam-status-row    { padding: 10px 12px; }
  .exam-status-name   { font-size: 13px; }
  .exam-status-detail { font-size: 11px; }

  /* 登録カード */
  .login-card { max-width: 100%; }
}

/* === スマホ最適化 (≤380px) === */
@media (max-width: 380px) {
  .mypage-menu        { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mypage-menu-item   { padding: 12px 4px; }
  .mypage-menu-icon   { font-size: 24px; }
  .mypage-menu-label  { font-size: 11px; }
}
