/*
Theme Name: Tove Child
Theme URI: https://vhm-fse.ddev.site
Description: Child theme of Tove for Vendégházmester. Adds the Latin Extended subset of DM Sans so Hungarian ő/Ő and ű/Ű are drawn in DM Sans instead of a fallback font. Put further customisations here.
Template: tove
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tove-child
*/

/* Tove's own stylesheet is loaded by the parent theme; add overrides below. */

/* ==========================================================================
   Feature comparison table, built from core blocks (page "funkciótáblázat")
   Group .vft > Columns .vft-head / .vft-row (feature | 3 package columns),
   feature title = core Details block (.vft-details). Everything is editable in the editor.
   ========================================================================== */
.wp-block-group.vft {
	--vft-line: color-mix(in srgb, var(--wp--preset--color--foreground) 55%, transparent);
	max-width: 1100px;
	margin-inline: auto;
	border-top: 1px solid var(--vft-line);
	border-left: 1px solid var(--vft-line);
	background: var(--wp--preset--color--senary);
	color: var(--wp--preset--color--foreground);
	line-height: 1.45;
}
/* no gaps between rows */
.wp-block-group.vft > * { margin-block: 0 !important; }
.vft .wp-block-columns { margin: 0; gap: 0; flex-wrap: nowrap; }
.vft .wp-block-column { min-width: 0; padding: .8em 1em; border-right: 1px solid var(--vft-line); border-bottom: 1px solid var(--vft-line); }
.vft .wp-block-column > :first-child { margin-top: 0; }
.vft .wp-block-column > :last-child { margin-bottom: 0; }

/* Header row: package names; stays visible while scrolling the (long) table on the front end */
.vft-head .wp-block-column { text-align: center; }
.vft-head .wp-block-column:first-child { background: var(--wp--preset--color--senary); }
.vft-head p { margin: 0; }
body:not(.editor-styles-wrapper) .vft-head {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 5;
}

/* Section rows */
.vft-section { padding: 1em 1em .7em; border-right: 1px solid var(--vft-line); border-bottom: 1px solid var(--vft-line); }
.vft-section h3 { margin: 0; font-weight: 700; }

/* Package columns: faint tint of the header colour */
.vft-mark { text-align: center; }
.vft-mark p { margin: 0; font-weight: 700; line-height: 1.2; }
.vft-mark.vft-col-1 { background: color-mix(in srgb, var(--wp--preset--color--tertiary) 22%, var(--wp--preset--color--senary)); }
.vft-mark.vft-col-2 { background: color-mix(in srgb, var(--wp--preset--color--primary) 22%, var(--wp--preset--color--senary)); }
.vft-mark.vft-col-3 { background: color-mix(in srgb, var(--wp--preset--color--secondary) 40%, var(--wp--preset--color--senary)); }

/* Feature title = the toggle (core Details block) */
.vft-details { margin: 0; }
.vft-details summary { font-weight: 700; cursor: pointer; }
.vft-details summary + * { margin-top: .8em; }
.vft-details p { margin-block: .4em; }
.vft-details .wp-block-media-text { gap: 1em; }
.vft-details .wp-block-media-text__content { padding: 0; }
.vft-details .wp-block-media-text__media img { border: 1px solid var(--vft-line); border-radius: 6px; }
.vft-details ul { margin: .3em 0 .6em 1.2em; padding: 0; }
.vft-note { opacity: .85; }
.vft-price p { margin-block: 0; }
.vft-price .vft-note { margin-top: .4em; }

/* Front end only: replace the browser's triangle with a chevron (the editor keeps its own UI) */
body:not(.editor-styles-wrapper) .vft-details summary {
	display: flex;
	gap: .65em;
	align-items: baseline;
	list-style: none;
}
body:not(.editor-styles-wrapper) .vft-details summary::-webkit-details-marker { display: none; }
body:not(.editor-styles-wrapper) .vft-details summary::before {
	content: "";
	flex: none;
	width: .5em;
	height: .5em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s ease;
}
body:not(.editor-styles-wrapper) .vft-details[open] > summary::before { transform: rotate(45deg) translate(-.1em, -.1em); }
.vft-details summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.vft-details summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* Small screens: columns stay side by side, just tighter */
@media (max-width: 640px) {
	.vft .wp-block-column { padding: .6em .5em; }
	.vft-head p { font-size: .62rem !important; }
	.vft-mark p { font-size: 1.1rem !important; }
	.vft-price .vft-mark p { font-size: .7rem !important; }
	.vft-section { padding-inline: .5em; }
	body:not(.editor-styles-wrapper) .vft-head { position: static; }
}
@media (prefers-reduced-motion: reduce) {
	body:not(.editor-styles-wrapper) .vft-details summary::before { transition: none; }
}

/* Footer link lists: plain List blocks (editable in the editor) styled like menus */
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 .5em; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { text-decoration: underline; text-underline-offset: .2em; }

/* MailPoet signup button: Tove's "shaded" button look. Colours, border, radius and weight come from the
   form's own button settings (MailPoet writes them inline); the offset shadow is the part MailPoet cannot set. */
.mailpoet_form .mailpoet_submit {
	box-shadow: var(--wp--custom--shaded-style--box-shadow--x) var(--wp--custom--shaded-style--box-shadow--y) var(--wp--custom--shaded-style--box-shadow--blur) currentColor;
	font-family: inherit;
	line-height: var(--wp--custom--typography--line-height--heading);
	cursor: pointer;
}

/* Ultimate Multisite thank-you page: order ID / e-mail / total row. Columns could not shrink, so the long e-mail ran into the total. */
#wu-thank-you-element .wu-thank-you-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1.25rem 1.5rem;
}

#wu-thank-you-element .wu-thank-you-info > li {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) img {
	display: block;
	width: 6rem;
	height: auto;
}

/* Ultimate Multisite thank-you / account page: site card. Thumbnail left, title + URL beside it, action links in a row below
   (the default flex row squeezed the title next to the links and the icons overlapped the text). */
#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) > .wu-flex-shrink-0:first-child {
	margin: 0;
}

#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) > .wu-flex-grow {
	flex: 1 1 12rem;
	min-width: 0;
}

#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) > .wu-flex-shrink-0:last-child {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#wu-sites div.wu-bg-gray-100:has(> .wu-flex-grow) > .wu-flex-shrink-0:last-child > a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	white-space: nowrap;
}

#wu-sites .wu-flex-grow h5 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
	margin: 0 0 0.25rem;
}

#wu-sites .wu-flex-grow .wu-truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
