/*-----------------------------------*/
/*  IWGP Gamelog Set - スコアボード
/*  すべて .wp-block-iwgp-gamelog-set 配下に
/*  スコープしているのでテーマと衝突しない
/*-----------------------------------*/

/* カスタムプロパティ：色は子テーマや別 CSS から
   .wp-block-iwgp-gamelog-set { --iwgp-color-men: #...; } で上書き可能 */
.wp-block-iwgp-gamelog-set {
	--iwgp-color-gender-default:   #2271b1;  /* 性別バッジのデフォルト背景 */
	--iwgp-color-men:              #0942a6;
	--iwgp-color-women:            #de4d76;
	--iwgp-color-mixed:            #ff8c00;
	--iwgp-color-division-kokusai: #b8860b;
	--iwgp-color-won:              #666666;  /* won セルの既定背景 */
}

/* テーマ干渉対策：ブロック内テーブルの基本リセット
   テーマ側 CSS が border-spacing や margin を当ててくる場合の差異を吸収 */
.wp-block-iwgp-gamelog-set table {
	border-collapse: collapse;
	border-spacing: 0;
	margin: 0;
}

/* 垂直レイアウト得点テーブル：テーマの td 装飾(padding/border/background)を打ち消し
   table.{class} td で specificity 0,2,2 → 通常テーマの .entry-content td (0,2,1) に勝つ */
.wp-block-iwgp-gamelog-set table.setmatch-gameover-point-tb td {
	padding: 0;
	border: 0;
	background: transparent;
	vertical-align: middle;
}

.wp-block-iwgp-gamelog-set table.setmatch-gameover-point-tb tr + tr td {
	border-top: 1px solid rgba(255, 255, 255, 1);
}

/* 共通 */
.wp-block-iwgp-gamelog-set table.setmatch-gameover-point-tb,
.wp-block-iwgp-gamelog-set table.scoreset-tb-horizontal {
	width: 100%;
}

/* 未入力ガイドメッセージ（両ブロック共通） */
.wp-block-iwgp-gamelog-set .empty-message,
.wp-block-iwgp-tournament-section .empty-message {
	margin: 0;
	padding: 1em;
	color: #999;
	font-style: italic;
	text-align: center;
	border: 1px dashed #ccc;
	background-color: #fafafa;
}

/*---------------------------------*/
/*  大会一覧（セクション）ブロック
/*---------------------------------*/
.wp-block-iwgp-tournament-section {
	margin: 1em 0;
}

.wp-block-iwgp-tournament-section .section-heading {
	margin: 0 0 0.5em;
	padding: 0.3em 0.6em;
	font-size: 1.1em;
	font-weight: bold;
	border-left: 4px solid #000;
}

.wp-block-iwgp-tournament-section .match-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--ts-cols-pc, 1), 1fr);
	gap: 0.75em 1em;
}

@media (max-width: 1024px) {
	.wp-block-iwgp-tournament-section .match-list {
		grid-template-columns: repeat(var(--ts-cols-tablet, 1), 1fr);
	}
}

@media (max-width: 767px) {
	.wp-block-iwgp-tournament-section .match-list {
		grid-template-columns: repeat(var(--ts-cols-sp, 1), 1fr);
	}
}

/* 件名モード：横並び＋区切り線 */
.wp-block-iwgp-tournament-section .match-list-title .match-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 0.5em 0;
	border-bottom: 1px solid #eee;
}

.wp-block-iwgp-tournament-section .match-list-title .match-link {
	font-weight: bold;
	text-decoration: none;
}

.wp-block-iwgp-tournament-section .match-date {
	flex-shrink: 0;
	margin-left: .8em;
	font-size: 0.85em;
	color: #666;
}

/* スコアボードモード：項目間に余白、リンクスタイルを継承リセット */
.wp-block-iwgp-tournament-section .match-list-scoreboard .match-item {
	margin-bottom: 1em;
}

.wp-block-iwgp-tournament-section .match-list-scoreboard .match-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.wp-block-iwgp-tournament-section .match-list-scoreboard .match-link:hover {
	opacity: 0.85;
}

.wp-block-iwgp-gamelog-set .won {
	color: #ffffff;
	background-color: var(--iwgp-color-won);
}

/* 大会情報（スコアボード本体 .setmatch-gameover と同じ最大幅・中央寄せ） */
.wp-block-iwgp-gamelog-set .tournament-info,
.wp-block-iwgp-gamelog-set .game-info {
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* 試合進行中レイアウト：スコアテーブルが左寄せ（width:auto）なので、大会情報も左寄せに揃える */
.wp-block-iwgp-gamelog-set.is-progress .tournament-info,
.wp-block-iwgp-gamelog-set.is-progress .game-info {
	margin-left: 0;
	margin-right: 0;
}

.wp-block-iwgp-gamelog-set .tournament-info {
	display: flex;
	margin-bottom: 10px;
}

.wp-block-iwgp-gamelog-set .tournament-info div {
	min-width: 6em;
	font-size: .8em;
	padding: 5px;
}

.wp-block-iwgp-gamelog-set .tournament-info .division {
	background-color: #000000;
	text-align: center;
	color: #fff;
	font-weight: bold;
}

.wp-block-iwgp-gamelog-set .tournament-info .gender {
	background-color: var(--iwgp-color-gender-default);
	text-align: center;
	color: #fff;
	font-weight: bold;
}

.wp-block-iwgp-gamelog-set .game-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.wp-block-iwgp-gamelog-set .tournament-name {
	font-size: 1.2em;
	font-weight: bold;
	margin-bottom: 5px;
}

.wp-block-iwgp-gamelog-set .game-info .game-title {
	font-size: 1em;
	font-weight: bold;
}

.wp-block-iwgp-gamelog-set .game-info .game-date {
	font-size: .8em;
}

/*---------------------------------*/
/*  試合終了：垂直レイアウト
/*---------------------------------*/
.wp-block-iwgp-gamelog-set .setmatch-gameover,
.wp-block-iwgp-gamelog-set .scoreset-inprogress {
	margin: 0 auto;
	padding: 20px;
	background-color: #ffffff;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover {
	max-width: 600px;
}

.wp-block-iwgp-gamelog-set .scoreset-inprogress {
	width: 100%;
	max-width: 600px;
	box-sizing: border-box;
}

.wp-block-iwgp-gamelog-set .setmatch-container {
	display: flex;
}

.wp-block-iwgp-gamelog-set .setmatch-container .box {
	flex: 2;
	text-align: center;
	font-weight: bold;
	margin: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	min-height: 50px;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover .box.team,
.wp-block-iwgp-gamelog-set .setmatch-gameover .box.set-cnt {
	flex: 3;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover .box .team-name {
	font-size: 1.2em;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover .box .sub-name {
	font-size: .9em;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover .set-cnt {
	font-size: 4em;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover-point-tb {
	font-size: .9em;
	font-weight: bold;
}

.wp-block-iwgp-gamelog-set .setmatch-gameover-point-tb .circle-number {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 1.3em;
	height: 1.3em;
	background-color: #000;
	color: #fff;
	border-radius: 50%;
	font-weight: bold;
	font-size: .8em;
	line-height: 1;
}

/*---------------------------------*/
/*  試合進行中：水平レイアウト
/*---------------------------------*/
.wp-block-iwgp-gamelog-set table.scoreset-tb-horizontal {
	width: 100%;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal {
	border-collapse: collapse;
	background-color: #fff;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal td,
.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal th {
	width: 2em;
	text-align: center;
	padding: 5px;
	border: 1px solid #777;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal .tb-title th {
	font-size: 0.9em;
	font-weight: bold;
	background-color: #000;
	color: #fff;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal .td-setcnt {
	width: 2.5em;
	font-size: 1.2em;
	font-weight: bold;
	color: #ffffff;
	background-color: #000000;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal .td-set5 {
	max-width: 2em;
	font-size: .9em;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal .team-player-name {
	font-size: 1.2em;
	font-weight: bold;
	white-space: nowrap;
	min-width: 8em;
	padding: 0 10px;
}

.wp-block-iwgp-gamelog-set .scoreset-tb-horizontal .sub-name {
	font-size: .7em;
	font-weight: bold;
}

/*---------------------------------*/
/*  性別区分カラー
/*---------------------------------*/

/* 女子 */
.wp-block-iwgp-gamelog-set .women .won,
.wp-block-iwgp-gamelog-set .gender.women {
	background-color: var(--iwgp-color-women);
}

/* 男子 */
.wp-block-iwgp-gamelog-set .men .won,
.wp-block-iwgp-gamelog-set .gender.men {
	background-color: var(--iwgp-color-men);
}

/* 混合 */
.wp-block-iwgp-gamelog-set .mixed .won,
.wp-block-iwgp-gamelog-set .gender.mixed {
	background-color: var(--iwgp-color-mixed);
	color: #fff;
}

/*---------------------------------*/
/*  年代区分カラー
/*---------------------------------*/

/* 国際大会 */
.wp-block-iwgp-gamelog-set .tournament-info .division.kokusai {
	background-color: var(--iwgp-color-division-kokusai);
}

/*---------------------------------*/
/*  大会一覧：ページネーション
/*---------------------------------*/
.wp-block-iwgp-tournament-section .ts-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1em;
	margin-top: 1em;
	font-size: 0.9em;
}

.wp-block-iwgp-tournament-section .ts-page-link {
	display: inline-block;
	padding: 0.3em 0.8em;
	border: 1px solid #ccc;
	border-radius: 3px;
	text-decoration: none;
	color: inherit;
	background: #f9f9f9;
}

.wp-block-iwgp-tournament-section .ts-page-link:hover {
	background: #eee;
}

.wp-block-iwgp-tournament-section .ts-page-info {
	color: #555;
}
