/* ファイル名: calendar_form.css */
/* 🌸 カレンダーフォーム・入力行共通スタイル */

.calendar-member-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.calendar-label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: bold;
  flex-direction: row; /* ← ここがポイント！ */
}

.calendar-break-label {
  align-items: flex-start;
}

.calendar-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
}

.calendar-input-wrapper input[type="date"] {
  height: 32px;
  width: 112px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-family: 'メイリオ', sans-serif;
  box-sizing: border-box;
  cursor: pointer;
}

.calendar-buttons-inline {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-grow: 1;
  margin-top: auto;
}

.calendar-edit-btn,
.calendar-delete-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  font-family: "Comic Sans MS", cursive;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

.calendar-edit-btn {
  background: linear-gradient(145deg, #ffc1da, #ff9ac2);
  color: white;
}

.calendar-delete-btn {
  background: linear-gradient(145deg, #a4caff, #75aefb);
  color: white;
}

.calendar-input,
.calendar-label select{
  width: 138px;
  max-width: 100%;
  height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}

.calendar-selected-icon {
  width: 88px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
.calendar-custom-icon-select {
  width: auto !important;
  display: inline-flex;
  align-items: center;
}

.calendar-ui-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background-color: #fffafc;
  box-sizing: border-box;
  padding: 8px;
}

.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}
.form-tab {
  font-weight: bold;
  font-size: 14px;
  padding: 6px 16px;
  cursor: pointer;
  font-family: 'メイリオ', sans-serif;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.form-tab[data-tab="icon-tab"] {
  background: #ffe4f0;
  border: 2px solid #ff99cc;
  color: #c2185b;
  border-top-left-radius: 10px;
}
.form-tab[data-tab="icon-tab"].active {
  background: #fff0f5;
}
.form-tab[data-tab="event-tab"] {
  background: #e6f4ff;
  border: 2px solid #99caff;
  color: #1865b2;
  border-top-right-radius: 10px;
}
.form-tab[data-tab="event-tab"].active {
  background: #f0f8ff;
}

.tab-content {
  display: none;
  border: 2px dashed #ff99cc;
  padding: 12px;
  border-radius: 0 0 10px 10px;
  background: #fff0f5;
  margin-bottom: 16px;
}
.tab-content.active {
  display: block;
}

.icon-member-form {
  background: none;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.calendar-ui-wrapper .form-label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

input[type="text"],
input[type="date"],
.custom-icon-select {
  height: 32px !important;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-family: 'メイリオ', sans-serif;
  box-sizing: border-box;
}

.edit-btn, .delete-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  font-family: "Comic Sans MS", cursive;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}
.edit-btn {
  background: linear-gradient(145deg, #ffc1da, #ff9ac2);
  color: white;
}
.delete-btn {
  background: linear-gradient(145deg, #a4caff, #75aefb);
  color: white;
}
.form-buttons-right {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

/* 🌸 ブラウザ標準のカレンダーアイコンを非表示 */
.calendar-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

.calendar-toggle-button {
  background-color: #ffe0f0;
  border: 1px solid #ff99cc;
  border-radius: 8px;
  padding: 6px 12px;
  margin: 8px 0;
  cursor: pointer;
  font-family: "Comic Sans MS", cursive;
  margin-left: -18px; /* 入力フォームを左に寄せる
  margin-right: auto;
}

.calendar-form-section {
  position: relative; /* ← これが必要！ */
  overflow: visible;  /* ← これが重要！見切れ防止 */
  transition: max-height 0.3s ease;
}

.calendar-form-section.is-hidden {
  max-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.calendar-form-section:not(.is-hidden) {
  max-height: 2000px;
  opacity: 1;
  pointer-events: auto;
}

/* 🌸 フォーム本体の上下の余白を軽くする */
.calendar-form-body {
  padding-top: 4px;
  padding-bottom: 6px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.boo-links-inline {
  display: inline-flex;
  gap: 6px;
  margin-left: 12px;
  vertical-align: middle;
}

.boo-btn-inline {
  background: linear-gradient(145deg, #d0f5d5, #baf2c7); /* ミントグリーン系 */
  color: #205e35;
  padding: 6px 14px;                    /* 登録ボタンと同じに揃える */
  font-size: 13px;                      /* 同じ */
  font-weight: bold;
  font-family: "Comic Sans MS", cursive; /* 同じフォント */
  border: none;
  border-radius: 20px;                  /* 同じ */
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: 0.2s ease;
  line-height: 1.2;
}

.boo-btn-inline:hover {
  background: #c0f2c8;
  transform: translateY(-1px);
}
