/*
 * TamilDhool Core — Global Browse by Channel
 *
 * v3.9.1 keeps the global placement/behavior from v3.9 but restores the
 * fuller card appearance of the earlier homepage selector.
 */

.tdh-global-channel-legacy-hidden {
	display: none !important;
}


.tdh-global-channel-navigation {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 16px 16px 18px;
	border-top: 1px solid rgba(43, 47, 54, .08);
	border-bottom: 1px solid rgba(43, 47, 54, .12);
	background: transparent;
}

body.home .tdh-global-channel-navigation {
	margin-bottom: 34px;
}

.tdh-global-channel-inner {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
}

.tdh-global-channel-label {
	margin: 0 0 13px;
	color: #3d3b38;
	font-family: "Libre Baskerville", serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: .025em;
	text-align: center;
	text-transform: uppercase;
}

.tdh-global-channel-items {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
}

.tdh-global-channel-item {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	min-height: 128px;
	padding: 11px 12px 12px;
	border: 1px solid rgba(43, 47, 54, .12);
	border-radius: 7px;
	background: #fff;
	color: #2b2f36;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .035);
	transition:
		transform .16s ease,
		border-color .16s ease,
		box-shadow .16s ease;
}

.tdh-global-channel-item:hover,
.tdh-global-channel-item:focus {
	border-color: rgba(43, 47, 54, .30);
	color: #2b2f36;
	text-decoration: none !important;
	transform: translateY(-2px);
	box-shadow: 0 7px 18px rgba(0, 0, 0, .07);
}

.tdh-global-channel-item.is-current {
	border-color: rgba(43, 47, 54, .50);
	box-shadow:
		inset 0 0 0 1px rgba(43, 47, 54, .18),
		0 3px 10px rgba(0, 0, 0, .05);
}

.tdh-global-channel-media {
	display: flex;
	width: 100%;
	height: 78px;
	align-items: center;
	justify-content: center;
	margin: 0 0 7px;
	padding: 4px 10px;
	border-radius: 5px;
	background: #fff;
}

.tdh-global-channel-logo {
	display: block !important;
	width: 112px !important;
	height: 58px !important;
	max-width: 100% !important;
	max-height: 58px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: contain !important;
}

/* Sony Vizha uses square artwork that visually fills more of the shared box.
 * Optical sizing keeps its perceived footprint aligned with the three
 * landscape channel marks without changing the common card geometry. */
.tdh-global-channel-item--vijay-tv .tdh-global-channel-logo {
	width: 132px !important;
	height: 66px !important;
	max-height: 66px !important;
}

.tdh-global-channel-item--sony-vizha .tdh-global-channel-logo {
	width: 84px !important;
	height: 48px !important;
	max-height: 48px !important;
}

.tdh-global-channel-name {
	display: block;
	margin: 0;
	color: #303438;
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
}

.tdh-global-channel-name::after {
	content: " · Browse Programs";
	color: #7a7e82;
	font-size: 10px;
	font-weight: 500;
}

@media screen and (max-width: 700px) {
	.tdh-global-channel-navigation {
		padding: 12px 8px 13px;
	}

	body.home .tdh-global-channel-navigation {
		margin-bottom: 24px;
	}

	.tdh-global-channel-label {
		margin-bottom: 9px;
		font-size: 13px;
	}

	.tdh-global-channel-items {
		max-width: 420px;
		gap: 7px;
	}

	.tdh-global-channel-item {
		min-height: 88px;
		padding: 7px 5px 8px;
		border-radius: 6px;
	}

	.tdh-global-channel-media {
		height: 58px;
		margin-bottom: 5px;
		padding: 3px;
	}

	.tdh-global-channel-logo {
		width: 82px !important;
		height: 44px !important;
		max-width: 100% !important;
		max-height: 44px !important;
	}

	.tdh-global-channel-item--vijay-tv .tdh-global-channel-logo {
		width: 96px !important;
		height: 50px !important;
		max-height: 50px !important;
	}

	.tdh-global-channel-item--sony-vizha .tdh-global-channel-logo {
		width: 62px !important;
		height: 36px !important;
		max-height: 36px !important;
	}

	.tdh-global-channel-name {
		font-size: 10px;
	}

	.tdh-global-channel-name::after {
		content: "";
	}
}

@media screen and (max-width: 360px) {
	.tdh-global-channel-navigation {
		padding-left: 6px;
		padding-right: 6px;
	}

	.tdh-global-channel-items {
		gap: 5px;
	}

	.tdh-global-channel-item {
		padding-left: 3px;
		padding-right: 3px;
	}

	.tdh-global-channel-media {
		height: 54px;
	}

	.tdh-global-channel-logo {
		width: 74px !important;
		height: 40px !important;
		max-width: 100% !important;
		max-height: 40px !important;
	}

	.tdh-global-channel-item--vijay-tv .tdh-global-channel-logo {
		width: 86px !important;
		height: 46px !important;
		max-height: 46px !important;
	}

	.tdh-global-channel-item--sony-vizha .tdh-global-channel-logo {
		width: 56px !important;
		height: 33px !important;
		max-height: 33px !important;
	}

	.tdh-global-channel-name {
		font-size: 9.5px;
	}
}
