/* ========================================
   CI カラー変数デフォルト値（blue プリセット）
   ci-theme.js が fetch 後に上書きする
   ======================================== */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", sans-serif;

  /* プライマリカラー（h2・ロゴのアクセント色に使用） */
  --ci-primary: #1b3b6f;

  /* ヘッダー背景（プライマリ色の極薄tint） */
  --ci-header-bg: #e8ebf1;

  /* ヘッダーテキスト色（CIカラーに合わせる） */
  --ci-header-text: #1b3b6f;

  /* カードパステルパレット（将来プラン用に変数だけ保持） */
  --ci-card-0: #ffe5ec;
  --ci-card-1: #ffd6e8;
  --ci-card-2: #e2f0cb;
  --ci-card-3: #ffefc2;
  --ci-card-4: #cde7ff;
  --ci-card-5: #d4f0f7;
  --ci-card-6: #e8d9ff;
  --ci-card-7: #fff3cd;
}

/* ヘッダー背景にCI色の極薄tintを適用 */
#siteHeader,
#siteHeader .navbar-brand,
#siteHeader h1,
#siteHeader h2 {
  color: var(--ci-header-text) !important;
}

#siteHeader {
  background-color: var(--ci-header-bg) !important;
  color: var(--ci-header-text);
}

/* ヘッダー内ナビゲーションのタブをコンパクトに */
header .nav-link {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

/* ========================================
   ページ背景（教師/管理ポータルと同じ）
   ======================================== */
body {
  background-color: var(--bs-secondary-bg) !important;
}

/* ========================================
   CI アクセント（h2 見出しのみ）
   ======================================== */
h2 {
  color: var(--ci-primary);
}

/* ========================================
   レイアウト
   ======================================== */
#openSettings {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.list {
  display: grid;
  gap: 12px;
}

/* ========================================
   カード（Bootstrap デフォルトに合わせる）
   ======================================== */
.card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 12px;
  color: #5c6370;
}

.badge {
  font-weight: 600;
}

.status {
  font-size: 12px;
  color: #4b5563;
}

/* ========================================
   ToastUI カレンダー 週表示スマホ最適化
   ======================================== */
/* 週表示ヘッダーの曜日/日付をコンパクトに */
.toastui-calendar-day-name-item {
  padding: 4px 0 !important;
}
.toastui-calendar-day-name-item .toastui-calendar-template-weekDayName {
  font-size: 0.85em;
}
/* 週表示の時間軸を細く */
.toastui-calendar-timegrid-time-column {
  width: 44px !important;
  min-width: 44px !important;
  font-size: 0.75em;
}
/* カレンダー全体にシングルタップを適用（iOS 300ms遅延を全要素で無効化） */
/* manipulation = パン・ピンチズームは許可、ダブルタップズームのみ無効 */
#parentCalendar,
#parentCalendar * {
  touch-action: manipulation;
}
#parentCalendar .toastui-calendar-event,
#parentCalendar .toastui-calendar-weekday-event-block {
  cursor: pointer;
}

/* 月ビュー: ドット非表示・イベントをカラーバー表示 */
.toastui-calendar-month-week-item .toastui-calendar-weekday-event-dot {
  display: none !important;
}
.toastui-calendar-month-week-item .toastui-calendar-weekday-event-title {
  display: block;
  width: 100%;
}
