/* ============================================================
 * efKanban.css — かんばんボードウィジェット for HCL Domino Leap
 * ------------------------------------------------------------
 * 元の style.css をベースに、他アプリ・他ウィジェットとの
 * クラス名衝突を避けるため全クラスに ef-kanban- プレフィックスを付与。
 * 列の高さ・幅は JS がプロパティ値でインライン指定するため、
 * ここでは既定値相当のレイアウトのみ持つ。
 * ============================================================ */

/* ── パレットアイコン ─────────────────────── */
.ef-kanban-widget-icon::before {
  content: url("efKanban.png");
  display: inline-block;
  width: 18px;
  height: 18px;
}

/* ── かんばん全体の横並び ───────────────────── */
.ef-kanban-root {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 8px;
}

/* ── メッセージ表示（読み込み中／エラー／デザインモード） ── */
.ef-kanban-message {
  flex: 1 0 100%;
  box-sizing: border-box;   /* 幅100% にパディングを含める
                               （content-box だと 100%+24px がはみ出して
                               横スクロールバーが出る） */
  padding: 12px;
  font-size: 13px;
  color: #666;
}

/* デザインモード時のみ折り返しを許可
   （案内文が幅100%のため、nowrap だとダミー列が画面外に押し出される）。
   折り返すので横スクロール自体が不要になり、バーも消す */
.ef-kanban-root.ef-kanban-design {
  flex-wrap: wrap;
  overflow-x: hidden;
}

/* ── ステージ列（高さ固定。スクロールは内側の body が担当） ── */
.ef-kanban-column {
  flex: 0 0 260px;          /* 幅・高さは JS がプロパティ値で上書き */
  background: #f5f5f5;
  border-radius: 4px;
  padding: 0;
  border: 1px solid #999;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);

  height: 600px;
  display: flex;
  flex-direction: column;

  overflow: hidden;         /* 列自体はスクロールさせない */
}

/* ── ステージ名（ヘッダー） ─────────────────── */
.ef-kanban-column-header {
  background: #d0e6ff;
  padding: 10px;
  border-radius: 4px 4px 0 0;
  font-weight: bold;
  font-size: 14px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  flex: 0 0 auto;           /* 高さ固定。スクロール領域外なので sticky は不要 */
}

/* ── カード置き場（ここだけがスクロールする） ─────── */
.ef-kanban-body {
  flex: 1 1 auto;
  overflow-y: auto;         /* スクロールバーはヘッダーの下から始まる */
  overflow-x: hidden;
}

/* 件数バッジ */
.ef-kanban-count {
  font-size: 12px;
  font-weight: normal;
  background: #fff;
  border-radius: 10px;
  padding: 1px 8px;
  color: #333;
}

/* ── カード（枠線の色は JS がインラインでセット） ───── */
.ef-kanban-card {
  background: #fff;
  margin: 10px;
  padding: 10px 10px 10px 14px;
  border: 2px solid #4caf50;
  border-radius: 0;
  position: relative;
  cursor: pointer;
}

.ef-kanban-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* カード左側の色帯（色は JS が変数でセット） */
.ef-kanban-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--card-color, #4caf50);
}

.ef-kanban-card-line {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

/* ── 画面幅が 700px 以下になったら 1 列表示にする ───── */
@media (max-width: 700px) {
  .ef-kanban-root {
    flex-direction: column;  /* 横並び → 縦並び */
    overflow-x: hidden;
    gap: 24px;
  }

  .ef-kanban-column {
    width: 100%;
    flex-basis: auto !important;  /* JS の flex-basis 指定を解除して全幅に */
    max-width: none;
  }
}

/* ── レコード編集ダイアログ（iframe オーバーレイ） ───── */
.ef-kanban-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;               /* Leap の画面要素より前面に出す */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ef-kanban-dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 1100px;
  height: 85vh;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 8px;
  box-sizing: border-box;
}

.ef-kanban-dialog-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  z-index: 1;
}

.ef-kanban-dialog-frame {
  width: 100%;
  height: 100%;
  border: 0;
}
