/* Site specific fixes on top of the original theme styles. Loaded after every other stylesheet. */

/* Never allow sideways scrolling on phones (decorative shapes stick out of the viewport) */
#page { overflow-x: clip; }

/* Visually hidden page title (one <h1> per page for SEO and screen readers) */
.screen-reader-text:not(:focus) {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
	position: absolute !important; white-space: nowrap; word-wrap: normal !important;
}

/* ---------- Desktop dropdown menus ---------- */
.main-navigation ul > li.menu-item-has-children > ul.sub-menu { z-index: 1000; }
.main-navigation ul.sub-menu li a { white-space: nowrap; }
.main-navigation ul.sub-menu { min-width: 240px; }
/* the sticky header slides out while scrolling down: its open dropdown must go with it */
.cd-header.is-fixed:not(.is-visible) .main-navigation ul.sub-menu {
	visibility: hidden !important; opacity: 0 !important; transition: none !important;
}
/* keyboard users: open the dropdown while a link inside has focus */
.main-navigation ul > li.menu-item-has-children:focus-within > ul.sub-menu {
	opacity: 1; visibility: visible; transform: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 1024px) {
	/* chat buttons must not cover the open mobile menu / side panel */
	body.mmenu-active .ht-ctc,
	body.side-panel-active .ht-ctc { display: none !important; }
	.mmenu-wrapper { z-index: 2147483001; }
	.mmenu-wrapper .mobile_mainmenu a { word-break: normal; overflow-wrap: anywhere; }
}

@media (max-width: 767px) {
	/* help center article titles broke inside words at 36px uppercase */
	.betterdocs-entry-title,
	.docs-single-title .betterdocs-entry-title {
		font-size: 24px !important; line-height: 1.25 !important; letter-spacing: .3px !important;
		overflow-wrap: normal; word-break: normal; hyphens: auto;
	}
	.page-header .page-title { font-size: 30px; line-height: 1.2; overflow-wrap: normal; hyphens: auto; }
	/* long words / URLs inside article text */
	.betterdocs-content, .entry-content { overflow-wrap: anywhere; }
	.betterdocs-content img, .entry-content img { height: auto; max-width: 100%; }
	.betterdocs-content table, .entry-content table { display: block; max-width: 100%; overflow-x: auto; }
	/* comfortable tap targets */
	.mobile_mainmenu > li > a { padding-top: 12px; padding-bottom: 12px; }
	input, select, textarea { font-size: 16px !important; } /* prevents iOS zoom on focus */
}
