:root {
	--cc-font-family: inherit;
	--cc-modal-border-radius: 12px;
	--cc-btn-border-radius: 25px;
	--cc-modal-margin: 16px;

	--cc-bg: #f8f4e8;
	--cc-primary-color: #0f5041;
	--cc-secondary-color: #2c2c2c;
	--cc-link-color: #0f5041;

	--cc-btn-primary-bg: #bb7543;
	--cc-btn-primary-color: #f8f4e8;
	--cc-btn-primary-border-color: #bb7543;
	/* An Ink overlay darkens Orange on hover; the library paints this token with the background shorthand only. */
	--cc-btn-primary-hover-bg: linear-gradient(rgba(44, 44, 44, 0.2), rgba(44, 44, 44, 0.2)) #bb7543;
	--cc-btn-primary-hover-color: #ffffff;
	--cc-btn-primary-hover-border-color: transparent;

	--cc-btn-secondary-bg: transparent;
	--cc-btn-secondary-color: #0f5041;
	--cc-btn-secondary-border-color: #0f5041;
	--cc-btn-secondary-hover-bg: #0f5041;
	--cc-btn-secondary-hover-color: #f8f4e8;
	--cc-btn-secondary-hover-border-color: #0f5041;

	--cc-separator-border-color: #e5dec8;
	--cc-overlay-bg: rgba(15, 80, 65, 0.55);

	--cc-toggle-on-bg: #0f5041;
	--cc-toggle-off-bg: rgba(44, 44, 44, 0.58);
	--cc-toggle-on-knob-bg: #ffffff;
	--cc-toggle-off-knob-bg: #ffffff;
	--cc-toggle-enabled-icon-color: #0f5041;
	--cc-toggle-disabled-icon-color: var(--cc-toggle-off-bg);
	--cc-toggle-readonly-bg: rgba(44, 44, 44, 0.25);
	--cc-toggle-readonly-knob-bg: #ffffff;
	--cc-toggle-readonly-knob-icon-color: var(--cc-toggle-readonly-bg);

	--cc-section-category-border: #e5dec8;
	--cc-cookie-category-block-bg: #ffffff;
	--cc-cookie-category-block-border: #e5dec8;
	--cc-cookie-category-block-hover-bg: rgba(229, 222, 200, 0.5);
	--cc-cookie-category-block-hover-border: rgba(44, 44, 44, 0.12);
	--cc-cookie-category-expanded-block-bg: #ffffff;
	--cc-cookie-category-expanded-block-hover-bg: rgba(229, 222, 200, 0.5);

	--cc-webkit-scrollbar-bg: #e5dec8;
	--cc-webkit-scrollbar-hover-bg: rgba(44, 44, 44, 0.12);

	--cc-footer-bg: #e5dec8;
	--cc-footer-color: #2c2c2c;
	--cc-footer-border-color: rgba(44, 44, 44, 0.12);
}

#cc-main .cm__texts {
	padding-top: 0.875rem;
}

#cc-main .cm__title + .cm__desc {
	margin-top: 0.5em;
}

#cc-main .cm__desc {
	padding-bottom: 0.875rem;
}

@media screen and (max-width: 640px) {
	#cc-main .cm__desc {
		font-size: 0.875rem;
	}
}

/* First view: text on top, then switches left and actions right on one shared 44 px row rhythm. */
#cc-main .cm--box .cm__body {
	display: grid;
	grid-template-columns: 1.3rem minmax(auto, 1fr) 1rem minmax(0, 1fr) 1.3rem;
	grid-auto-rows: minmax(44px, auto);
	row-gap: 0.375rem;
	padding-bottom: 0.75rem !important;
}

#cc-main .cm--box .cm__texts {
	grid-column: 1 / -1;
	grid-row: 1;
	min-width: 0;
	margin-bottom: 0.375rem;
	border-bottom: 1px solid var(--cc-separator-border-color);
}

/* The buttons become cells of the body grid, so DOM order stays switches, then the four buttons. */
#cc-main .cm--box .cm__btns,
#cc-main .cm--box .cm__btns .cm__btn-group {
	display: contents !important;
}

#cc-main .cm--box .ph-cm-toggles {
	display: grid;
	grid-template-columns: repeat(2, minmax(max-content, 1fr));
	grid-column: 2;
	grid-row: 2 / span 2;
	gap: 0.375rem;
	min-width: min-content;
	margin: 0;
	padding: 0;
	border: 0;
}

#cc-main .cm--box .cm__body .cm__btn {
	grid-column: 4;
	min-width: 0;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 0.75rem;
}

#cc-main .cm--box .cm__body .cm__btn[data-role="all"] {
	grid-row: 2;
}

#cc-main .cm--box .cm__body .cm__btn[data-role="necessary"] {
	grid-row: 3;
}

#cc-main .cm--box .cm__body .cm__btn[data-role="selection"] {
	grid-row: 4;
	border-color: var(--cc-btn-secondary-border-color);
	background: var(--cc-btn-secondary-bg);
	color: var(--cc-btn-secondary-color);
}

#cc-main .cm--box .cm__body .cm__btn[data-role="selection"]:hover {
	border-color: var(--cc-btn-secondary-hover-border-color);
	background: var(--cc-btn-secondary-hover-bg);
	color: var(--cc-btn-secondary-hover-color);
}

/* "Näita andmeid" stays a <button> but reads as a text link, level with "Luba valik". */
#cc-main .cm--box .cm__body .cm__btn[data-role="show"] {
	grid-column: 2;
	grid-row: 4;
	justify-self: start;
	margin-left: -2px !important;
	padding: 0 2px;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--cc-link-color);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

#cc-main .cm--box .cm__body .cm__btn[data-role="show"]:hover {
	background: none;
	color: var(--cc-link-color);
	text-decoration-thickness: 2px;
}

/* Phones: 1x4 switches beside the four actions, row for row; the link sits level with the last switch. */
@media screen and (max-width: 640px) {
	#cc-main .cm--box .cm__body {
		grid-template-columns: 1.1rem minmax(0, max-content) 0.625rem minmax(0, 1fr) 1.1rem;
		padding-bottom: 0.75rem !important;
	}

	#cc-main .cm--box .ph-cm-toggles {
		grid-template-columns: minmax(0, max-content);
		grid-row: 2 / span 4;
		min-width: 0;
	}

	/* Six px side padding keeps LT "Leisti pasirinkimą" on one line at 360 px. */
	#cc-main .cm--box .cm__body .cm__btn {
		padding: 0 0.375rem;
	}

	#cc-main .cm--box .cm__body .cm__btn[data-role="show"] {
		grid-column: 4;
		grid-row: 5;
		justify-self: stretch;
		margin-left: 0 !important;
		padding: 0 2px;
	}
}

/* Desktop from an 800 px box plus margins: text left, 1x4 switches, then the four actions, row for row. */
@media screen and (min-width: 832px) {
	#cc-main .cm--box.cm--wide {
		max-width: 800px;
	}

	#cc-main .cm--box .cm__body {
		grid-template-columns: 1.3rem minmax(0, 1fr) 1.25rem max-content 1.25rem 15rem 1.3rem;
		grid-template-rows: repeat(4, 44px) minmax(0, auto);
		padding-top: 0.875rem;
		padding-bottom: 0.375rem !important;
	}

	#cc-main .cm--box .cm__texts {
		grid-column: 2;
		grid-row: 1 / -1;
		justify-content: flex-start;
		margin: 0;
		padding: 0 1.25rem 0 0;
		border-right: 1px solid var(--cc-separator-border-color);
		border-bottom: 0;
	}

	#cc-main .cm--box .cm__title,
	#cc-main .cm--box .cm__desc {
		padding-right: 0;
		padding-left: 0;
	}

	#cc-main .cm--box .cm__desc {
		padding-bottom: 0;
	}

	#cc-main .cm--box .ph-cm-toggles {
		grid-template-columns: max-content;
		grid-column: 4;
		grid-row: 1 / span 4;
		min-width: 0;
	}

	#cc-main .cm--box .cm__body .cm__btn {
		grid-column: 6;
	}

	#cc-main .cm--box .cm__body .cm__btn[data-role="all"] {
		grid-row: 1;
	}

	#cc-main .cm--box .cm__body .cm__btn[data-role="necessary"] {
		grid-row: 2;
	}

	#cc-main .cm--box .cm__body .cm__btn[data-role="selection"] {
		grid-row: 3;
	}

	#cc-main .cm--box .cm__body .cm__btn[data-role="show"] {
		grid-column: 6;
		grid-row: 4;
		justify-self: center;
		margin-left: 0 !important;
	}
}

#cc-main .cm__btn {
	min-height: 44px;
	font-size: 0.9375rem;
}

/* Brown action buttons and the outlined selection button - large-text bold so cream-on-brown clears WCAG contrast. */
#cc-main .cm__btn:not(.cm__btn--secondary),
#cc-main .pm__btn:not(.pm__btn--secondary) {
	font-size: 1.1875rem;
	font-weight: 700;
}

#cc-main .ph-cm-toggles__legend {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

#cc-main .cm .ph-cm-toggle {
	position: relative;
	right: auto;
	z-index: auto;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: auto;
	height: auto;
	min-height: 44px;
	margin: 0;
	border-radius: 0;
	transform: none;
}

/* The library's compact service-toggle size: four switches and their titles fit two per row at 360 px. */
#cc-main .cm .ph-cm-toggle .section__toggle,
#cc-main .cm .ph-cm-toggle .toggle__icon {
	width: 42px;
	height: 19px;
}

#cc-main .cm .ph-cm-toggle .section__toggle {
	top: calc(50% - 9.5px);
}

#cc-main .cm .ph-cm-toggle .toggle__icon-circle {
	width: 19px;
	height: 19px;
}

#cc-main .cm .ph-cm-toggle .section__toggle:checked ~ .toggle__icon .toggle__icon-circle {
	transform: translateX(23px);
}

#cc-main .cm .ph-cm-toggle .section__toggle:focus-visible {
	outline: 2px solid #0f5041;
	outline-offset: 2px;
}

#cc-main .cm .ph-cm-toggle .toggle__icon {
	position: relative;
	flex: none;
}

#cc-main .ph-cm-toggle__title {
	min-width: 0;
	color: var(--cc-secondary-color);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.25;
	hyphens: auto;
	overflow-wrap: break-word;
}

#cc-main .cm .ph-cm-toggle:has(:disabled) {
	cursor: not-allowed;
}

/* show({ highlight, hint }): the switch a clicked feature needs, ringed in the action color, and why. */
#cc-main .cm .ph-cm-toggle.ph-cm-toggle--need {
	isolation: isolate;
}

#cc-main .cm .ph-cm-toggle--need::before {
	position: absolute;
	inset: 0 -8px;
	z-index: -1;
	border-radius: 8px;
	background: rgba(187, 117, 67, 0.1);
	box-shadow: inset 0 0 0 2px #bb7543;
	content: "";
	pointer-events: none;
	animation: ph-cm-need 0.22s var(--ease-out) both;
}

#cc-main .ph-cm-hint {
	margin: 0 0 0.875rem;
	padding: 0 1.3rem;
	color: var(--cc-primary-color);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	animation: ph-cm-hint 0.22s var(--ease-out) both;
}

@media screen and (max-width: 640px) {
	#cc-main .ph-cm-hint {
		padding: 0 1.1rem;
	}
}

@media screen and (min-width: 832px) {
	#cc-main .ph-cm-hint {
		margin: 0.5rem 0 0;
		padding: 0;
	}
}

@keyframes ph-cm-need {
	from {
		opacity: 0;
		transform: scale(0.97);
	}
}

@keyframes ph-cm-hint {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	#cc-main .cm .ph-cm-toggle--need::before,
	#cc-main .ph-cm-hint {
		animation-name: ph-cm-fade;
	}
}

@keyframes ph-cm-fade {
	from {
		opacity: 0;
	}
}

/* Rendered column order: name, type, domain, description, duration; only cookie names and hosts may break mid-word. */
#cc-main .pm__table-th:nth-child(1),
#cc-main .pm__table-td:nth-child(1),
#cc-main .pm__table-th:nth-child(3),
#cc-main .pm__table-td:nth-child(3) {
	overflow-wrap: anywhere;
}

/* Fixed proportions on desktop: the auto layout would starve the two columns that may break anywhere. */
@media screen and (min-width: 641px) {
	#cc-main .pm__section-table {
		table-layout: fixed;
	}

	/* The library's cells are content-box: percentage widths plus padding would exceed the table. */
	#cc-main .pm__table-th,
	#cc-main .pm__table-td {
		box-sizing: border-box;
	}

	#cc-main .pm__table-th:nth-child(1),
	#cc-main .pm__table-td:nth-child(1) {
		width: 12%;
	}

	#cc-main .pm__table-th:nth-child(2),
	#cc-main .pm__table-td:nth-child(2) {
		width: 19%;
	}

	#cc-main .pm__table-th:nth-child(3),
	#cc-main .pm__table-td:nth-child(3) {
		width: 12%;
	}

	#cc-main .pm__table-th:nth-child(4),
	#cc-main .pm__table-td:nth-child(4) {
		width: 36%;
	}

	#cc-main .pm__table-th:nth-child(5),
	#cc-main .pm__table-td:nth-child(5) {
		width: 21%;
	}

	/* Last resort for a word wider than its column, such as sessionStorage or a long compound. */
	#cc-main .pm__table-th:nth-child(2),
	#cc-main .pm__table-td:nth-child(2),
	#cc-main .pm__table-th:nth-child(4),
	#cc-main .pm__table-td:nth-child(4),
	#cc-main .pm__table-th:nth-child(5),
	#cc-main .pm__table-td:nth-child(5) {
		overflow-wrap: break-word;
	}
}

/* Some storefront pages carry Elementor custom CSS `a { color: … !important }` that would recolour banner links. */
#cc-main a {
	color: inherit !important;
}

#cc-main a:hover {
	color: var(--cc-primary-color) !important;
}

body button.ph-consent-widget {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 11; /* above Montonio's checkout pickup-point logos (z-index: 10) */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 1px solid #0f5041;
	border-radius: 50%;
	background: #f8f4e8;
	color: #0f5041;
	box-shadow: 0 2px 8px rgba(15, 80, 65, 0.16);
	cursor: pointer;
	transition: bottom 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

body button.ph-consent-widget[hidden] {
	display: none;
}

body button.ph-consent-widget:hover {
	background: #0f5041;
	color: #f8f4e8;
}

body button.ph-consent-widget:focus-visible {
	outline: 2px solid #bb7543;
	outline-offset: 2px;
}

.ph-consent-widget__icon {
	display: block;
	width: 24px;
	height: 24px;
}

body:has(#woosc-area.woosc-area-open-bar) .ph-consent-widget {
	bottom: 90px;
}

@media (prefers-reduced-motion: reduce) {
	body button.ph-consent-widget {
		transition: none;
	}
}
