/**
 * 出馬表専用スタイルシート
 * JRA出馬表の表示に最適化
 */

/* ==========================================================================
   レース情報ヘッダー
   ========================================================================== */

.race-info {
	background-color: #f9f9f9;
	border-left: 5px solid #d4af37;
	padding: 20px;
	margin-bottom: 30px;
	font-size: 18px;
	line-height: 1.6;
}

.race-info strong {
	color: #1a1a1a;
	font-weight: 700;
}

/* ==========================================================================
   出馬表テーブル
   ========================================================================== */

.race-card-table-wrapper {
	overflow-x: auto;
	margin: 30px 0;
	-webkit-overflow-scrolling: touch;
}

.race-card-table {
	width: 100%;
	border-collapse: collapse;
	background-color: #fff;
	font-size: 14px;
	min-width: 800px;
}

.race-card-table thead {
	background-color: #1a1a1a;
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 10;
}

.race-card-table th {
	padding: 12px 8px;
	text-align: center;
	font-weight: 700;
	border: 1px solid #333;
	white-space: nowrap;
}

.race-card-table td {
	padding: 10px 8px;
	border: 1px solid #ddd;
	vertical-align: top;
}

.race-card-table tbody tr:hover {
	background-color: #f5f5f5;
}

/* 枠番列 */
.race-card-table .waku {
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	width: 50px;
}

/* 馬番列 */
.race-card-table .umaban {
	text-align: center;
	font-weight: 600;
	width: 50px;
}

/* 馬名列 */
.race-card-table .horse-info {
	min-width: 200px;
}

.horse-name {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 5px;
	color: #1a1a1a;
}

.horse-details {
	font-size: 13px;
	color: #666;
	line-height: 1.6;
}

.horse-details div {
	margin: 3px 0;
}

/* 過去レース列 */
.race-card-table .past-race {
	min-width: 180px;
	font-size: 12px;
	line-height: 1.5;
}

.past-race-line {
	margin: 2px 0;
	white-space: nowrap;
}

.past-race-line:first-child {
	font-weight: 600;
}

/* ==========================================================================
   枠番カラー（JRA公式準拠）
   ========================================================================== */

.waku-1 {
	background-color: #FFFFFF;
	color: #000;
	border-color: #000 !important;
}

.waku-2 {
	background-color: #000000;
	color: #fff;
}

.waku-3 {
	background-color: #FF0000;
	color: #fff;
}

.waku-4 {
	background-color: #0000FF;
	color: #fff;
}

.waku-5 {
	background-color: #FFFF00;
	color: #000;
}

.waku-6 {
	background-color: #00FF00;
	color: #000;
}

.waku-7 {
	background-color: #FFA500;
	color: #000;
}

.waku-8 {
	background-color: #FFC0CB;
	color: #000;
}

/* ==========================================================================
   レスポンシブ対応（モバイル）
   ========================================================================== */

@media screen and (max-width: 768px) {
	.race-card-table {
		font-size: 13px;
		min-width: 600px;
	}

	.race-card-table th,
	.race-card-table td {
		padding: 8px 5px;
	}

	.horse-name {
		font-size: 14px;
	}

	.horse-details {
		font-size: 12px;
	}

	.race-card-table .past-race {
		min-width: 150px;
		font-size: 11px;
	}

	.race-info {
		font-size: 16px;
		padding: 15px;
	}
}

@media screen and (max-width: 480px) {
	.race-card-table {
		font-size: 12px;
	}

	.horse-name {
		font-size: 13px;
	}

	.race-info {
		font-size: 15px;
		padding: 12px;
	}
}

/* ==========================================================================
   モバイル用カード表示（オプション）
   ========================================================================== */

@media screen and (max-width: 640px) {
	.race-card-mobile {
		display: block;
	}

	.race-card-mobile .horse-card {
		background-color: #fff;
		border: 1px solid #ddd;
		border-radius: 8px;
		margin-bottom: 15px;
		padding: 15px;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	}

	.race-card-mobile .horse-card-header {
		display: flex;
		align-items: center;
		margin-bottom: 12px;
		padding-bottom: 12px;
		border-bottom: 2px solid #f0f0f0;
	}

	.race-card-mobile .waku-badge {
		width: 40px;
		height: 40px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: 700;
		font-size: 16px;
		margin-right: 12px;
		flex-shrink: 0;
	}

	.race-card-mobile .umaban-badge {
		background-color: #1a1a1a;
		color: #fff;
		width: 30px;
		height: 30px;
		border-radius: 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: 700;
		margin-right: 12px;
		flex-shrink: 0;
	}

	.race-card-mobile .horse-name {
		font-size: 16px;
		font-weight: 700;
		color: #1a1a1a;
		flex: 1;
	}

	.race-card-mobile .horse-details {
		font-size: 13px;
		color: #666;
		line-height: 1.7;
		margin-bottom: 12px;
	}

	.race-card-mobile .horse-details > div {
		margin: 5px 0;
	}

	.race-card-mobile .past-races {
		background-color: #f9f9f9;
		padding: 10px;
		border-radius: 4px;
		font-size: 12px;
	}

	.race-card-mobile .past-race-item {
		padding: 8px 0;
		border-bottom: 1px solid #e0e0e0;
	}

	.race-card-mobile .past-race-item:last-child {
		border-bottom: none;
	}

	.race-card-mobile .past-race-title {
		font-weight: 600;
		margin-bottom: 3px;
	}
}

/* ==========================================================================
   印（予想マーク）機能（将来の拡張用）
   ========================================================================== */

.prediction-mark {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	text-align: center;
	line-height: 24px;
	font-weight: 700;
	margin-right: 5px;
	cursor: pointer;
	transition: transform 0.2s;
}

.prediction-mark:hover {
	transform: scale(1.1);
}

.mark-honmei {
	background-color: #FF0000;
	color: #fff;
}

.mark-taikou {
	background-color: #0000FF;
	color: #fff;
}

.mark-tanana {
	background-color: #000000;
	color: #fff;
}

.mark-oshi {
	background-color: #00FF00;
	color: #000;
}

/* ==========================================================================
   ソート機能（将来の拡張用）
   ========================================================================== */

.sortable th {
	cursor: pointer;
	user-select: none;
	position: relative;
}

.sortable th:hover {
	background-color: #333;
}

.sortable th.sorted-asc::after {
	content: ' ▲';
	font-size: 10px;
}

.sortable th.sorted-desc::after {
	content: ' ▼';
	font-size: 10px;
}

/* ==========================================================================
   プリント用スタイル
   ========================================================================== */

@media print {
	.site-header,
	.site-footer,
	.ad-area,
	.widget-area,
	.entry-footer,
	.post-navigation {
		display: none;
	}

	.race-card-table {
		font-size: 10px;
	}

	.race-card-table th,
	.race-card-table td {
		padding: 5px 3px;
	}

	body {
		background-color: #fff;
	}
}
