/* =========================================================
   DANH SÁCH NHẠC SĨ / TAXONOMY DIRECTORY
========================================================= */

.stp-profile-directory {
	width: 100%;
	max-width: 100%;
	color: #17324d;
	box-sizing: border-box;
}

/* Wrapper full width trong phạm vi container của Flatsome */
.stp-profile-directory--full-width {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* =========================================================
   PANEL LỌC TAXONOMY
========================================================= */

.taxonomy-filter-panel {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 0 32px;
	padding: 24px;
	box-sizing: border-box;

	background: #f8f8f8;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	overflow: hidden;
}

.stp-profile-directory .taxonomy-filter-panel,
.stp-profile-directory--full-width .taxonomy-filter-panel {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	box-sizing: border-box;
}

.taxonomy-filter-panel__header {
	margin: 0 0 20px;
}

.taxonomy-filter-panel__title {
	margin: 0 !important;
	color: var(--primary-color, #b8860b);
	font-size: 24px !important;
	line-height: 1.3;
}

.taxonomy-filter-panel__search {
	display: flex;
	width: 100%;
	gap: 8px;
	margin: 0 0 20px;
}

.taxonomy-filter-panel__search input {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 42px;
	padding: 8px 12px;
	box-sizing: border-box;

	color: #333;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.taxonomy-filter-panel__search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 110px;
	min-height: 42px;
	padding: 8px 18px;

	box-sizing: border-box;

	color: #fff;
	background: var(--primary-color, #b8860b);
	border: 0;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
}

.taxonomy-filter-panel__search button:hover {
	background: #8f6508;
}

.taxonomy-filter-panel__letters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
}

.taxonomy-filter-panel__letters a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	min-height: 34px;
	padding: 4px 10px;
	box-sizing: border-box;

	color: #333;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1;
	text-decoration: none;
}

.taxonomy-filter-panel__letters a:hover,
.taxonomy-filter-panel__letters a.is-active {
	color: #fff;
	background: var(--primary-color, #b8860b);
	border-color: var(--primary-color, #b8860b);
}

/* =========================================================
   GRID CHÍNH
========================================================= */

.stp-profile-directory-grid {
	display: grid !important;
	grid-template-columns: repeat(
		var(--stp-columns, 4),
		minmax(0, 1fr)
	);
	align-items: stretch;
	gap: 12px 14px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Khung từng nhạc sĩ */
.stp-profile-directory-item {
	display: block !important;
	align-self: stretch;
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
}

/* =========================================================
   LINK BAO QUANH CARD
========================================================= */

.stp-profile-directory-link {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 82px;
	height: 100%;
	gap: 12px;
	padding: 11px 12px;

	color: #17324d !important;
	background: #ffffff !important;

	border: 1px solid #e5d9cf !important;
	border-radius: 8px !important;

	outline: none !important;
	text-decoration: none !important;

	box-shadow: 0 1px 3px rgba(23, 50, 77, 0.04);

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.stp-profile-directory-link:hover,
.stp-profile-directory-link:focus {
	color: #17324d !important;
	background: #fffaf6 !important;
	border-color: #c9aa92 !important;
	outline: none !important;
	text-decoration: none !important;
	box-shadow: 0 5px 14px rgba(23, 50, 77, 0.1);
	transform: translateY(-1px);
}

/* =========================================================
   VÙNG ẢNH
========================================================= */

.stp-profile-directory-image-wrap {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-top: 1px;
	box-sizing: border-box;
}

/* Ảnh thật */
.stp-profile-directory-image-wrap img,
.stp-profile-directory-image {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border: 1px solid #ded4cc;
	border-radius: 50%;
	object-fit: cover;
	overflow: hidden;
}

/* Khi không có ảnh */
.stp-profile-directory-image--empty {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;

	color: #ffffff;
	background: #17324d;
	border-color: #17324d;

	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.stp-profile-directory-link:hover
.stp-profile-directory-image--empty {
	color: #ffffff;
	background: #a4775a;
	border-color: #a4775a;
}

/* =========================================================
   NỘI DUNG BÊN PHẢI ẢNH
========================================================= */

.stp-profile-directory-content {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

/* Tên nhạc sĩ */
.stp-profile-directory-title {
	display: block;
	overflow: hidden;
	width: 100%;
	margin: 0 0 5px !important;

	color: #17324d !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;

	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.stp-profile-directory-link:hover
.stp-profile-directory-title {
	color: #a4775a !important;
}

/* Số lượng bài hát */
.stp-profile-directory-count {
	display: block;
	overflow: hidden;
	width: 100%;
	margin: 0;

	color: #8c8178 !important;
	font-size: 10px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;

	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Vai trò / mô tả */
.stp-profile-directory-role {
	display: -webkit-box;
	overflow: hidden;
	width: 100%;
	margin-top: 4px;

	color: #8b8178 !important;
	font-size: 10px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;
	text-overflow: ellipsis;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* Nút xem chi tiết */
.stp-profile-directory-button {
	display: inline-block;
	margin-top: 5px;

	color: #a4775a !important;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.4;
}

.stp-profile-directory-link:hover
.stp-profile-directory-button {
	color: #594638 !important;
}

/* Không có dữ liệu */
.stp-profile-directory-empty {
	margin: 0;
	padding: 20px 0;
	color: #667381;
	font-size: 14px;
}

/* =========================================================
   PHÂN TRANG DIRECTORY
========================================================= */

.kbh-archive-pagination,
.stp-profile-directory-pagination {
	margin: 28px 0 10px;
	text-align: center !important;
}

.kbh-archive-pagination ul,
.stp-profile-directory-pagination ul {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center;
	justify-content: center !important;
	gap: 7px !important;

	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.kbh-archive-pagination li,
.stp-profile-directory-pagination li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.kbh-archive-pagination a,
.kbh-archive-pagination span,
.stp-profile-directory-pagination a,
.stp-profile-directory-pagination span {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;

	min-width: 36px !important;
	height: 36px !important;
	padding: 5px 10px !important;

	color: #594638 !important;
	background: #ffffff !important;
	border: 1px solid #ded4cc !important;
	border-radius: 4px !important;

	font-size: 13px !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.kbh-archive-pagination a:hover,
.stp-profile-directory-pagination a:hover {
	color: #ffffff !important;
	background: #a4775a !important;
	border-color: #a4775a !important;
}

.kbh-archive-pagination .current,
.stp-profile-directory-pagination .current {
	color: #ffffff !important;
	background: #a4775a !important;
	border-color: #a4775a !important;
	font-weight: 600;
}

.kbh-archive-pagination .prev,
.kbh-archive-pagination .next,
.stp-profile-directory-pagination .prev,
.stp-profile-directory-pagination .next {
	padding-right: 15px !important;
	padding-left: 15px !important;
}

/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 849px) {
	.stp-profile-directory-grid {
		grid-template-columns: repeat(
			var(--stp-columns-md, 2),
			minmax(0, 1fr)
		);
	}
}

/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media (max-width: 549px) {
	.stp-profile-directory-grid {
		grid-template-columns: repeat(
			var(--stp-columns-sm, 1),
			minmax(0, 1fr)
		);
		gap: 9px;
	}

	.stp-profile-directory-link {
		min-height: 70px;
		gap: 9px;
		padding: 9px;
		border-radius: 7px !important;
	}

	.stp-profile-directory-image-wrap {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
	}

	.stp-profile-directory-image--empty {
		font-size: 17px;
	}

	.stp-profile-directory-title {
		margin-bottom: 3px !important;
		font-size: 14px !important;
	}

	.stp-profile-directory-count,
	.stp-profile-directory-role,
	.stp-profile-directory-button {
		font-size: 9px !important;
	}

	.taxonomy-filter-panel {
		margin-bottom: 24px;
		padding: 16px;
	}

	.taxonomy-filter-panel__title {
		font-size: 20px !important;
	}

	.taxonomy-filter-panel__search {
		flex-direction: column;
		width: 100%;
	}

	.taxonomy-filter-panel__search input,
	.taxonomy-filter-panel__search button {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.taxonomy-filter-panel__search button {
		min-width: 0;
	}
}

/* =========================================================
   RESPONSIVE PHÂN TRANG NHỎ
========================================================= */

@media (max-width: 480px) {
	.kbh-archive-pagination ul,
	.stp-profile-directory-pagination ul {
		gap: 5px !important;
	}

	.kbh-archive-pagination a,
	.kbh-archive-pagination span,
	.stp-profile-directory-pagination a,
	.stp-profile-directory-pagination span {
		min-width: 34px !important;
		height: 34px !important;
		padding: 0 9px !important;
		font-size: 13px !important;
	}
}
.stp-profile-directory--full-column {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.stp-profile-directory--full-column .taxonomy-filter-panel {
	width: 100%;
	max-width: none;
	margin: 0 0 32px;
	box-sizing: border-box;
}
/* =========================================================
   CHỈ SỬA KHOẢNG CÁCH PANEL VÀ NÚT TÌM KIẾM
========================================================= */

/* Giảm khoảng cách panel xuống nội dung bên dưới:
   32px -> 16px */
.stp-profile-directory .taxonomy-filter-panel,
.stp-profile-directory--full-width .taxonomy-filter-panel,
.stp-profile-directory--full-column .taxonomy-filter-panel {
	margin-bottom: 16px !important;
}

/* Nút tìm kiếm màu nâu và bo tròn */
.stp-profile-directory .taxonomy-filter-panel__search button,
.stp-profile-directory--full-width .taxonomy-filter-panel__search button,
.stp-profile-directory--full-column .taxonomy-filter-panel__search button {
	color: #ffffff !important;
	background: #a4775a !important;
	border: 1px solid #a4775a !important;
	border-radius: 999px !important;
	box-shadow: none !important;
}

/* Trạng thái hover */
.stp-profile-directory .taxonomy-filter-panel__search button:hover,
.stp-profile-directory .taxonomy-filter-panel__search button:focus,
.stp-profile-directory--full-width .taxonomy-filter-panel__search button:hover,
.stp-profile-directory--full-width .taxonomy-filter-panel__search button:focus,
.stp-profile-directory--full-column .taxonomy-filter-panel__search button:hover,
.stp-profile-directory--full-column .taxonomy-filter-panel__search button:focus {
	color: #ffffff !important;
	background: #594638 !important;
	border-color: #594638 !important;
	border-radius: 999px !important;
}
/* =========================================================
   PANEL TÌM KIẾM - ĐỒNG BỘ GIAO DIỆN
========================================================= */

.stp-profile-directory .taxonomy-filter-panel,
.stp-profile-directory--full-width .taxonomy-filter-panel,
.stp-profile-directory--full-column .taxonomy-filter-panel {
	margin-bottom: 10px !important;
	padding: 24px !important;
	background: var(--kbh-bg) !important;
	border: 1px solid var(--kbh-border) !important;
	border-radius: 8px !important;
	box-shadow: 0 2px 8px rgba(100, 72, 52, 0.06) !important;
}

/* Ô nhập tìm kiếm */
.taxonomy-filter-panel__search input {
	background: var(--kbh-white, #ffffff) !important;
	border: 1px solid var(--kbh-border) !important;
	border-radius: 5px !important;
	color: var(--kbh-text) !important;
	outline: none !important;
}

.taxonomy-filter-panel__search input:focus {
	border-color: var(--kbh-accent) !important;
	box-shadow: 0 0 0 2px rgba(164, 119, 90, 0.12) !important;
}

/* Hàng tìm kiếm */
.taxonomy-filter-panel__search {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	margin-bottom: 20px !important;
}

/* Nút tròn kính lúp */
.taxonomy-filter-panel__search-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 42px !important;
	width: 42px !important;
	min-width: 42px !important;
	height: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;

	color: #ffffff !important;
	background: var(--kbh-accent, #a4775a) !important;
	border: 1px solid var(--kbh-accent, #a4775a) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer !important;
}

.taxonomy-filter-panel__search-button svg {
	display: block !important;
	width: 19px !important;
	height: 19px !important;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2 !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
}

.taxonomy-filter-panel__search-button:hover,
.taxonomy-filter-panel__search-button:focus {
	color: #ffffff !important;
	background: var(--kbh-accent-dark, #80624e) !important;
	border-color: var(--kbh-accent-dark, #80624e) !important;
	outline: none !important;
	transform: none !important;
}

/* Các nút chữ cái đồng bộ màu */
.taxonomy-filter-panel__letters a {
	color: var(--kbh-text, #665951) !important;
	background: var(--kbh-white, #ffffff) !important;
	border-color: var(--kbh-border, #eadfd6) !important;
	border-radius: 5px !important;
}

.taxonomy-filter-panel__letters a:hover,
.taxonomy-filter-panel__letters a.is-active {
	color: #ffffff !important;
	background: var(--kbh-accent, #a4775a) !important;
	border-color: var(--kbh-accent, #a4775a) !important;
}

/* Mobile: vẫn giữ ô nhập và nút trên cùng một hàng */
@media (max-width: 549px) {
	.stp-profile-directory .taxonomy-filter-panel,
	.stp-profile-directory--full-width .taxonomy-filter-panel,
	.stp-profile-directory--full-column .taxonomy-filter-panel {
		margin-bottom: 10px !important;
		padding: 16px !important;
	}

	.taxonomy-filter-panel__search {
		flex-direction: row !important;
		align-items: center !important;
	}

	.taxonomy-filter-panel__search input {
		width: auto !important;
		flex: 1 1 auto !important;
	}

	.taxonomy-filter-panel__search-button {
		flex: 0 0 40px !important;
		width: 40px !important;
		min-width: 40px !important;
		height: 40px !important;
		min-height: 40px !important;
	}
}
/* =========================================================
   PANEL: NỐT NHẠC - TIÊU ĐỀ - TÌM KIẾM - BUTTON
========================================================= */

.taxonomy-filter-panel {
	display: grid !important;
	grid-template-columns: max-content minmax(0, 1fr) !important;
	align-items: center !important;
	column-gap: 24px !important;
	row-gap: 14px !important;

	margin: 0 0 10px !important;
	padding: 18px 20px !important;

	background: #fffaf6 !important;
	border: 1px solid #e5d9cf !important;
	border-radius: 10px !important;
	box-shadow: none !important;
}

/* Khối nốt nhạc + tiêu đề */
.taxonomy-filter-panel__header {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	margin: 0 !important;
}

/* Nốt nhạc nằm trong hình tròn */
.taxonomy-filter-panel__music-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 44px !important;
	width: 44px !important;
	height: 44px !important;

	color: #ffffff !important;
	background: #a4775a !important;
	border: 1px solid #a4775a !important;
	border-radius: 50% !important;

	font-size: 25px !important;
	line-height: 1 !important;
}

/* Tiêu đề và bộ đếm */
.taxonomy-filter-panel__heading {
	min-width: 150px !important;
}

.taxonomy-filter-panel__title {
	margin: 0 0 3px !important;
	color: #594638 !important;
	font-size: 21px !important;
	line-height: 1.25 !important;
}

.taxonomy-filter-panel__song-count {
	margin: 0 !important;
	color: #8c8178 !important;
	font-size: 12px !important;
	line-height: 1.4 !important;
}

/* Form tìm kiếm nằm cùng hàng với tiêu đề */
.taxonomy-filter-panel__form {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto !important;
	align-items: center !important;
	gap: 8px !important;
	min-width: 0 !important;
	margin: 0 !important;
}

/* Ô tìm kiếm */
.taxonomy-filter-panel__search {
	display: flex !important;
	align-items: center !important;
	min-width: 0 !important;
	margin: 0 !important;
}

.taxonomy-filter-panel__search input {
	width: 100% !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 8px 13px !important;

	color: #594638 !important;
	background: #ffffff !important;
	border: 1px solid #e5d9cf !important;
	border-radius: 6px !important;
	box-shadow: none !important;
}

.taxonomy-filter-panel__search input:focus {
	border-color: #a4775a !important;
	box-shadow: 0 0 0 2px rgba(164, 119, 90, 0.12) !important;
	outline: none !important;
}

/* Nút tìm kiếm hình tròn */
.taxonomy-filter-panel__search button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 42px !important;
	width: 42px !important;
	min-width: 42px !important;
	height: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;

	color: #ffffff !important;
	background: #a4775a !important;
	border: 1px solid #a4775a !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer !important;
}

.taxonomy-filter-panel__search button svg {
	display: block !important;
	width: 19px !important;
	height: 19px !important;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2 !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
}

.taxonomy-filter-panel__search button:hover,
.taxonomy-filter-panel__search button:focus {
	color: #ffffff !important;
	background: #594638 !important;
	border-color: #594638 !important;
	outline: none !important;
}

/* Các chữ cái nằm ở hàng bên dưới */
.taxonomy-filter-panel__letters {
	grid-column: 1 / -1 !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	width: 100% !important;
	margin: 0 !important;
}

/* Mobile */
@media (max-width: 849px) {
	.taxonomy-filter-panel {
		grid-template-columns: 1fr !important;
		row-gap: 16px !important;
	}

	.taxonomy-filter-panel__form {
		grid-template-columns: minmax(0, 1fr) auto !important;
		width: 100% !important;
	}
}

@media (max-width: 549px) {
	.taxonomy-filter-panel {
		margin-bottom: 10px !important;
		padding: 16px !important;
	}

	.taxonomy-filter-panel__header {
		gap: 10px !important;
	}

	.taxonomy-filter-panel__music-icon {
		flex-basis: 40px !important;
		width: 40px !important;
		height: 40px !important;
		font-size: 22px !important;
	}

	.taxonomy-filter-panel__title {
		font-size: 19px !important;
	}

	.taxonomy-filter-panel__form {
		grid-template-columns: minmax(0, 1fr) auto !important;
		gap: 7px !important;
	}

	.taxonomy-filter-panel__search button {
		flex-basis: 40px !important;
		width: 40px !important;
		min-width: 40px !important;
		height: 40px !important;
		min-height: 40px !important;
	}
}
