/*
 * Theme layout the GeneratePress options cannot express: the tablet range and
 * the back-to-top button.
 *
 * TABLETS STACK THE SIDEBAR UP TO 1024px, AS PRODUCTION DOES
 * ---------------------------------------------------------------------------
 * Production puts the sidebar under the content up to 1024px and beside it from
 * 1025px. Mediavine's sidebar rail only loads from 1025px (`sidebar_minimum_width`
 * in the site's Mediavine settings), so 1024/1025 is the boundary to keep.
 * GeneratePress stacks at 768px instead: its static stylesheet
 * (`assets/css/main.min.css`) carries the stacking rules in a hard-coded
 * `@media (max-width:768px)`. The theme's `generate_media_queries` filter only
 * moves the media queries in its *dynamic* CSS (padding, mobile type, the
 * mobile menu) and cannot reach the static file, so the first block below
 * extends the theme's own stacking declarations, unchanged, to 769-1024px.
 * Left out, because no layout on this site uses them: the rules for two
 * sidebars, and `body:not(.no-sidebar) #main {margin-bottom: 0}`, whose margin
 * is already 0 here.
 *
 * The gutter in that range is production's 1.5rem (24px), the same value as the
 * theme's phone content padding (`mobile_content_left` / `mobile_content_right`,
 * 24). GeneratePress has no tablet padding option, so it is restated here; if the
 * phone padding option changes, change this with it. `ghs-measure.css` keeps
 * wide and full-width blocks flush with this column from 769px.
 *
 * BACK TO TOP
 * ---------------------------------------------------------------------------
 * GeneratePress's own `a.generate-back-to-top`, switched on in its options.
 * Colours come from the theme options (yellow, dark arrow; teal, light arrow on
 * hover). The theme hard-codes its position (bottom and right 30px), its 3px
 * corners and no border, shows it at every width, and has no option for any of
 * that, so:
 * - it sits 5rem (80px) up, production's height;
 * - 1rem (16px) in from the right, centred under the floating contents control
 *   (`ghs-toc.css`), which stacks above it;
 * - production's 7px corners and 2px ring in the arrow's colour, which on hover
 *   turns transparent so the teal background fills it, as production's does;
 * - hidden on phones, as production hides its own. The theme's `.hide-on-mobile`
 *   class does the same thing but cannot be put on this button without a PHP
 *   filter on the theme's markup.
 */

@media (min-width: 48.0625rem) and (max-width: 64rem) { /* 769px to 1024px */
	.site-content {
		flex-direction: column;
	}

	.container .site-content .content-area {
		width: auto;
	}

	.is-left-sidebar.sidebar,
	.is-right-sidebar.sidebar {
		width: auto;
		order: initial;
	}

	#main {
		margin-left: 0;
		margin-right: 0;
	}

	.one-container .site-content {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

.generate-back-to-top {
	right: 1rem;
	bottom: 5rem;
	border: 2px solid currentColor;
	border-radius: 7px;
}

.generate-back-to-top:is(:hover, :focus) {
	border-color: transparent;
}

@media (max-width: 48rem) { /* 768px */
	.generate-back-to-top {
		display: none;
	}
}
