/*
 * UA Post Editor blocks: one stylesheet for the front end and the editor canvas (handle
 * ua-pe-blocks, loaded through block.json "style"). Values follow the theme tokens
 * (src/css/tokens.css of the "urgent" theme) with the raw values as fallbacks, so the blocks
 * look the same with or without the theme stylesheet. Mobile first. No border-radius.
 */

.ua-b-checklist,
.ua-b-ba,
.ua-b-job,
.ua-b-note,
.ua-b-ror,
.ua-b-place,
.ua-b-terms,
.ua-b-empty {
	box-sizing: border-box;
	font-family: var(--font, Archivo, system-ui, sans-serif);
	color: var(--ink, #1C1917);
}

.ua-b-checklist *,
.ua-b-ba *,
.ua-b-job *,
.ua-b-ror *,
.ua-b-place *,
.ua-b-terms * {
	box-sizing: border-box;
}

/* Checklist */
.ua-b-checklist {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin-left: 0;
	padding: 0;
	list-style: none;
	background: var(--sand, #D6D2CE);
	border: 1px solid var(--sand, #D6D2CE);
	font-size: 15px;
	line-height: 1.5;
}

.ua-prose .ua-b-checklist {
	padding-left: 0;
	list-style: none;
}

.ua-b-checklist__item {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	margin: 0;
	padding: 14px 16px;
	background: var(--white, #fff);
}

.ua-prose .ua-b-checklist__item + .ua-b-checklist__item {
	margin-top: 0;
}

.ua-b-checklist__mark {
	position: relative;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	background: var(--accent, #F4B242);
}

.ua-b-checklist__mark::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid var(--ink, #1C1917);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ua-b-checklist__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var(--ink-2, #2B2724);
}

.ua-b-checklist__title {
	font-weight: 600;
	color: var(--ink, #1C1917);
}

.ua-b-checklist__note {
	color: var(--text-2, #5A5A5A);
}

/* Before / After */
.ua-b-ba {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1px;
	margin-left: 0;
	margin-right: 0;
	background: var(--sand, #D6D2CE);
	border: 1px solid var(--sand, #D6D2CE);
}

.ua-b-ba__cell {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ink-2, #2B2724);
}

.ua-prose .ua-b-ba__cell + .ua-b-ba__cell {
	margin-top: 0;
}

.ua-b-ba__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ua-b-ba__tag {
	position: absolute;
	left: 10px;
	top: 10px;
	margin: 0;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.ua-b-ba__tag--before {
	background: var(--ink, #1C1917);
	color: var(--white, #fff);
}

.ua-b-ba__tag--after {
	background: var(--accent, #F4B242);
	color: var(--ink, #1C1917);
}

@media (min-width: 600px) {
	.ua-b-ba {
		grid-template-columns: 1fr 1fr;
	}
}

/* Typical job */
.ua-b-job__box {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	padding: 18px 20px;
	border: 1px solid var(--ink, #1C1917);
	background: var(--white, #fff);
}

.ua-b-job__main {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ua-b-job__label,
.ua-b-ror__label,
.ua-b-place__label,
.ua-b-terms__label {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--text-3, #6B6B6B);
}

.ua-b-job__name {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
}

.ua-b-job__note {
	font-size: 14px;
	line-height: 1.45;
	color: var(--text-2, #5A5A5A);
}

.ua-b-job__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.ua-b-job__labor {
	font-size: 28px;
	font-weight: 200;
	line-height: 1;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}

.ua-b-job__unit {
	font-size: 12px;
	color: var(--text-3, #6B6B6B);
}

.ua-b-job__fine {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--text-3, #6B6B6B);
}

@media (min-width: 600px) {
	.ua-b-job__box {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 24px;
		align-items: center;
		padding: 20px 24px;
	}

	.ua-b-job__price {
		flex-direction: column;
		align-items: flex-end;
		gap: 4px;
		text-align: right;
	}
}

/* Cost note */
.ua-b-note {
	margin-left: 0;
	margin-right: 0;
	padding: 18px 20px;
	background: var(--paper, #F3F1EE);
	border-left: 3px solid var(--accent, #F4B242);
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-2, #2B2724);
}

.ua-b-note__label {
	font-weight: 600;
	color: var(--ink, #1C1917);
}

@media (min-width: 600px) {
	.ua-b-note {
		padding: 20px 24px;
	}
}

/* Repair-or-replace CTA */
.ua-b-ror {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	padding: 24px 20px;
	background: var(--ink, #1C1917);
	color: var(--white, #fff);
}

.ua-b-ror__copy {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ua-b-ror__label {
	color: var(--accent, #F4B242);
}

.ua-b-ror__text {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--white, #fff);
}

.ua-b-ror__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 24px;
	background: var(--accent, #F4B242);
	color: var(--ink, #1C1917);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ua-b-ror__btn:hover,
.ua-b-ror__btn:focus-visible {
	background: var(--accent-hover, #DDA23A);
	color: var(--ink, #1C1917);
}

.ua-b-ror__btn:focus-visible {
	outline: 2px solid var(--white, #fff);
	outline-offset: 2px;
}

@media (min-width: 600px) {
	.ua-b-ror {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 24px;
		align-items: center;
		padding: 28px;
	}

	.ua-b-ror__text {
		font-size: 20px;
	}
}

/* Place card */
.ua-b-place {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	border: 1px solid var(--sand, #D6D2CE);
	background: var(--white, #fff);
}

.ua-b-place__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ink-2, #2B2724);
}

.ua-b-place__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ua-b-place__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px 20px;
}

.ua-b-place__name {
	font-size: 20px;
	font-weight: 500;
	line-height: 1.25;
}

.ua-b-place__address {
	font-size: 14px;
	color: var(--text-3, #6B6B6B);
}

.ua-b-place__why {
	margin: 6px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink-2, #2B2724);
}

.ua-b-place__why-label {
	font-weight: 600;
	color: var(--ink, #1C1917);
}

.ua-b-place__map {
	align-self: flex-start;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink, #1C1917);
	text-decoration: none;
	border-bottom: 2px solid var(--accent, #F4B242);
}

.ua-b-place__map:hover,
.ua-b-place__map:focus-visible {
	color: var(--ink, #1C1917);
	border-bottom-color: var(--ink, #1C1917);
}

@media (min-width: 600px) {
	.ua-b-place--photo {
		grid-template-columns: 240px minmax(0, 1fr);
	}

	.ua-b-place--photo .ua-b-place__media {
		aspect-ratio: auto;
		min-height: 180px;
	}
}

/* Terms list */
.ua-b-terms {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px;
	border: 1px solid var(--sand, #D6D2CE);
}

.ua-b-terms__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink-2, #2B2724);
}

.ua-prose .ua-b-terms__list {
	padding-left: 0;
	list-style: none;
}

.ua-b-terms__list li {
	position: relative;
	margin: 0;
	padding-left: 18px;
}

.ua-prose .ua-b-terms__list li + li {
	margin-top: 0;
}

.ua-b-terms__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .6em;
	width: 6px;
	height: 6px;
	background: var(--ink, #1C1917);
}

/* Editor placeholder for empty blocks (only printed in the editor render) */
.ua-b-empty {
	padding: 16px 20px;
	border: 1px dashed var(--muted, #8A8784);
	background: var(--paper, #F3F1EE);
	font-size: 13px;
	color: var(--text-3, #6B6B6B);
}
