/*
Theme Name: Laatupesula
Template: twentytwentyfive
Description: Laatupesula.fi child theme for Twenty Twenty-Five: colours, fonts, header and footer.
Author: Folla
Author URI: https://folla.fi
Version: 1.0.4
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: laatupesula
*/

html { scroll-behavior: smooth; }
:where(section[id], .wp-block-group[id], .wp-block-cover[id]) { scroll-margin-top: 90px; }

/* Header stays on top while scrolling */
.lp-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .lp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .lp-header { top: 46px; } }

/* Service list: check mark in a navy square */
.lp-services li {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.85rem 1rem 0.85rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	letter-spacing: 0.03em;
}
.lp-services { padding-left: 0; margin: 0; }
.lp-services li::before {
	content: "";
	flex: 0 0 2.4rem;
	height: 2.4rem;
	border-radius: 4px;
	background: var(--wp--preset--color--navy) url("assets/check.svg") center / 1.1rem no-repeat;
}

/* Price tables */
.lp-prices table { border-collapse: collapse; width: 100%; }
.lp-prices th,
.lp-prices td { border: 0; border-bottom: 1px solid #dde2ea; padding: 0.75rem 0.6rem; vertical-align: top; }
.lp-prices thead th {
	background: var(--wp--preset--color--navy);
	color: #fff;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	text-align: right;
	border: 0;
}
.lp-prices thead th:first-child { text-align: left; }
.lp-prices td:not(:first-child) { text-align: right; white-space: nowrap; font-weight: 700; color: var(--wp--preset--color--navy); }
.lp-prices td:first-child strong { font-family: var(--wp--preset--font-family--montserrat); color: var(--wp--preset--color--navy); }
.lp-prices tbody tr:nth-child(even) td { background: var(--wp--preset--color--light); }
@media (max-width: 600px) {
	.lp-prices th, .lp-prices td { padding: 0.6rem 0.35rem; font-size: 0.9rem; }
}

/* Offer cards */
.lp-offer { height: 100%; }
.lp-offer .lp-price { font-family: var(--wp--preset--font-family--montserrat); font-weight: 800; }

/* Opening hours */
.lp-hours .wp-block-column { text-align: center; }

/* No white gaps between full-width sections, or above the footer */
.wp-block-post-content > .alignfull { margin-block: 0; }
.wp-site-blocks > footer, .wp-site-blocks > main { margin-block-start: 0; }
.lp-prices thead { border-bottom: 0; }
.lp-prices table { border: 0; }

/* Phones: each wash is a card, prices labelled underneath */
@media (max-width: 600px) {
	.lp-prices-3 thead { display: none; }
	.lp-prices-3 tr {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		border-bottom: 1px solid #dde2ea;
		padding: 0.5rem 0;
	}
	.lp-prices-3 tbody tr:nth-child(even) td { background: none; }
	.lp-prices-3 td { border: 0; text-align: left !important; padding: 0.3rem 0.4rem; }
	.lp-prices-3 td:first-child { grid-column: 1 / -1; }
	.lp-prices-3 td:not(:first-child)::before {
		display: block;
		font-weight: 400;
		font-size: 0.8rem;
		color: var(--wp--preset--color--muted);
	}
	.lp-prices-3 td:nth-child(2)::before { content: "Henkilöauto"; }
	.lp-prices-3 td:nth-child(3)::before { content: "Tila-auto"; }
	.lp-prices-3 td:nth-child(4)::before { content: "Pakettiauto"; }
}

/* Plain text tables (privacy policy) */
.lp-plain thead th, .lp-plain td:not(:first-child) { text-align: left; }
.lp-plain td:not(:first-child) { font-weight: 400; color: inherit; white-space: normal; }

/* Footer credit in Folla orange */
.lp-heart, footer a.lp-folla, footer a.lp-folla:hover { color: #fe6600; font-weight: 700; }
