/**
 * TablePress — Aimo tema uyumu (fiyatlandırma / karşılaştırma tabloları)
 * TablePress varsayılan CSS değişkenlerini ve thead/tbody kurallarını günceller.
 */

/* Tema birincil rengi yoksa güvenli yedekler */
.tablepress {
	--aimo-tp-text: #0b1b2b;
	--aimo-tp-head-from: var(--primary-color, #535ee0);
	/* Önceki #292962 yerine daha açık ton — başlık koyuluğu azaltıldı */
	--aimo-tp-head-to: #6a6fc9;
	--aimo-tp-border: rgba(11, 27, 43, 0.1);
	--text-color: var(--aimo-tp-text);
	--head-text-color: #ffffff;
	--head-bg-color: var(--aimo-tp-head-from);
	--odd-text-color: var(--aimo-tp-text);
	--odd-bg-color: #ffffff;
	--even-text-color: var(--aimo-tp-text);
	--even-bg-color: #f5f7fb;
	--hover-text-color: var(--aimo-tp-text);
	--hover-bg-color: rgba(var(--primary-color-rgb), 0.09);
	--border-color: var(--aimo-tp-border);
	--padding: 1rem 1.25rem;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 20px;
	overflow: hidden;
	margin: 2.5rem auto 1.25rem;
	box-shadow: 0 3px 109px rgba(0, 0, 0, 0.08);
	font-size: 16px;
	line-height: 1.5;
}

/* DataTables sarmalayıcısı varsa gölge ve radius taşıyıcı */
.dt-container:has(> .dt-layout > .dt-layout-table .tablepress),
.dt-container:has(> .tablepress) {
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 3px 109px rgba(0, 0, 0, 0.08);
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
}

.dt-container:has(.tablepress) .dt-layout-table {
	border-radius: 20px;
	overflow: hidden;
}

.dt-container .tablepress {
	margin-top: 0;
	margin-bottom: 0;
	box-shadow: none;
}

/* Başlık satırı — fiyat kartlarındaki koyu / marka tonları */
.tablepress > thead > tr > th,
.tablepress > tfoot > tr > th {
	background: linear-gradient(
		135deg,
		var(--aimo-tp-head-from) 0%,
		var(--aimo-tp-head-to) 100%
	) !important;
	color: #ffffff !important;
	font-weight: 600;
	letter-spacing: -0.02em;
	border-color: transparent !important;
	vertical-align: middle;
}

.tablepress > thead + tbody > tr:first-child > *,
.tablepress > tbody > tr:first-child > * {
	border-top-color: transparent;
}

/* Hücre ayırıcıları */
.tablepress > :where(thead) + tbody > :where(:not(.child)) > *,
.tablepress > tbody > * ~ :where(:not(.child)) > *,
.tablepress > tfoot > :where(:first-child) > * {
	border-top: 1px solid var(--aimo-tp-border);
}

/* Sütun başlıkları (DataTables sıralama) */
.tablepress thead .dt-orderable-asc:hover,
.tablepress thead .dt-orderable-desc:hover,
.tablepress thead .dt-ordering-asc,
.tablepress thead .dt-ordering-desc {
	background: rgba(255, 255, 255, 0.12) !important;
	color: #ffffff !important;
}

.tablepress thead th:active {
	outline: none;
}

/* Gövde: okunabilirlik */
.tablepress > tbody > tr > td {
	color: var(--aimo-tp-text);
}

/* İlk sütun (özellik adı) — hafif vurgu */
.tablepress > tbody > tr > td:first-child,
.tablepress > thead > tr > th:first-child {
	font-weight: 500;
}

/* Onay işareti / ikon hücreleri (yaygın kullanım) */
.tablepress > tbody > tr > td:where(:not(:first-child)) {
	text-align: center;
}

.tablepress > thead > tr > th:where(:not(:first-child)) {
	text-align: center;
}

/* Tablo adı / açıklama (TablePress üst metinleri) */
.tablepress-table-name {
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--aimo-tp-text);
	letter-spacing: -0.03em;
	margin-bottom: 0.75rem;
}

.tablepress-table-description {
	display: block;
	font-size: 15px;
	color: rgba(11, 27, 43, 0.72);
	margin-bottom: 1rem;
	line-height: 1.55;
}

/* DataTables alt kontroller */
.dt-container:has(.tablepress) .dt-paging .dt-paging-button:hover,
.dt-container:has(.tablepress) .dt-paging .dt-paging-button.current {
	border-color: var(--primary-color, #535ee0);
	color: var(--primary-color, #535ee0);
}

@media screen and (max-width: 767px) {
	.tablepress {
		font-size: 14px;
		--padding: 0.75rem 0.65rem;
		border-radius: 14px;
	}
}
