/* --- Enhanced Scheduling & Messaging UI --- */
.pairing-info-card {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2em 2.5em;
	background: #f8f8f8;
	border-radius: 8px;
	padding: 0.7em 1.2em;
	margin-bottom: 1.2em;
	font-size: 1.05em;
}
.scheduled-time-card {
	background: #f3f7fa;
	border-left: 5px solid #b58863;
	border-radius: 6px;
	padding: 0.7em 1.2em;
	margin-bottom: 1.2em;
	font-size: 1.1em;
	display: flex;
	align-items: center;
	gap: 1em;
}
.scheduled-time-card.active {
	background: #e6ffe6;
	border-left-color: #4caf50;
}
.scheduled-badge {
	background: #4caf50;
	color: #fff;
	font-size: 0.95em;
	border-radius: 4px;
	padding: 0.2em 0.7em;
	margin-left: 0.5em;
	letter-spacing: 1px;
}
.proposal-cards {
	display: flex;
	flex-direction: column;
	gap: 0.7em;
}
.proposal-card {
	background: #f7f7fa;
	border-radius: 6px;
	border: 1.5px solid #e0e0e0;
	padding: 0.7em 1.2em;
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	position: relative;
}
.proposal-card.scheduled {
	border-color: #4caf50;
	background: #e6ffe6;
}
.proposal-header {
	display: flex;
	align-items: center;
	gap: 1.2em;
	font-size: 1.05em;
}
.proposal-by {
	font-weight: bold;
	color: #333;
}
.proposal-time {
	color: #555;
}
.proposal-status {
	font-size: 0.95em;
	border-radius: 4px;
	padding: 0.2em 0.7em;
	margin-left: 0.5em;
	letter-spacing: 1px;
	background: #eee;
	color: #555;
}
.proposal-status.scheduled {
	background: #4caf50;
	color: #fff;
}
.proposal-status.proposed {
	background: #ffe9b3;
	color: #b58863;
}
.chat-style {
	background: #f8f8f8;
	border-radius: 8px;
	padding: 1em 1.2em;
	margin-bottom: 1.2em;
	max-height: 320px;
	overflow-y: auto;
}
.message-item {
	margin-bottom: 0.7em;
	display: flex;
}
.message-item.me .msg-bubble {
	background: #e6ffe6;
	align-self: flex-end;
	margin-left: auto;
}
.message-item.them .msg-bubble {
	background: #f3f7fa;
	align-self: flex-start;
	margin-right: auto;
}
.msg-bubble {
	border-radius: 8px;
	padding: 0.5em 1em;
	box-shadow: 0 1px 4px rgba(0,0,0,0.04);
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	min-width: 120px;
	max-width: 90vw;
}
.msg-author {
	font-weight: bold;
	color: #333;
	font-size: 0.98em;
}
.msg-text {
	color: #222;
	font-size: 1.05em;
	margin: 0.1em 0 0.2em 0;
}
.msg-time {
	color: #888;
	font-size: 0.85em;
	align-self: flex-end;
}
/* Responsive design for mobile and desktop */
@media (max-width: 700px) {
	body, .tournament-card, .pairing-schedule-card {
		padding: 0.5rem !important;
		font-size: 1em;
	}
	.tournament-card, .pairing-schedule-card {
		border-radius: 0;
		box-shadow: none;
		margin: 0;
	}
	.pairings-table, .proposals-table {
		font-size: 0.95em;
		display: block;
		overflow-x: auto;
		width: 100%;
	}
	.pairings-table thead, .proposals-table thead {
		display: none;
	}
	.pairings-table tr, .proposals-table tr {
		display: block;
		margin-bottom: 0.7em;
		border-bottom: 1px solid #ddd;
	}
	.pairings-table td, .proposals-table td {
		display: flex;
		justify-content: space-between;
		padding: 0.4em 0.5em;
		border: none;
		border-bottom: 1px solid #eee;
	}
	.pairings-table td:before, .proposals-table td:before {
		content: attr(data-label);
		font-weight: bold;
		color: #888;
		margin-right: 0.5em;
		min-width: 90px;
		display: inline-block;
	}
	.btn-chess {
		width: 100%;
		margin: 0.3em 0;
		font-size: 1em;
		padding: 0.7em 0;
	}
	#players-list {
		max-height: 200px;
		font-size: 1em;
	}
}
/* Make proposals table use all available width in pairing-schedule card */
.pairing-schedule-card .proposals-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}
.pairing-schedule-card .proposals-table th,
.pairing-schedule-card .proposals-table td {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	text-align: left;
}
.pairing-schedule-card .proposals-table th {
	background: #f5f5f5;
}
/* Make pairings table use all available width in tournament-card */
.tournament-card .pairings-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}
.tournament-card .pairings-table th,
.tournament-card .pairings-table td {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	text-align: left;
}
.tournament-card .pairings-table th {
	background: #f5f5f5;
}
/* Chess Tournament Form Styles */
.chess-form {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem 2rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.form-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.chess-input, .chess-form select {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #b58863;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	background: #f7f7f7;
	margin-top: 0.25rem;
	box-sizing: border-box;
	transition: border 0.2s;
}
.chess-input:focus, .chess-form select:focus {
	outline: none;
	border-color: #222;
}
.chess-header nav a {
	color: #fff;
	text-decoration: none;
	margin: 0 1.2rem;
	font-weight: 500;
	transition: color 0.2s;
}
.chess-header nav a:hover {
	color: #b58863;
}
@import 'base.css';
@import 'layout.css';
@import 'components.css';


body {
	background: #f7f7f7;
	font-family: 'Segoe UI', Arial, sans-serif;
	color: #222;
	margin: 0;
	min-height: 100vh;
}

.chess-header {
	background: #222;
	color: #fff;
	padding: 1.2rem 0;
	text-align: center;
	font-size: 2rem;
	letter-spacing: 0.05em;
	font-family: 'Segoe UI', Arial, sans-serif;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.chess-board {
	display: grid;
	grid-template-columns: repeat(8, 40px);
	grid-template-rows: repeat(8, 40px);
	gap: 2px;
	margin: 2rem auto;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
	border-radius: 8px;
	width: 340px;
}
.chess-square {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}
.chess-square.light {
	background: #f0d9b5;
}
.chess-square.dark {
	background: #b58863;
}

.tournament-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.10);
	padding: 1.2rem 1.5rem;
	margin: 2rem auto 2.5rem auto;
	max-width: 600px;
	border-left: 5px solid #b58863;
}
.tournament-card h1, .tournament-card h2 {
	font-family: 'Segoe UI', Arial, sans-serif;
	color: #222;
	margin-top: 0;
}
.tournament-card ul {
	list-style: none;
	padding: 0;
	margin: 1rem 0 0 0;
}
.tournament-card ul li {
	background: #f0f0f0;
	margin-bottom: 0.7rem;
	padding: 0.7rem 1rem;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.btn-chess {
	background: #b58863;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.5rem 1.2rem;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s;
	font-weight: 500;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-chess:hover {
	background: #222;
}

/* Pairing Schedule Card Styles */
.pairing-schedule-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.07);
	padding: 2rem 2.5rem;
	max-width: 600px;
	margin: 2rem auto;
}
.pairing-schedule-card h2 {
	color: #b58863;
	margin-top: 0;
}
.pairing-schedule-card p {
	margin: 0.5rem 0;
}
.pairing-schedule-card .messages-list {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 1rem;
	margin-bottom: 1.5rem;
	max-height: 200px;
	overflow-y: auto;
}
.pairing-schedule-card .message-item {
	margin-bottom: 0.7rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #eee;
}
.pairing-schedule-card .msg-author {
	font-weight: bold;
	color: #222;
	margin-right: 0.5rem;
}
.pairing-schedule-card .msg-text {
	color: #333;
}
.pairing-schedule-card .msg-time {
	float: right;
	color: #888;
	font-size: 0.9em;
}
.pairing-schedule-card form {
	margin-top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.pairing-schedule-card input[type="text"],
.pairing-schedule-card input[type="datetime-local"] {
	padding: 0.5rem;
	border: 1px solid #b58863;
	border-radius: 4px;
	font-size: 1rem;
	width: 100%;
	box-sizing: border-box;
}
.pairing-schedule-card button {
	background: #b58863;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.6rem 1.2rem;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s;
}
.pairing-schedule-card button:hover {
	background: #222;
}
