/**
 * Styles for the "So sánh + Ứng dụng thực tế" 2-column row.
 *
 * Visual language mô phỏng theo .ds-description-section (bo góc 9px,
 * viền #e8eaee, nền #fff, gap 20px).
 *
 * @package ds-themes
 */

/* ─────────────────────────────────────────────────────────
   Row container
───────────────────────────────────────────────────────── */
.ds-extra-sections {
	margin-block: 2rem;
}

.ds-extra-sections__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

/* Khi chỉ có 1 cột — chiếm hết chiều rộng */
.ds-extra-sections--cols-1 .ds-extra-sections__grid {
	grid-template-columns: 1fr;
}

.ds-extra-sections__col {
	min-width: 0;
	padding: 16px;
	background: #fff;
	border: 1px solid #e8eaee;
	border-radius: 9px;
	color: #20242b;
}

.ds-extra-sections__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	margin: 4px 0 14px;
	color: #20242b;
}

.ds-extra-sections__intro {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.55;
	margin-block-end: 14px;
}

.ds-extra-sections__empty {
	color: #888;
	font-style: italic;
	font-size: 0.875rem;
}

/* ─────────────────────────────────────────────────────────
   Cột trái — Bảng so sánh
───────────────────────────────────────────────────────── */
.ds-extra-cmp__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ds-extra-cmp__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	min-width: 280px;
}

.ds-extra-cmp__notice {
	font-size: 0.78rem;
	color: #7a3a00;
	background: #fff7e6;
	border: 1px solid #ffe0a3;
	border-radius: 5px;
	padding: 8px 10px;
	margin: 0 0 10px;
	line-height: 1.5;
}

.ds-extra-cmp__notice strong {
	color: #5a2a00;
}

/* Header cột: ảnh + tên SP so sánh */
.ds-extra-cmp__thead tr {
	border-bottom: 2px solid #e8eaee;
}

.ds-extra-cmp__head {
	padding: 10px 6px;
	font-weight: 600;
	color: #1a1a1a;
	text-align: left;
	vertical-align: bottom;
	background: #fafbfc;
	font-size: 0.78rem;
}

.ds-extra-cmp__head--label,
.ds-extra-cmp__head--current {
	white-space: nowrap;
}

.ds-extra-cmp__head--compare {
	text-align: left;
	min-width: 90px;
}

.ds-extra-cmp__head-thumb {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 5px;
	border: 1px solid #e8eaee;
	margin: 0 0 4px;
}

.ds-extra-cmp__head-name {
	display: block;
	font-size: 0.72rem;
	font-weight: 500;
	color: #444;
	line-height: 1.3;
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Body — chỉ còn tiêu chí & giá trị */
.ds-extra-cmp__table tbody tr {
	border-bottom: 1px solid #eef0f3;
}

.ds-extra-cmp__table tbody tr:last-child {
	border-bottom: none;
}

.ds-extra-cmp__label {
	padding: 9px 6px 9px 0;
	text-align: left;
	font-weight: 500;
	color: #444;
	white-space: nowrap;
	vertical-align: top;
	width: 30%;
}

.ds-extra-cmp__current {
	padding: 9px 6px;
	color: var(--ds-primary, #c80000);
	font-weight: 600;
	white-space: nowrap;
	vertical-align: top;
}

.ds-extra-cmp__cell {
	padding: 9px 6px;
	color: #1a1a1a;
	vertical-align: top;
}

/* ─────────────────────────────────────────────────────────
   Cột trái — Ưu / Nhược điểm
───────────────────────────────────────────────────────── */
.ds-extra-cmp__proscons {
	margin-block-start: 14px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ds-extra-cmp__procon {
	padding: 10px 12px;
	border-radius: 6px;
	background: #fafbfc;
	border: 1px solid #eef0f3;
}

.ds-extra-cmp__procon--pro {
	background: #f0f9f3;
	border-color: #d6ecdf;
}

.ds-extra-cmp__procon--con {
	background: #fdf3f3;
	border-color: #f5d6d6;
}

.ds-extra-cmp__procon-title {
	margin: 0 0 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #1a1a1a;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ds-extra-cmp__procon--pro .ds-extra-cmp__procon-title {
	color: #155724;
}

.ds-extra-cmp__procon--con .ds-extra-cmp__procon-title {
	color: #721c24;
}

.ds-extra-cmp__procon ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ds-extra-cmp__procon ul li {
	padding: 2px 0;
	font-size: 0.8rem;
	color: #333;
	line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────
   Cột phải — Danh sách ứng dụng (list kiểu blog)
   Mỗi item là 1 hàng ngang:
   [thumbnail nhỏ 80×80] [tiêu đề + mô tả ngắn]
───────────────────────────────────────────────────────── */
.ds-extra-app__gallery {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ds-extra-app__cell {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	padding: 10px;
	text-decoration: none;
	color: inherit;
	background: #fafbfc;
	border: 1px solid #eef0f3;
	border-radius: 6px;
	transition: border-color 0.15s, background 0.15s;
}

.ds-extra-app__cell:hover,
.ds-extra-app__cell:focus-visible {
	border-color: #cdd2da;
	background: #fff;
	outline: none;
}

.ds-extra-app__cell:focus-visible {
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.ds-extra-app__figure {
	flex: 0 0 80px;
	width: 80px;
	height: 80px;
	overflow: hidden;
	background: #eef0f3;
	border-radius: 5px;
}

.ds-extra-app__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.ds-extra-app__cell:hover .ds-extra-app__img {
	transform: scale(1.04);
}

.ds-extra-app__caption {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 2px;
}

.ds-extra-app__title {
	font-size: 0.92rem;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.35;
	margin: 0;
}

.ds-extra-app__desc {
	font-size: 0.8rem;
	color: #555;
	line-height: 1.5;
	margin: 0;
}

/* ─────────────────────────────────────────────────────────
   Mobile (< 769px)
───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.ds-extra-sections__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.ds-extra-sections__col {
		padding: 14px;
	}

	.ds-extra-sections__title {
		font-size: 15px;
	}

	.ds-extra-cmp__proscons {
		grid-template-columns: 1fr;
	}

	.ds-extra-cmp__head-thumb {
		width: 40px;
		height: 40px;
	}

	.ds-extra-cmp__cell {
		padding: 6px 3px;
	}
}