/* GrowthTool/growth.css */

/* メインコンテンツ：表示の詰め込み */
.growth-main {
  flex: 1; /* 左側をぐーんと伸ばす */
  min-width: 0; /* 文字溢れによるレイアウト崩れ防止 */
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ユーザーごとのブロック（画像参照） */
.user-block {
  margin-bottom: 12px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid #444; /* 画像に近い細めの黒線 */
}

.user-name {
  font-weight: bold;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 2px;
}

.tab-name {
  font-weight: bold;
  font-size: 0.85rem;
  display: block;
  margin: 4px 0 0 0; /* タブ名の上の余白 */
  padding-left: 0;
}

.log-line {
  font-size: 0.85rem;
  line-height: 1.4; /* ギチギチすぎたので少しだけ緩めました */
  margin: 2px 0;
  padding-left: 1.5em;
  white-space: normal; /* 画面を広げた分、長いログも折り返して表示 */
  word-break: break-all;
}

/* 判定色 */
.critical {
  color: #2196f3;
}
.special {
  color: #ff9800; /* オレンジ系の色を割り当て */
}
.fumble {
  color: #e91e63;
}
.initial {
  color: #333;
}

#output-text {
  width: 100%;
  height: 150px;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 8px;
  border: 1px solid #ccc;
  white-space: pre; /* 改行とスペースを保持 */
  box-sizing: border-box;
}

/* サイドバー：画像のUI再現 */
.sidebar {
  width: 320px; /* 少し太めにして視認性アップ */
  flex-shrink: 0; /* 画面が狭まっても潰されないように固定 */
  background: #eeeeee;
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 80px; /* ヘッダーに被らない位置で固定 */
  height: fit-content;
}

.tab-selector {
  display: flex;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 15px;
}

.tab {
  flex: 1;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-weight: bold;
}

.tab.active {
  background: #e91e63;
  color: #fff;
}

.tab.disabled {
  background: #fff;
  color: #333;
}

/* トグルスイッチの見た目（マゼンタ） */
.toggle {
  appearance: none;
  width: 34px;
  height: 18px;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}

.toggle:checked {
  background: #e91e63;
}

.toggle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: 0.2s;
}

.toggle:checked::after {
  left: 18px;
}

/* 入力・ボタン系 */
.input-row {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}

.input-row input {
  width: 80px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.text-output textarea {
  width: 100%;
  height: 100px;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 10px;
  box-sizing: border-box;
}

.exclude-section {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px; /* ブロック間の隙間 */
}

.input-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.exclude-section label {
  display: block;
  font-size: 0.8rem;
  font-weight: bold;
  color: #333;
}

.exclude-section input[type="text"] {
  width: 100%; /* 横幅いっぱい */
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.inline-input {
  display: flex;
  gap: 5px;
}

.inline-input input {
  flex: 1; /* 入力欄を伸ばす */
}

.add-btn {
  background-color: #e91e63;
  color: white;
  border: none;
  padding: 0 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

/* 追加されたタブチップのスタイル */
#exclude-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.user-list-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  border: 1px dashed #ccc;
  max-height: 200px;
  overflow-y: auto;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: grab;
  font-size: 0.8rem;
}

.user-item.hidden {
  opacity: 0.5;
  background: #eee;
  text-decoration: line-through;
}

.user-item:active {
  cursor: grabbing;
}

.display-mode-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-btn {
  padding: 5px 15px;
  border: 1px solid #e91e63;
  background: transparent;
  color: #e91e63;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.3s;
}

.mode-btn.active {
  background: #e91e63;
  color: white;
}

/* コンテナをFlexboxにして、中身を横いっぱいに広げる */
.growth-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
}

/* ログが表示されるメインエリアを「残り全部」の幅に伸ばす */
.display-section {
  flex: 1; /* これで左側がぐーんと伸びます */
  min-width: 0;
}

/* 画面幅が狭い時（スマホ・タブレット等）の調整 */
@media (max-width: 900px) {
  /* ログが横にはみ出さないように調整 */
  .log-line {
    white-space: normal; /* 折り返しを許可 */
    word-break: break-all;
    padding-left: 1em;
  }
}
