/*
 * Site footer (inc/Footer.php), in the order of the live site:
 *   .pg-footer-visit   band "Kde nás nájdete" (.pg-section--dark): text, hours, map button, map image
 *   .pg-map            the map of Google in place of the map image (Map::box(), map.js), also on the page Kontakt
 *   (slot pg_footer_newsletter for T21)
 *   .pg-footer__main   footer on beige: brand column, three menu columns, legal links, payment icons
 * Tokens and components only. Colours come from the colour roles of the section tone (tokens.css,
 * layout.css), so every part reads on beige and on dark green alike (test-paticka.mjs measures it).
 */

/* ---------- Band: Kde nás nájdete ---------- */

.pg-footer-visit__inner { align-items: center; }
.pg-footer-visit__text { max-width: var(--pg-measure); }

.pg-footer-visit__hours {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: var(--pg-space-4) var(--pg-space-16);
}

.pg-footer-visit__hours > div { display: contents; }
.pg-footer-visit__hours dt { font-weight: var(--pg-fw-bold); }

.pg-footer-visit__map { display: block; }
.pg-footer-visit__map img { width: 100%; }

/* ---------- Map of Google (Map::box(), assets/js/map.js; zadanie 8) ----------
   The static map (the image of the admin, or without one a box of --pg-map-ratio with the pin) keeps the size; the map
   of Google is painted over it and shown only when its tiles are there (data-pg-map-status="ready"), so nothing moves.
   A refused key, no script or no JavaScript: the static map stays. Also the page Kontakt (footer.css is on every page
   with the footer). */
.pg-map { position: relative; display: block; overflow: hidden; }
.pg-map__static { display: block; }
.pg-map__static img { display: block; width: 100%; }

.pg-map--bare .pg-map__static {
	display: grid;
	place-items: center;
	aspect-ratio: var(--pg-map-ratio);
	background: var(--pg-surface-light);
	color: var(--pg-accent);
}

.pg-map__pin { width: var(--pg-space-48); height: var(--pg-space-48); }

.pg-map__canvas {
	position: absolute;
	inset: 0;
	visibility: hidden;
	background: var(--pg-surface-light);
	color: var(--pg-text); /* the controls and texts of Google on the dark band */
}

/* Inside the map of Google the global rules of the theme (base.css) do not apply: its controls, the pin and the links of
   its terms are drawn by Google, max-width: 100 % and display: block deform them (skeptik 8, web 2). */
.pg-map__canvas :is(img, picture, svg, video, canvas) { display: revert; max-width: none; height: revert; }
.pg-map__canvas a,
.pg-map__canvas a:hover { color: revert; text-decoration-thickness: revert; text-underline-offset: revert; transition: none; }
.pg-map__canvas :focus-visible { outline: revert; outline-offset: revert; }

.pg-map[data-pg-map-status="ready"] .pg-map__canvas { visibility: visible; }
.pg-map[data-pg-map-status="ready"] .pg-map__static { visibility: hidden; }

/* ---------- Footer ---------- */

.pg-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
	gap: var(--pg-section-pad) var(--pg-gap-grid);
	align-items: start;
}

/* The bottom row ends the page: as on the live site, no full section padding under it. */
.pg-footer__main { padding-block-end: var(--pg-gap-head); }

.pg-footer__brand { align-items: flex-start; }
.pg-footer__brand .pg-logo img { max-height: var(--pg-footer-logo); }
.pg-footer__about { max-width: var(--pg-measure); }

/* Column titles in the text colour of the tone, as on the live footer (the eyebrow is green elsewhere). */
.pg-footer__col .pg-eyebrow { color: inherit; }

.pg-footer__contact { font-style: normal; }

.pg-footer__contact-list,
.pg-footer__menu {
	display: flex;
	flex-direction: column;
	gap: var(--pg-footer-list-gap, var(--pg-gap-el));
}

.pg-footer__menu { --pg-footer-list-gap: var(--pg-space-8); } /* 34 px per line, the live footer has 33 */

.pg-footer__contact-item {
	display: inline-flex;
	align-items: flex-start;
	gap: var(--pg-space-12);
}

.pg-footer__icon {
	flex: none;
	width: var(--pg-space-24);
	height: var(--pg-space-24);
}

/* The social networks as icons (zadanie 10, bod 13): a round target of 44 px (WCAG 2.5.5 as the share links), the icon in
   the colour of the text of the footer (3:1 at least), the green of the tone on hover; the first icon starts where the
   text above starts. */
.pg-footer__social {
	--pg-cluster-gap: var(--pg-space-4);
	margin-inline-start: calc((var(--pg-space-24) - var(--pg-share-target)) / 2);
}

.pg-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: var(--pg-share-target);
	block-size: var(--pg-share-target);
	border-radius: var(--pg-radius-pill);
	color: inherit;
	transition: color var(--pg-dur-fast) var(--pg-ease), background-color var(--pg-dur-fast) var(--pg-ease);
}

.pg-footer__social-link:hover,
.pg-footer__social-link:focus-visible {
	color: var(--pg-accent-text-hover);
	background: var(--pg-white);
}

.pg-footer__social-link svg {
	inline-size: var(--pg-space-24);
	block-size: var(--pg-space-24);
}

/* Links of the footer: text colour of the tone, underline and the green of the tone on hover, faded in
   (the links of base.css: the line is there in a transparent colour). */
.pg-footer__contact a,
.pg-footer__menu a,
.pg-footer__legal-menu a,
.pg-footer__note a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: transparent;
}

.pg-footer__contact a:hover,
.pg-footer__menu a:hover,
.pg-footer__legal-menu a:hover,
.pg-footer__note a:hover {
	color: var(--pg-accent-text-hover);
	text-decoration-color: currentColor;
}

/* A whole line high (26 px), above the 24 px target size of WCAG 2.2. */
.pg-footer__menu a,
.pg-footer__legal-menu a { display: inline-block; }

.pg-footer__note a { text-decoration-color: currentColor; }

/* ---------- The menus as accordions on a phone (zadanie 11, pripomienka 11; assets/js/footer.js) ----------
   The script builds the button in the title and marks the grid (.is-accordion) up to 767 px only, so nothing here
   touches a desktop or a page without JavaScript (plain titles, every list open). A row per menu between lines in the
   colour of the divider of the footer, the title with a chevron that turns, the list unrolls (expand.js). The gap of
   the column moves into the padding of the list: it closes with the list, nothing jumps at the end. */
.pg-footer__grid.is-accordion { row-gap: 0; }
.pg-footer__grid.is-accordion > .pg-footer__brand { margin-block-end: var(--pg-gap-head); }

.pg-footer__grid.is-accordion > .pg-footer__col {
	--pg-stack-gap: 0;
	border-block-start: 1px solid var(--pg-muted);
}

.pg-footer__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pg-space-16);
	width: 100%;
	min-height: var(--pg-control-h);
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-align: start;
	cursor: pointer;
}

.pg-footer__chevron {
	flex: none;
	width: var(--pg-space-24);
	height: var(--pg-space-24);
	transition: transform var(--pg-dur-expand) var(--pg-ease-expand);
}

.pg-footer__toggle[aria-expanded="true"] .pg-footer__chevron { transform: rotate(180deg); }
.pg-footer__grid.is-accordion .pg-footer__menu { padding-block-end: var(--pg-space-16); }

/* Divider from edge to edge, the row on the content track. */
.pg-footer__bottom {
	padding-block-start: var(--pg-gap-block);
	border-top: 1px solid var(--pg-muted);
}

.pg-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--pg-gap-block);
}

.pg-footer__legal-menu {
	--pg-cluster-gap: var(--pg-space-8) var(--pg-space-20);
	justify-content: flex-end;
}

.pg-footer__pay { --pg-cluster-gap: var(--pg-space-8); }
.pg-footer__pay img { width: auto; height: var(--pg-space-32); }

.pg-footer__note {
	padding: var(--pg-space-12) var(--pg-space-16);
	border: 1px dashed currentColor;
	font-size: var(--pg-text-s);
}

@media (max-width: 1024px) {
	.pg-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pg-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
	.pg-footer-visit__btn { width: 100%; }
	.pg-footer__grid { grid-template-columns: minmax(0, 1fr); }
	.pg-footer__bottom-inner { align-items: flex-start; }
	.pg-footer__legal-menu {
		flex-direction: column;
		align-items: flex-start;
		--pg-cluster-gap: var(--pg-gap-el);
	}
}
