/**
 * Frontend Styles
 *
 * @package Turniere_Manager
 */

/* Tournaments Wrapper */
.tm-tournaments-wrapper {
	margin: 2rem 0;
}

/* Tab Navigation */
.tm-nav-tabs {
	border-bottom: 1px solid #dee2e6;
	margin-bottom: 1.5rem;
}

.tm-nav-tabs .nav-link {
	background: #f8f9fa;
	border: none;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: #333;
	font-weight: 400;
	padding: 0.75rem 1.5rem;
	margin-bottom: -1px;
	transition: all 0.2s ease;
}

.tm-nav-tabs .nav-link:hover {
	border-bottom-color: #333;
	color: #000;
}

.tm-nav-tabs .nav-link.active {
	border-bottom-color: #333;
	color: #000;
	font-weight: 600;
}

.tm-nav-tabs .badge {
	background-color: #f0f0f0;
	color: #333;
	font-size: 0.85em;
	font-weight: 400;
	padding: 0.25em 0.6em;
	border-radius: 10px;
	margin-left: 0.5rem;
}

.tm-nav-tabs .nav-link.active .badge {
	background-color: #333;
	color: #fff;
}

/* Search Field */
.tm-search-wrapper {
	max-width: 400px;
	margin-bottom: 1.5rem;
}

#tm-search {
	padding: 0.5rem 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	font-size: 1rem;
	width: 100%;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#tm-search:focus {
	border-color: #86b7fe;
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table Styling */
.tm-tournaments-table {
	margin-top: 1rem;
	font-size: 0.95rem;
}

.tm-tournaments-table thead {
	background-color: #f8f9fa;
}

.tm-tournaments-table thead th {
	font-weight: 600;
	color: #495057;
	border-bottom: 2px solid #dee2e6;
	padding: 0.75rem;
	vertical-align: middle;
}

.tm-tournaments-table tbody tr {
	transition: background-color 0.15s ease;
}

.tm-tournaments-table tbody tr:hover {
	background-color: rgba(0, 0, 0, 0.025);
}

.tm-tournaments-table tbody td {
	padding: 0.75rem;
	vertical-align: middle;
}

/* PDF Link Buttons */
.tm-tournaments-table .btn {
	white-space: nowrap;
	text-decoration: none;
	transition: all 0.15s ease;
}

.tm-tournaments-table .btn-turniere {
	background: transparent;
	border: 1px solid #333;
	border-radius: 0;
	color: #333;
	font-weight: 400;
	padding: 0.375rem 0.75rem;
}

.tm-tournaments-table .btn-turniere:hover {
	background-color: #333;
	color: #fff;
	text-decoration: none;
}

.tm-tournaments-table .btn-turniere:focus {
	outline: 2px solid #333;
	outline-offset: 2px;
}

/* No Results Message */
#tm-no-results {
	display: none;
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	background-color: #cff4fc;
	border: 1px solid #9eeaf9;
	border-radius: 0.375rem;
	color: #055160;
}

/* Hidden Rows (during search) */
.tm-tournaments-table tbody tr.tm-hidden {
	display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
	/* Tabs responsive */
	.tm-nav-tabs .nav-link {
		padding: 0.5rem 1rem;
		font-size: 0.9rem;
	}

	.tm-nav-tabs .badge {
		font-size: 0.75em;
		padding: 0.2em 0.5em;
	}

	.tm-tournaments-table {
		font-size: 0.85rem;
	}

	.tm-tournaments-table thead th,
	.tm-tournaments-table tbody td {
		padding: 0.5rem;
	}

	.tm-tournaments-table .btn {
		padding: 0.25rem 0.5rem;
		font-size: 0.875rem;
	}

	/* Stack table on very small screens */
	@media (max-width: 576px) {
		.tm-tournaments-table thead {
			display: none;
		}

		.tm-tournaments-table tbody tr {
			display: block;
			margin-bottom: 1rem;
			border: 1px solid #dee2e6;
			border-radius: 0.375rem;
			padding: 0.75rem;
		}

		.tm-tournaments-table tbody td {
			display: block;
			text-align: left !important;
			padding: 0.5rem 0;
			border: none;
		}

		.tm-tournaments-table tbody td:before {
			content: attr(data-label);
			font-weight: 600;
			display: inline-block;
			margin-right: 0.5rem;
		}

		.tm-tournaments-table tbody td strong {
			font-size: 1.1rem;
		}
	}
}

/* Print Styles */
@media print {
	.tm-search-wrapper,
	#tm-no-results {
		display: none !important;
	}

	.tm-tournaments-table .btn {
		border: 1px solid #000 !important;
		color: #000 !important;
		background: none !important;
	}
}
