/*
 * TINLAW Topic Cluster - front-end styles.
 * All selectors are prefixed with `tltc-` to avoid collisions with the theme.
 * No Bootstrap or other CSS framework is used.
 */

.tltc-related-wrapper {
	margin: 32px 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tltc-box {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 20px 24px;
	background: #fafafa;
}

.tltc-box--service {
	border-left: 4px solid #184f95;
}

.tltc-box--knowledge {
	border-left: 4px solid #2e7d32;
}

.tltc-title {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.tltc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.tltc-list li {
	margin-left: 0 !important;
}

/* Base item box (currently only used by the core-services card grid —
   kept generic/reusable, but must be declared BEFORE any modifier below
   so the modifiers can actually override it; same-specificity rules
   later in the file always win). */
.tltc-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #fff;
	border-radius: 6px;
	padding: 12px;
	border: 1px solid #ececec;
}

.tltc-item-title {
	font-weight: 600;
	text-decoration: none;
	color: #1a1a1a;
	line-height: 1.4;
}

.tltc-item-title:hover {
	color: #184f95;
	text-decoration: underline;
}

/* "Dịch vụ liên quan" / "Kiến thức liên quan" — title only, one per row,
   dashed underline separators, arrow at the start. Declared AFTER
   .tltc-item above so these overrides actually win. */

.tltc-list--simple {
	grid-template-columns: 1fr;
	gap: 0;
}

.tltc-item--simple {
	display: block;
	background: transparent;
	border: none;
	border-radius: 0;
	border-bottom: 1px dashed #dcdcdc;
	padding: 10px 0;
	padding-left: 0;
}

.tltc-item--simple:last-child {
	border-bottom: none;
}

.tltc-item--simple .tltc-item-title {
	display: block;
}

.tltc-simple-link {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tltc-simple-arrow {
	flex: 0 0 auto;
	color: #9a9a9a;
}

.tltc-simple-link:hover .tltc-simple-arrow {
	color: #184f95;
}

/* Dịch vụ cốt lõi — 2-column card grid with a trailing arrow per card,
   reused both standalone (via shortcode) and inside a tab panel. Also
   declared after .tltc-item so its overrides win. */

.tltc-list--core-services {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.tltc-item--core-service {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	padding-left: 0;
	display: block;
}

.tltc-core-service-link {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 12px 14px;
	text-decoration: none;
	color: #1a1a1a;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tltc-core-service-link:hover {
	border-color: #184f95;
	box-shadow: 0 0 0 1px #184f95;
}

.tltc-core-service-name {
	flex: 1 1 auto;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.tltc-core-service-arrow {
	flex: 0 0 auto;
	color: #9a9a9a;
}

.tltc-core-service-link:hover .tltc-core-service-arrow {
	color: #184f95;
}

/* Unified tab box — "Dịch vụ liên quan" / "Kiến thức liên quan" /
   "Dịch vụ cốt lõi". Pure CSS tabs: hidden radio inputs + label[for] +
   :checked ~ sibling selectors, no JavaScript required. Supports up to 3
   tabs (our max), matched by declaration order via :nth-of-type /
   :nth-child rather than dynamic IDs (which differ per post). */

.tltc-tabbox {
	position: relative;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 16px;
	padding: 20px 24px 24px;
}

.tltc-tab-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
}

.tltc-tab-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid #e2e2e2;
	margin: 0 0 18px;
}

.tltc-tab-label {
	flex: 1 1 0;
	min-width: 120px;
	text-align: center;
	padding: 10px 6px;
	margin-bottom: -1px;
	font-size: 14px;
	font-weight: 600;
	color: #6b6b6b;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	user-select: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.tltc-tab-label:hover {
	color: #184f95;
}

.tltc-tab-panel {
	display: none;
}

.tltc-tab-radio:nth-of-type(1):checked ~ .tltc-tab-bar .tltc-tab-label:nth-child(1),
.tltc-tab-radio:nth-of-type(2):checked ~ .tltc-tab-bar .tltc-tab-label:nth-child(2),
.tltc-tab-radio:nth-of-type(3):checked ~ .tltc-tab-bar .tltc-tab-label:nth-child(3) {
	color: #184f95;
	border-bottom-color: #184f95;
}

.tltc-tab-radio:nth-of-type(1):checked ~ .tltc-tab-panels .tltc-tab-panel:nth-child(1),
.tltc-tab-radio:nth-of-type(2):checked ~ .tltc-tab-panels .tltc-tab-panel:nth-child(2),
.tltc-tab-radio:nth-of-type(3):checked ~ .tltc-tab-panels .tltc-tab-panel:nth-child(3) {
	display: block;
}

@media (max-width: 640px) {
	.tltc-list {
		grid-template-columns: 1fr;
	}

	.tltc-box {
		padding: 16px;
	}

	.tltc-tabbox {
		padding: 16px 16px 20px;
	}

	.tltc-tab-label {
		min-width: 0;
		font-size: 13px;
		padding: 8px 4px;
	}
}

/* Dashboard widget */
.tltc-dashboard-widget {
	display: grid;
	gap: 12px;
}

.tltc-dashboard-cluster {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 10px 14px;
}

.tltc-dashboard-cluster ul {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 12px;
	color: #555;
}

/* Pillar-page header: nav button row + breadcrumb, rendered via
   tltc_pillar_header() in place of the theme's breadcrumb call. */

.tltc-nav-buttons {
	margin: 0 0 12px;
}

.tltc-nav-buttons-scroll {
	display: flex !important;
	flex-flow: row wrap !important;
	gap: 8px !important;
	margin: 0 0 18px !important;
	padding: 10px !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 12px !important;
	background: linear-gradient( 135deg, #fff7f5 0%, #f4faff 100% ) !important;
	box-shadow: 0 5px 18px rgba(30, 48, 70, 0.07);
	list-style: none;
}

.tltc-nav-button {
	flex: 0 0 auto;
	white-space: nowrap;
	display: inline-block;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid #e2e2e2;
	background: #fff;
	color: #184f95;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tltc-nav-button:hover {
	border-color: #184f95;
}

.tltc-nav-button.is-active {
	background: #184f95;
	border-color: #184f95;
	color: #fff;
}

.tltc-breadcrumb {
	margin: 0 0 16px;
	font-size: 13px;
	color: #777;
}

.tltc-breadcrumb-link,
.tltc-breadcrumb-current {
	color: #777;
	text-decoration: none;
}

.tltc-breadcrumb-link:hover,
.tltc-breadcrumb-current:hover {
	color: #184f95;
	text-decoration: underline;
}

.tltc-breadcrumb-sep {
	margin: 0 6px;
	color: #bbb;
}

@media (max-width: 640px) {
	.tltc-nav-buttons-scroll {
		flex-flow: row nowrap !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.tltc-nav-button {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* [tltc_sidebar] widget box. */

.tltc-sidebar-widget {
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.tltc-sidebar-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px;
	background: linear-gradient( 135deg, #d32f2f 0%, #b71c1c 100% );
}

.tltc-sidebar-header-icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	line-height: 1;
}

.tltc-sidebar-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.tltc-sidebar-subtitle {
	margin: 2px 0 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
}

.tltc-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tltc-sidebar-item {
	margin-left: 0 !important;
	margin-bottom: 0 !important;
	border-bottom: 1px solid #eee;
}

.tltc-sidebar-item:last-child {
	border-bottom: none;
}

.tltc-sidebar-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	color: #1a1a1a;
	font-size: 13px;
	font-weight: 400;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tltc-sidebar-link:hover {
	background: #f5f8fc;
	color: #184f95;
}

.tltc-sidebar-link svg {
	flex: 0 0 auto;
	color: #b5b5b5;
	transition: color 0.15s ease, transform 0.15s ease;
}

.tltc-sidebar-link:hover svg {
	color: #184f95;
	transform: translateX(2px);
}

/* Highlight the first row, matching the reference design. */
.tltc-sidebar-item:first-child .tltc-sidebar-link {
	background: #fdecea;
	color: #c0392b;
}

.tltc-sidebar-item:first-child .tltc-sidebar-link:hover {
	background: #fbdedb;
}

.tltc-sidebar-item:first-child .tltc-sidebar-link svg {
	color: #c0392b;
}
