/* ファイル名: calendar_common.css */
/* 🌸 共通スタイル：すべてのタブ・UIにまたがって使われる基本部品 */

/* ---------- 入力欄 ---------- */
.calendar-input {
  height: 32px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-family: 'メイリオ', sans-serif;
  box-sizing: border-box;
}

/* ---------- カレンダー日付横アイコン ---------- */
.calendar-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  margin-left: 4px;
}

/* ---------- LS活動アイコンスロット（日付の下） ---------- */
.ls-icon-slot {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -4px;         /* ← 日付＋アイコンとの間の余白 */
  margin-bottom: 4px;      /* ← イベント帯との間の余白 */
  gap: 6px;
  position: relative;
  z-index: 1;
}

/* 🌸 アイコン画像：アスペクト比を保持して%で縮小 */
.ls-icon-slot a {
  display: block;
  width: 40px;
  height: 40px;
  position: relative;
  line-height: 0; /* ← クリック判定がズレるのを防ぐ */
  cursor: pointer;
  z-index: 5;
}

.ls-icon-slot a::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

.ls-icon-slot a img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* ← 見た目だけ担当、クリックは::before */
}

.ls-icon-slot a:hover {
  background-color: rgba(255,255,255,0.2);
  border-radius: 6px;
}

.ls-icon-slot::before {
  content: ' ';
  display: inline-block;
  height: 1px;
  line-height: 24px;
  visibility: hidden;
}

/* ---------- 日付数字（セル左上） ---------- */
.calendar-day-number {
  display: inline-flex;
  align-items: center;
  gap: 0; /* ← ✅ これでアイコン同士の隙間が完全になくなる */
  font-weight: bold;
}

/* ---------- 祝日名の装飾（12 <憲法記念日>） ---------- */
.holiday-name {
  display: inline;
  font-size: 11px;
  margin-left: 4px;
  color: #d33;
  font-weight: bold;
}

/* ---------- ラベル ---------- */
.calendar-label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  font-size: 13px;
  gap: 6px;
  white-space: nowrap;
}

.calendar-label > span {
  min-width: 60px;
  text-align: right;
  white-space: nowrap;
}

/* ---------- ボタン列 ---------- */
.calendar-buttons-inline {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-grow: 1;
}

/* ---------- 各タブ共通のフォーム行 ---------- */
.calendar-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* ---------- 入力補助アイコン ---------- */
.calendar-input-wrapper .calendar-icon {
  position: absolute;
  right: 6px;
  font-size: 16px;
  color: #888;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  line-height: 1;
}

/* ---------- タブの共通最大幅・中央寄せ ---------- */
.calendar-form-tabs,
.calendar-tab-content {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

/* 🌸 アイコン候補リスト（共通UI部品：アイコンタブ・LS活動タブ両対応） */
.calendar-icon-options {
  display: none; /* ← 初期値。JSで block に */
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  min-width: 140px;
  max-height: 150px;
  overflow-y: auto;

  /* ✅ 追加！ */
  display: flex;
  flex-direction: column;

  padding: 4px;
}

.calendar-icon-options div {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  background-color: #fff;
  min-height: 28px;
}

.calendar-icon-options div:hover {
  background-color: #ffeef5;
}

.calendar-icon-options div img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

#wrap_sidebar {
  float: left !important;
  width: 260px;
}
