/* Phones only (issues #341, #342): an expand button and a legend button on the small map at the top of each Taiao page. Desktop is unchanged. Script: taiao-map-buttons.js. */
.mt-expand, .mt-keymodal { display: none; }
@media (max-width: 768px) {
	.js-init-map:not(.c-mapbox--full-screen) .mt-expand { display: flex; position: absolute; top: .75rem; right: .75rem; z-index: 1001; visibility: visible; pointer-events: auto; padding: .25rem; background: #fff; border-radius: .5rem; }
	.mt-expand .c-map-box__toolbar-item { cursor: pointer; }
	.js-init-map:not(.c-mapbox--full-screen) .c-mapbox__toolbar { visibility: visible; pointer-events: auto; top: 4.25rem; bottom: auto; right: .75rem; }
	.js-init-map:not(.c-mapbox--full-screen) .c-mapbox__toolbar > :not(.js-map-toolbar__key-trigger) { display: none; }
	.js-init-map:not(.c-mapbox--full-screen) .c-mapbox__popup-container { display: none !important; }
	.mt-keymodal { display: block; position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.45); visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
	.mt-keymodal__panel { position: absolute; left: 0; right: 0; bottom: 0; height: 60vh; max-height: 60vh; display: flex; flex-direction: column; background: #fff; border-radius: 1rem 1rem 0 0; box-shadow: 0 -4px 16px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .25s; }
	.mt-keymodal.open .mt-keymodal__panel { transform: none; }
	.mt-keymodal.open { visibility: visible; opacity: 1; }
	body.mt-keymodal-open { overflow: hidden; }
	.mt-keymodal__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1.25rem; border-bottom: 1px solid #e3ebec; flex: none; }
	.mt-keymodal__list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .875rem; padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); font-size: 1rem; }
	.mt-keymodal__list .c-mapbox__popup__item { display: flex; align-items: center; gap: .75rem; }
	.mt-keymodal__list .c-mapbox__popup__item > span:first-child { width: 1.25rem; height: 1.25rem; min-width: 1.25rem; border-radius: 50%; flex: none; border: 1px solid #c6d7da; }
	.mt-keymodal__list .c-mapbox__popup__item > span { white-space: normal; }
}

/* Taiao pages opened from step 2 (issue #426). taiao-next.js sets html.mt-taiao-step2 for a page opened with ?p and not id=1210, and both classes when step 2 or the results page shows it in the large window (taiao-dialog.js, issue #493). Not for sharing: no site footer and no "Copy page link" (Print stays). In the large window there is no site header either. The results-page version outside the window has neither class. */
html.mt-taiao-step2 .o-main-layout__footer, html.mt-taiao-step2 .js-share-url { display: none; }
/* The "Share" heading goes too: only Print is left. Its div has .u-flex, which sets display with !important. */
html.mt-taiao-step2 [data-module-name="shareModule"] section > div:first-child { display: none !important; }
html.mt-taiao-dialog .o-main-layout__header, html.mt-taiao-dialog .c-mobile-menu { display: none; }
html.mt-taiao-dialog { --header-height: 0px; }
html.mt-taiao-dialog .c-mapbox__sticky, html.mt-taiao-dialog .c-sticky-nav--sticky { top: 0; }
@media (min-height: 801px) { html.mt-taiao-dialog .c-sticky-nav--has-map { top: 18.75rem; } }

/* Three buttons in the bar on a phone (issues #420, #493): trim the button padding so Open full map, Print and Back fit from 360 px. */
@media (max-width: 480px) {
	.c-bottom-nav.mt-taiao-bar .c-cta--bottom-nav svg { padding-left: .5rem; padding-right: .5rem; }
	.c-bottom-nav.mt-taiao-bar .c-cta--bottom-nav span:not(.c-badge) { padding-left: .5rem; padding-right: .5rem; }
}
/* Taiao pages from the tool (issue #493): Print sits in the bottom bar, so the Share block's own
   Print button goes. The site's Print code still uses that button and shows its "Your PDF is
   processing" popup from the Share block, so the popup is fixed to the screen: above the bar on
   a desktop, in the middle on a phone. */
html.mt-taiao-print-in-bar #downloadTaiaoPdfButton { display: none !important; }
html.mt-taiao-tool [data-module-name="shareModule"] .c-popup__wrapper { position: fixed; bottom: 4.125rem; z-index: 9998; }
@media (max-width: 768px) { html.mt-taiao-tool [data-module-name="shareModule"] .c-popup__wrapper { bottom: auto; } }
/* Step 2 views have nothing left in the Share block: it shrinks to nothing, the popup stays. */
html.mt-taiao-step2 [data-module-name="shareModule"] section { height: 0; padding: 0 !important; }
html.mt-taiao-step2 [data-module-name="shareModule"] section > div:not(.c-popup__wrapper) { display: none !important; }
html.mt-taiao-tool .c-cta--bottom-nav[disabled] { opacity: .5; cursor: default; animation: none; }
