/*
 * Web7 PDF Newspaper — фронтенд стильдері.
 * Барлық ереже .w7pn контейнерінің ішінде ғана әрекет етеді.
 * text-decoration үшін !important тек плагиннің өз сілтемелерінде қолданылады:
 * кейбір тақырыптар (Astra, Neve) мазмұндағы сілтемелердің астын жоғары
 * specificity-мен сызады.
 */

.w7pn {
	--w7pn-primary: #1a73e8;
	--w7pn-text: #14213d;
	--w7pn-muted: #66728a;
	--w7pn-border: #e5eaf1;
	--w7pn-soft: #eaf3fe;
	--w7pn-radius: 14px;

	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 0 24px;
	color: var(--w7pn-text);
	font-size: 15px;
	line-height: 1.45;
	text-align: start;
	container-type: inline-size;
	container-name: w7pn;
}

@supports (background: color-mix(in srgb, red 10%, white)) {
	.w7pn {
		--w7pn-soft: color-mix(in srgb, var(--w7pn-primary) 10%, #fff);
	}
}

.w7pn *,
.w7pn *::before,
.w7pn *::after {
	box-sizing: border-box;
}

.w7pn .w7pn-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Карточка ---------- */

.w7pn .w7pn-card {
	margin: 0 0 16px;
	padding: 20px;
	border-radius: var(--w7pn-radius);
	background: #fff;
	border: 1px solid var(--w7pn-border);
}

.w7pn .w7pn-card:last-child {
	margin-bottom: 0;
}

.w7pn .w7pn-card__title {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--w7pn-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	overflow-wrap: anywhere;
}

.w7pn .w7pn-card__title::before,
.w7pn .w7pn-card__title::after {
	content: none;
}

.w7pn .w7pn-empty {
	margin: 0;
	color: var(--w7pn-muted);
	font-size: 14px;
}

/* ---------- Соңғы сан ---------- */

.w7pn .w7pn-latest {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--w7pn-soft);
	border-color: transparent;
}

.w7pn .w7pn-latest__body {
	flex: 1 1 0;
	min-width: 0;
}

.w7pn .w7pn-latest__text {
	margin: 6px 0 16px;
	padding: 0;
	color: var(--w7pn-muted);
	font-size: 14px;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.w7pn .w7pn-latest__text.w7pn-empty {
	margin-bottom: 0;
}

.w7pn .w7pn-latest__icon {
	flex: 0 0 auto;
	width: 86px;
	line-height: 0;
}

.w7pn .w7pn-latest__svg {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 6px 12px rgba(20, 33, 61, 0.12));
}

/* ---------- Батырма ---------- */

.w7pn .w7pn-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: var(--w7pn-primary);
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none !important;
	text-transform: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.w7pn .w7pn-btn:visited,
.w7pn .w7pn-btn:hover,
.w7pn .w7pn-btn:focus,
.w7pn .w7pn-btn:active {
	background: var(--w7pn-primary);
	color: #fff;
	text-decoration: none !important;
}

.w7pn .w7pn-btn:hover {
	filter: brightness(0.92);
}

.w7pn .w7pn-btn--small {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 8px 14px;
}

.w7pn .w7pn-icon {
	flex: 0 0 auto;
	display: block;
	width: 18px;
	height: 18px;
}

.w7pn .w7pn-btn:focus-visible,
.w7pn .w7pn-dl:focus-visible,
.w7pn .w7pn-link:focus-visible,
.w7pn .w7pn-page:focus-visible,
.w7pn .w7pn-filter__input:focus-visible,
.w7pn .w7pn-filter__select:focus-visible {
	outline: 3px solid var(--w7pn-text);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- Сілтеме ---------- */

.w7pn .w7pn-link,
.w7pn .w7pn-link:visited {
	color: var(--w7pn-primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}

.w7pn .w7pn-link:hover,
.w7pn .w7pn-link:focus {
	color: var(--w7pn-primary);
	text-decoration: underline !important;
}

/* ---------- Архив ---------- */

.w7pn .w7pn-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 12px;
	margin: 0 0 6px;
}

.w7pn .w7pn-admin-note {
	margin: 0 0 8px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff8e5;
	color: #6b4e00;
	font-size: 13px;
}

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

.w7pn .w7pn-item {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 0;
	border: 0;
	border-top: 1px solid var(--w7pn-border);
	list-style: none;
}

.w7pn .w7pn-item::before,
.w7pn .w7pn-item::after {
	content: none;
}

.w7pn .w7pn-item:first-child {
	border-top: 0;
}

.w7pn .w7pn-archive .w7pn-item:last-child {
	padding-bottom: 0;
}

.w7pn .w7pn-cover {
	flex: 0 0 44px;
	display: block;
	width: 44px;
	height: 58px;
	overflow: hidden;
	border: 1px solid var(--w7pn-border);
	border-radius: 6px;
	background: #f3f6fa;
	line-height: 0;
}

.w7pn .w7pn-cover__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: top center;
}

.w7pn .w7pn-cover--placeholder {
	padding: 6px;
}

.w7pn .w7pn-cover__svg {
	display: block;
	width: 100%;
	height: 100%;
}

.w7pn .w7pn-item__body {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.w7pn .w7pn-item__title {
	color: var(--w7pn-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.w7pn .w7pn-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	color: var(--w7pn-muted);
	font-size: 13px;
	line-height: 1.4;
}

.w7pn .w7pn-item__desc {
	margin-top: 2px;
	color: var(--w7pn-muted);
	font-size: 13px;
	overflow-wrap: anywhere;
}

.w7pn .w7pn-badge {
	display: inline-block;
	margin-inline-start: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--w7pn-soft);
	color: var(--w7pn-primary);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	vertical-align: middle;
	white-space: nowrap;
}

.w7pn .w7pn-dl,
.w7pn .w7pn-dl:visited {
	flex: 0 0 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--w7pn-soft);
	color: var(--w7pn-primary);
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.w7pn .w7pn-dl:hover,
.w7pn .w7pn-dl:focus {
	background: var(--w7pn-primary);
	color: #fff;
}

/* ---------- Толық архив ---------- */

.w7pn .w7pn-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 0;
}

.w7pn .w7pn-filter__input,
.w7pn .w7pn-filter__select {
	min-width: 0;
	max-width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #c9d2df;
	border-radius: 10px;
	background-color: #fff;
	box-shadow: none;
	color: var(--w7pn-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.2;
}

.w7pn .w7pn-filter__input {
	flex: 1 1 200px;
	width: auto;
}

.w7pn .w7pn-filter__select {
	flex: 0 1 170px;
	width: auto;
}

.w7pn .w7pn-count {
	margin: 0 0 4px;
	color: var(--w7pn-muted);
	font-size: 13px;
}

.w7pn .w7pn-list--full .w7pn-cover {
	flex-basis: 60px;
	width: 60px;
	height: 80px;
}

.w7pn .w7pn-list--full .w7pn-item {
	flex-wrap: wrap;
}

.w7pn .w7pn-list--full .w7pn-item__body {
	flex: 1 1 150px;
}

.w7pn .w7pn-pagination {
	margin: 16px 0 0;
}

.w7pn .w7pn-pagination__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.w7pn .w7pn-pagination__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.w7pn .w7pn-pagination__list li::before {
	content: none;
}

.w7pn .w7pn-page,
.w7pn .w7pn-page:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--w7pn-border);
	border-radius: 10px;
	background: #fff;
	color: var(--w7pn-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
}

.w7pn a.w7pn-page:hover,
.w7pn a.w7pn-page:focus {
	border-color: var(--w7pn-primary);
	color: var(--w7pn-primary);
	text-decoration: none !important;
}

.w7pn .w7pn-page--current {
	border-color: var(--w7pn-primary);
	background: var(--w7pn-primary);
	color: #fff;
}

.w7pn .w7pn-page--gap {
	border-color: transparent;
	background: transparent;
	color: var(--w7pn-muted);
}

/* ---------- Тар контейнер (сайдбар, телефон) ---------- */

@container w7pn (max-width: 420px) {
	.w7pn .w7pn-card {
		padding: 16px;
	}

	.w7pn .w7pn-latest__icon {
		width: 64px;
	}

	.w7pn .w7pn-card__title {
		font-size: 17px;
	}

	/* Толық архивтегі «Жүктеу» батырмасы белгішеге айналады. */
	.w7pn .w7pn-btn--small {
		width: 38px;
		padding: 0;
	}

	.w7pn .w7pn-btn--small .w7pn-btn__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.w7pn .w7pn-list--full .w7pn-item__body {
		flex-basis: 110px;
	}

	.w7pn .w7pn-list--full .w7pn-cover {
		flex-basis: 48px;
		width: 48px;
		height: 64px;
	}

	.w7pn .w7pn-filter__select,
	.w7pn .w7pn-filter__submit {
		flex: 1 1 120px;
	}
}

@container w7pn (max-width: 270px) {
	.w7pn .w7pn-card {
		padding: 14px;
	}

	.w7pn .w7pn-latest__icon {
		display: none;
	}

	.w7pn .w7pn-btn {
		width: 100%;
	}

	.w7pn .w7pn-btn--small {
		width: 38px;
	}

	.w7pn .w7pn-item {
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.w7pn .w7pn-btn,
	.w7pn .w7pn-dl {
		transition: none;
	}
}
