/**
 * Regulamin Sklepu & Legal Pages — TanieKupowanie
 *
 * @package TanieKupowanie
 */

.tk-legal-wrap {
	padding: 1.5rem 0 4rem;
	background-color: var(--tk-surface-warm);
}

.tk-legal-hero {
	position: relative;
	border-radius: 1.5rem;
	background: #f8f3ef;
	padding: 1.35rem;
	margin-bottom: 1.75rem;
	overflow: hidden;
	box-shadow: var(--tk-shadow-xs);
}

@media (min-width: 640px) {
	.tk-legal-hero {
		padding: 2rem;
		margin-bottom: 2.25rem;
	}
}

@media (min-width: 1024px) {
	.tk-legal-hero {
		padding: 3rem;
	}
}

.tk-legal-version-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.85rem;
	border-radius: 9999px;
	background: #ffffff;
	color: var(--tk-legal-primary);
	font-size: 0.72rem;
	font-weight: 800;
	box-shadow: var(--tk-shadow-2xs);
	margin-bottom: 1rem;
}

.tk-legal-hero h1 {
	font-size: 1.55rem;
	line-height: 1.18;
	font-weight: 800;
	color: #1d1b1a;
	margin: 0 0 0.85rem;
}

@media (min-width: 640px) {
	.tk-legal-hero h1 {
		font-size: 2rem;
	}
}

@media (min-width: 1024px) {
	.tk-legal-hero h1 {
		font-size: 2.75rem;
	}
}

.tk-legal-hero h1 span {
	color: var(--tk-legal-primary);
}

.tk-legal-hero p {
	font-size: 1rem;
	line-height: 1.6;
	color: #5a403e;
	max-width: 46rem;
	margin: 0;
}

/* 3 Pastel Info Cards */
.tk-legal-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
	.tk-legal-cards-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tk-legal-info-card {
	border-radius: 1.25rem;
	padding: 1.5rem;
	box-shadow: var(--tk-shadow-xs);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.tk-legal-info-card--cream {
	background: #fbfbf9;
}

.tk-legal-info-card--yellow {
	background: rgba(254, 247, 214, 0.55);
}

.tk-legal-info-card--mint {
	background: rgba(230, 247, 240, 0.65);
}

.tk-legal-card-icon {
	width: 3rem;
	height: 3rem;
	border-radius: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
	font-size: 1.35rem;
}

.tk-legal-cod-warning {
	border-radius: 0.875rem;
	background: rgba(255, 218, 214, 0.55);
	padding: 0.7rem 0.85rem;
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 800;
	color: var(--tk-legal-error-text);
}

/* Main TOC + Paragraphs Grid */
.tk-legal-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 1024px) {
	.tk-legal-layout {
		grid-template-columns: 4fr 8fr;
	}
}

.tk-toc-sidebar {
	display: none;
	border-radius: 1.25rem;
	background: #f8f3ef;
	padding: 1.5rem;
	box-shadow: var(--tk-shadow-2xs);
}

@media (min-width: 1024px) {
	.tk-toc-sidebar {
		display: block;
		position: sticky;
		top: 6.5rem;
	}
}

.tk-toc-nav {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.tk-toc-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.65rem 0.8rem;
	border-radius: 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #5a403e;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.tk-toc-link:hover,
.tk-toc-link.is-active {
	background: var(--tk-legal-coral-subtle);
	color: var(--tk-legal-primary);
	font-weight: 800;
}

.tk-legal-articles {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.tk-legal-article {
	background: #ffffff;
	border-radius: 1.25rem;
	padding: 1.75rem;
	box-shadow: var(--tk-shadow-xs);
	scroll-margin-top: 6.5rem;
	position: relative;
	overflow: hidden;
}

@media (min-width: 640px) {
	.tk-legal-article {
		padding: 2rem;
	}
}

.tk-legal-article--highlight::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--tk-legal-primary) 0%, #fdc425 50%, var(--tk-legal-tertiary) 100%);
}

.tk-legal-chapter-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.tk-legal-chapter-pill {
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	background: #f2edea;
	color: #1d1b1a;
	font-size: 0.72rem;
	font-weight: 800;
}

.tk-legal-chapter-pill--primary {
	background: var(--tk-legal-primary);
	color: #ffffff;
}

.tk-legal-chapter-pill--soft {
	background: var(--tk-legal-coral-subtle);
	color: var(--tk-legal-primary);
}

.tk-legal-chapter-pill--yellow {
	background: #fef7d6;
	color: #6d5200;
}

.tk-legal-danger-box {
	border-radius: 1rem;
	background: rgba(255, 218, 214, 0.35);
	padding: 1rem;
	margin: 1.25rem 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.tk-legal-danger-box {
		flex-direction: row;
		padding: 1.25rem;
		gap: 1rem;
	}
}

.tk-legal-danger-box__icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	background: var(--tk-legal-error);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.tk-legal-helpdesk-banner {
	margin-top: 2rem;
	border-radius: 1.5rem;
	background: #fbfbf9;
	padding: 2rem;
	box-shadow: var(--tk-shadow-xs);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.25rem;
}

@media (min-width: 1024px) {
	.tk-legal-helpdesk-banner {
		flex-direction: row;
		align-items: center;
	}
}
