/**
 * Cookie banner and preferences panel.
 *
 * Extends the base .lp-consent block that ships in main.css: same card, same
 * tokens, but compact. One line of copy, one row beneath it with Manage on the
 * left and the decision buttons on the right, and the category list only when
 * it is asked for. Loaded only when the consent UI renders.
 */

.lp-consent {
	left: 12px;
	right: 12px;
	bottom: 12px;
	max-width: 780px;
	padding: 14px 16px;
}

.lp-consent[hidden],
.lp-consent__prefs[hidden],
.lp-consent__actions [hidden] {
	display: none !important;
}

.lp-consent__inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.lp-consent__text {
	text-align: left;
}

.lp-consent__text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--lp-text-muted);
}

.lp-consent__heading {
	display: inline;
	font-size: 13px;
	font-weight: 700;
	color: var(--lp-text);
}

.lp-consent__text a {
	color: var(--lp-accent);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lp-consent__text a:hover {
	color: var(--lp-accent-dark);
}

.lp-consent__prefs {
	border-top: 1px solid var(--lp-border-faint);
	padding-top: 10px;
}

.lp-consent__cats {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lp-consent__cat-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--lp-text);
	cursor: pointer;
}

.lp-consent__cat-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--lp-accent);
	cursor: pointer;
}

.lp-consent__cat-label input[disabled] {
	cursor: not-allowed;
}

.lp-consent__cat p {
	margin: 3px 0 0 24px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--lp-text-muted);
}

.lp-consent__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.lp-consent__manage {
	background: none;
	border: 0;
	padding: 0;
	font-family: var(--lp-font);
	font-size: 12.5px;
	line-height: 1.2;
	color: var(--lp-text-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.lp-consent__manage:hover {
	color: var(--lp-accent);
}

.lp-consent__buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.lp-consent__btn {
	font-size: 13px;
	font-weight: 700;
	line-height: 18px;
	padding: 8px 16px;
	border-radius: 40px;
	font-family: var(--lp-font);
	cursor: pointer;
	transition: background-color var(--lp-transition), color var(--lp-transition), transform var(--lp-transition), box-shadow var(--lp-transition);
}

.lp-consent__btn--accept {
	border: 2px solid var(--lp-accent);
	background-color: var(--lp-accent);
	color: var(--lp-white);
}

.lp-consent__btn--accept:hover {
	background-color: var(--lp-accent-dark);
	border-color: var(--lp-accent-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px var(--lp-accent-shadow);
}

.lp-consent__btn--decline {
	border: 2px solid var(--lp-border-mid, rgba(0, 0, 0, 0.16));
	background-color: var(--lp-white);
	color: var(--lp-text);
}

.lp-consent__btn--decline:hover {
	background-color: var(--lp-section-bg);
}

.lp-consent__btn:focus-visible,
.lp-consent__manage:focus-visible,
.lp-consent__cat-label input:focus-visible,
.footer-cookie-settings:focus-visible {
	outline: 2px solid var(--lp-accent);
	outline-offset: 2px;
}

.footer-cookie-settings {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.footer-cookie-settings:hover {
	color: var(--lp-accent);
}

@media (min-width: 768px) {
	.lp-consent__cats {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}
}

@media (max-width: 479px) {
	.lp-consent__buttons {
		width: 100%;
		justify-content: flex-end;
	}
}
