/* -----------------------------------------------
 * Podium: Mechanical Layout (Right-Top Check, Bottom Flag)
 * --------------------------------------------- */
/* 1. カード本体（Gridアイテム） */
.vel-row-item {
  display: flex;
  flex-direction: column; /* 縦並びにして、旗を下へ押しやりやすくする */
  justify-content: center;
  position: relative;
  padding: 8px 10px;
  cursor: pointer;
  overflow: visible; /* 【重要】名前を飛び出させるためにvisibleに変更 */
  height: 100%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
  /* 枠線は好みで追加してください */
  /* border: 1px solid rgba(255,255,255,0.1); */
}

/* 2. 背景の旗（グリッドの下に合わせる） */
.vel-row-item::before {
  content: "";
  position: absolute;
  
  /* 上下はいっぱいに広げる */
  top: 0;
  bottom: 0;
  
  /* 右端に寄せる */
  right: 0;
  
  /* 【ここがポイント】幅を半分にする */
  width: 50%; 
  /* もっと狭くしたいなら 40% や 80px など指定可能 */
  
  /* 旗の画像設定 */
  background-image: var(--flag-url);
  background-size: cover;    /* 指定エリア内で最大化 */
  background-position: center; /* または right center */
  
  /* 透かし具合 */
  opacity: 0.2; /* 少し濃くしても左の文字には被りません */
  
  z-index: 0; /* 最背面（文字の後ろ） */
  pointer-events: none;
  
  /* カードの角丸に合わせる（右側だけ） */
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  
  /* (オプション) 左側の境界をボカす高等テクニック */
  /* これを入れると、旗がスッと消えるように馴染みます */
  -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
  mask-image: linear-gradient(to right, transparent, black 40%);
}

/* 3. 情報エリア */
.vel-player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  width: 100%;
  padding-right: 24px; /* 右上のチェックボックスと被らないように余白確保 */
}

/* 名前の表示設定 */
.name-area { display: block; width: 100%; text-align: left !important; }
.meta-area { display: block; width: 100%; text-align: left !important; margin-top: 4px;}

.pl-first { 
  display: block; font-size: 0.8rem; color: #94a3b8; 
  line-height: 1.1;
}

/* 姓（Last Name）: ホバーではみ出し表示 */
.pl-last { 
  display: block; 
  font-weight: 800; 
  font-size: 0.9rem; 
  color: #fff; 
  line-height: 1.2;
  
  /* 通常時は省略 */
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  
  position: relative; /* アニメーション基準 */
  border-radius: 2px;
  transition: all 0.1s ease-out;
}

/* マウスホバー時の挙動 */
.vel-row-item:hover .pl-last {
  width: max-content;       /* 文字数に合わせて広がる */
  background: #0f172a;      /* 背景色（カード色に合わせて調整） */
  padding: 0 4px;           /* 読みやすく */
  margin-left: -4px;        /* 位置補正 */
  z-index: 100;             /* 最前面へ */
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5); /* 浮き上がり効果 */
}

/* -----------------------------------------------
 * Fix: Meta Info in One Line
 * --------------------------------------------- */
 .pl-seed {
  font-family:rubikDoo, monospace;
  color:aqua;
 }
.pl-meta { 
  display: block; 
  font-size: 0.6rem;    /* サイズは今のままでOK（あるいは 0.65rem に下げる） */
  color: #a0aec0;       /* 少し明るめのグレーで見やすく */
  margin-top: 2px;      /* 名前との距離 */
  
  /* 【ここが修正ポイント】 */
  width: 100%;          /* 幅いっぱい使う */
  white-space: nowrap;  /* 【絶対】に折り返さない */
  overflow: hidden;     /* はみ出たら隠す */
  text-overflow: ellipsis; /* ...にする（万が一の場合） */
  
  /* 少し文字間を詰めて、情報を入れ込む */
  letter-spacing: -0.02em; 
}

/* 4. チェックボックス（四角・右上端） */
.vel-check-box {
  /* 定位置配置 */
  position: absolute;
  top: 0;        /* 上端 */
  right: 0;      /* 右端 */
  
  width: 24px;   /* クリックしやすいサイズ */
  height: 24px;
  
  border: 1px solid rgba(255,255,255,0.2);
  border-left: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  
  /* 角丸設定：左下だけ丸くすると「タブ」っぽくなる */
  border-radius: 0 4px 0 4px; 
  /* または完全な四角なら border-radius: 0 4px 0 0; */

  display: flex;
  align-items: center;
  justify-content: center;
  
  background: rgba(0,0,0,0.3);
  z-index: 10;
  margin: 0; /* マージンリセット */
}

/* チェックマーク */
.vel-check-box i {
  font-size: 0.8rem; 
  color: var(--hexlb-brand-primary); 
  opacity: 0; 
  transform: scale(0.5); 
  transition: all 0.2s;
}

/* チェックされた状態 */
.vel-hidden-check:checked + .vel-check-box {
  background:transparent; 
  border-color: #00ffcc;
  /* box-shadow: -2px 2px 5px rgba(0, 255, 204, 0.3); */
}

.vel-hidden-check:checked + .vel-check-box i { 
  opacity: 1; 
  transform: scale(1); 
}

.vel-hidden-check { display: none; }

#vel-notice {
  display: inline-block;
  min-width: 250px; /* 予想される最大文字数分の幅を確保 */
  color: #ff4444;
  margin-left: 15px;
  font-weight: bold;
  vertical-align: middle;
}

/* -----------------------------------------------
 * Result Indication Styles
 * --------------------------------------------- */

/* 脱落 (グレーアウト) */
.st-9 {
  opacity: 0.4;
  filter: grayscale(100%);
}

/* 勝ち残りステージのボーダー */
.st-8 { border: 2px dotted var(--hexlb-4th-badge); } /* QF */
.st-4 { border: 2px dotted var(--hexlb-5th-badge); } /* SF */
.st-3 { border: 2px dotted var(--hexlb-bronze-badge); } /* 3 */
.st-2 { border: 2px dotted var(--hexlb-silver-badge);} /* F */
.st-1 { border: 2px dotted var(--hexlb-gold-badge); } /* Winner */

.jac-8, .jac-4, .jac-3, .jac-2, .jac-1 {
  opacity:0.85;
}
.jac-8 { color: var(--hexlb-4th-badge); } /* QF */
.jac-4 { color: var(--hexlb-5th-badge); } /* SF */
.jac-3 { color: var(--hexlb-bronze-badge); } /* 3 */
.jac-2 { color: var(--hexlb-silver-badge);} /* F */
.jac-1 { color: var(--hexlb-gold-badge); } /* Winner */

/* あたりマーク (サムズアップ) */
.vel-row-item { position: relative; }
.correct-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  color: #ffc107;
  font-size: 1.1rem;
  z-index: 10;
}
/*-------------------------------------------------*/
/*	 H2H Forecasting page                          */
/*-------------------------------------------------*/
.flag-size {
  width:35px;height:auto;
}

.flag-size-wb {
  width:100px;height:auto;
}

.vs {
  font-family:lib3;
  font-size:1.6rem;
  color:var(--hexlb-notice);
  text-align: center;
  vertical-align: middle;
}
@media (max-width: 768px) { 
  .vs {
  font-size:1.1rem;
  color:var(--hexlb-notice);
  }
}

/*-------------------------------------------------*/
/*	 Forecasting Table		      			             */
/*-------------------------------------------------*/
.fc-table img { max-width:35px;}
.fc-table td {
  padding:0.25em;
  /*width:50%;*/
}

#dispFCMsg {
  padding:8px;
  color:var(--hexlb-text-dark);
}

/*-------------------------------------------------*/
/*	 Finals Table		      			             */
/*-------------------------------------------------*/
.table-fins,
.h2h-table th {
  padding:4px;
  text-align:left;
  vertical-align:middle;
  font-weight:600;
}

.table-fins,
.h2h-table td {
  padding:4px;
  vertical-align:middle;
  border-bottom:2px dotted rgba(205,205,205,0.2);
}


/*-------------------------------------------------*/
/*	 Finals Switch                                 */
/*-------------------------------------------------*/
.form-switch .form-check-input {
  height: 18px;
  width: 50px;
  background-color:var(--hexlb-brand);
  border:none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(245,245,245,1.0)'/></svg>");
  /*,linear-gradient(to right,var(--hexlb-nonchecked),var(--hexlb-checked));*/
}

.form-switch .form-check-input:focus {
  border-color: rgba(0, 0, 0, 0.25);
  border:none;
  outline: 0;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.form-switch .form-check-input:checked {
  background-color: var(--hexlb-text);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(0,187,187)'/></svg>");
  border:none;
}

@media (max-width: 768px) {   
  .form-switch .form-check-input {
    height: 16px;
    width: 45px;
  }
  .fc-table img {
    max-width:28px;
    z-index:999;
  }
}
