/**
 * Shared directory list styles — Subjects + Institutes + Teachers + Tuition Needed pages
 * Reuses site-chrome.css and tuition-classes.css for the main layout.
 */

.tm-subjects-hero,
.tm-institutes-hero,
.tm-teachers-hero,
.tm-tuition-needed-main-hero,
.tm-tuition-needed-find-hero {
	margin-bottom: 1.35rem;
}

.tm-subjects-filter-grid,
.tm-institutes-filter-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem 1rem;
}

.tm-teachers-filter-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	max-width: 30rem;
	gap: 0.85rem 1rem;
}

.tm-teachers-inline-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
}

.tm-teachers-inline-search input[type="text"] {
	flex: 1 1 18rem;
	min-width: 0;
}

.tm-teachers-inline-search .tm-classes-btn {
	white-space: nowrap;
}

.tm-subjects-page .tm-register-form__field,
.tm-institutes-page .tm-register-form__field,
.tm-teachers-page .tm-register-form__field {
	margin: 0;
}

.tm-subjects-page .tm-register-form__field label,
.tm-institutes-page .tm-register-form__field label,
.tm-teachers-page .tm-register-form__field label {
	margin-bottom: 0.1rem;
}

.tm-subjects-filter-actions,
.tm-institutes-filter-actions,
.tm-teachers-filter-actions {
	display: flex;
	justify-content: center;
	padding-top: 0.9rem;
	margin-top: 0.95rem;
	border-top: 1px solid var(--tm-c-border);
}

.tm-subjects-results-mount,
.tm-institutes-results-mount,
.tm-teachers-results-mount {
	width: 100%;
	overflow-x: auto;
}

.tm-tuition-needed-main-results-mount,
.tm-tuition-needed-find-results-mount {
	width: 100%;
}

.tm-subjects-results-table,
.tm-directory-results-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	background: var(--tm-c-surface);
}

.tm-subjects-results-table th,
.tm-directory-results-table th {
	padding: 0.75rem 0.8rem;
	text-align: left;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tm-c-muted);
	background: var(--tm-c-surface2);
	border-bottom: 1px solid var(--tm-c-border);
}

.tm-subjects-results-table td,
.tm-directory-results-table td {
	padding: 0.85rem 0.8rem;
	vertical-align: top;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--tm-c-text);
	border-bottom: 1px solid var(--tm-c-border);
}

.tm-subjects-results-table tr:last-child td,
.tm-directory-results-table tr:last-child td {
	border-bottom: none;
}

.tm-subjects-results-table .table_ash_bottom_border,
.tm-directory-results-table .table_ash_bottom_border {
	display: none;
}

.tm-subjects-results-table .search_result_cell,
.tm-directory-results-table .search_result_cell {
	color: var(--tm-c-text);
}

.tm-subjects-results-table td:last-child,
.tm-directory-results-table td:last-child {
	width: 1%;
	white-space: nowrap;
}

.tm-subjects-page #results a,
.tm-institutes-page #results a,
.tm-teachers-page #results a {
	color: var(--tm-c-accent);
	font-weight: 700;
	text-decoration: none !important;
}

.tm-subjects-page #results a:hover,
.tm-institutes-page #results a:hover,
.tm-teachers-page #results a:hover {
	text-decoration: underline !important;
}

.tm-subjects-page #results .search_highlighted,
.tm-institutes-page #results .search_highlighted {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.15rem;
	padding: 0.18rem 0.62rem;
	border-radius: 999px;
	border: 1px solid rgba(20, 184, 166, 0.35);
	background: rgba(20, 184, 166, 0.08);
	color: var(--tm-c-accent);
}

.tm-subjects-page #Rowcount_Msg,
.tm-institutes-page #Rowcount_Msg,
.tm-teachers-page #Rowcount_Msg,
.tm-tuition-needed-main-page #Rowcount_Msg,
.tm-tuition-needed-find-page #Rowcount_Msg {
	color: var(--tm-c-muted);
}

.tm-teachers-page #results .more_link {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--tm-c-accent2) !important;
	padding: 0.22rem 0.65rem;
	border-radius: 999px;
	border: 1px solid rgba(249, 115, 22, 0.45);
	background: rgba(249, 115, 22, 0.08);
	transition: background 0.15s ease;
}

.tm-teachers-page #results a:hover .more_link {
	background: rgba(249, 115, 22, 0.15);
}

.tm-tuition-needed-main-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0 0 1.5rem;
}

.tm-tuition-needed-main-action__body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	height: 100%;
}

.tm-tuition-needed-main-action__body p {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--tm-c-muted);
}

.tm-tuition-needed-main-action__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	min-height: 34px;
	padding: 0.35rem 0.95rem;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--tm-c-accent), #0d9488);
	color: #fff !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	box-shadow: 0 8px 24px rgba(20, 184, 166, 0.22);
	transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.tm-tuition-needed-main-action__link--accent {
	background: linear-gradient(135deg, var(--tm-c-accent2), #ea580c);
	box-shadow: 0 8px 24px rgba(249, 115, 22, 0.22);
}

.tm-tuition-needed-main-action__link:hover {
	color: #fff !important;
	background: linear-gradient(135deg, var(--tm-c-accent), #0d9488) !important;
	text-decoration: none !important;
	box-shadow: 0 10px 28px rgba(20, 184, 166, 0.3);
	filter: brightness(1.03);
}

.tm-tuition-needed-main-action__link--accent:hover {
	color: #fff !important;
	background: linear-gradient(135deg, var(--tm-c-accent2), #ea580c) !important;
	box-shadow: 0 10px 28px rgba(249, 115, 22, 0.3);
	filter: brightness(1.03);
}

.tm-tuition-needed-main-action__link:active {
	transform: scale(0.98);
}

.tm-tuition-needed-find-note {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	border: 1px solid rgba(20, 184, 166, 0.22);
	background: rgba(15, 23, 42, 0.92);
	color: #e2e8f0;
	font-size: 0.88rem;
	line-height: 1.45;
}

.tm-tuition-needed-find-note a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0.22rem 0.7rem;
	border-radius: 8px;
	background: rgba(20, 184, 166, 0.16);
	border: 1px solid rgba(45, 212, 191, 0.35);
	color: #fff !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

.tm-tuition-needed-find-note a:hover {
	background: rgba(20, 184, 166, 0.24);
	text-decoration: none !important;
}

.tm-tuition-needed-find-page .tm-tuition-needed-find-select--subject,
.tm-tuition-needed-find-page .tm-tuition-needed-find-select--city {
	width: 96% !important;
}

@media (max-width: 640px) {
	.tm-subjects-filter-grid,
	.tm-institutes-filter-grid,
	.tm-teachers-filter-grid {
		grid-template-columns: 1fr;
	}

	.tm-teachers-inline-search {
		flex-direction: column;
		align-items: stretch;
	}

	.tm-tuition-needed-main-actions {
		grid-template-columns: 1fr;
	}

	.tm-tuition-needed-find-note {
		display: flex;
	}
}
