/*
 * Blue Ridge Mobile Experience
 * All rules are scoped to the plugin's runtime classes.
 * JavaScript activates them only at the configured breakpoint.
 */

.brf-mobile-shell[hidden] {
	display: none !important;
}

.brf-mobile-shell {
	box-sizing: border-box;
	position: sticky;
	top: 0;
	z-index: 9990;
	width: 100%;
	background: #e6e6e6;
	color: #222;
	border-bottom: 1px solid #c8c8c8;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	font-family: Arial, Helvetica, sans-serif;
}

body.admin-bar .brf-mobile-shell {
	top: 46px;
}

.brf-mobile-shell *,
.brf-mobile-shell *::before,
.brf-mobile-shell *::after {
	box-sizing: border-box;
}

.brf-mobile-shell .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.brf-mobile-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 64px;
	padding: 0.4rem 0.65rem;
}

.brf-mobile-logo-link {
	display: inline-flex;
	align-items: center;
	align-self: stretch;
	min-width: 0;
	max-width: 46%;
	padding: 0.15rem;
	border-radius: 4px;
}

.brf-mobile-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: 54px;
	object-fit: contain;
}

.brf-mobile-contact {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: column;
	align-items: flex-end;
	font-size: 0.78rem;
	line-height: 1.3;
}

.brf-mobile-header-text {
	overflow: hidden;
	max-width: 100%;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brf-mobile-phone {
	font-weight: 700;
	color: #222;
	text-decoration: none;
}

.brf-mobile-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.3rem;
}

.brf-mobile-menu-toggle,
.brf-mobile-search-toggle,
.brf-mobile-submenu-toggle,
.brf-mobile-search-form button {
	min-width: 44px;
	min-height: 44px;
	border: 1px solid #777;
	border-radius: 4px;
	background: #fff;
	color: #222;
	font: inherit;
	cursor: pointer;
}

.brf-mobile-menu-toggle,
.brf-mobile-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem;
}

.brf-mobile-search-toggle svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.brf-mobile-menu-icon {
	display: flex;
	width: 24px;
	height: 20px;
	flex-direction: column;
	justify-content: space-between;
}

.brf-mobile-menu-icon span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.brf-mobile-menu-toggle[aria-expanded="true"] .brf-mobile-menu-icon span:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}

.brf-mobile-menu-toggle[aria-expanded="true"] .brf-mobile-menu-icon span:nth-child(2) {
	opacity: 0;
}

.brf-mobile-menu-toggle[aria-expanded="true"] .brf-mobile-menu-icon span:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}

.brf-mobile-menu-panel,
.brf-mobile-search-panel {
	width: 100%;
	max-height: calc(100vh - 64px);
	overflow: auto;
	overscroll-behavior: contain;
	background: #393939;
	color: #fff;
}

.brf-mobile-search-panel {
	padding: 0.8rem;
}

.brf-mobile-search-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 700;
	color: #fff;
}

.brf-mobile-search-row {
	display: flex;
	gap: 0.4rem;
}

.brf-mobile-search-row input[type="search"] {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 0.55rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	font-size: 16px;
}

.brf-mobile-search-form button {
	flex: 0 0 auto;
	padding: 0.55rem 0.8rem;
}

.brf-mobile-nav,
.brf-mobile-nav ul,
.brf-mobile-nav li {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	position: static !important;
	transform: none !important;
}

.brf-mobile-nav {
	display: block !important;
	background: #393939 !important;
	box-shadow: none !important;
}

.brf-mobile-nav ul {
	display: block !important;
	background: transparent !important;
}

.brf-mobile-nav ul[hidden] {
	display: none !important;
}

.brf-mobile-nav li {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	border: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
	background: transparent !important;
}

.brf-mobile-nav li > a {
	display: flex !important;
	align-items: center;
	min-height: 48px;
	padding: 0.75rem 0.9rem !important;
	border: 0 !important;
	background: transparent !important;
	color: #fff !important;
	font: 600 1rem/1.35 Arial, Helvetica, sans-serif !important;
	text-align: left !important;
	text-decoration: none !important;
	text-shadow: none !important;
	box-shadow: none !important;
}

.brf-mobile-nav li > a:hover,
.brf-mobile-nav li > a:focus,
.brf-mobile-nav .current-menu-item > a,
.brf-mobile-nav .current_page_item > a {
	background: #202020 !important;
	color: #fff !important;
}

.brf-mobile-submenu-toggle {
	align-self: stretch;
	min-width: 48px;
	border: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 0;
	background: transparent;
	color: #fff;
}

.brf-mobile-submenu-toggle span::before {
	content: "+";
	font-size: 1.5rem;
	line-height: 1;
}

.brf-mobile-submenu-toggle[aria-expanded="true"] span::before {
	content: "−";
}

.brf-mobile-nav li > ul {
	grid-column: 1 / -1;
	padding-left: 0.85rem !important;
	background: #2b2b2b !important;
}

.brf-mobile-shell button:focus-visible,
.brf-mobile-shell a:focus-visible,
.brf-mobile-shell input:focus-visible {
	outline: 3px solid #35c4ff !important;
	outline-offset: 2px !important;
}

html.brf-mobile-active,
body.brf-mobile-active {
	max-width: 100%;
	overflow-x: hidden;
	overflow-x: clip;
}

html.brf-mobile-active .brf-mobile-original-header {
	display: none !important;
}

/* Layout fixes are active only after the configured breakpoint matches. */
body.brf-mobile-active.brf-mobile-layout-fixes #wrapper,
body.brf-mobile-active.brf-mobile-layout-fixes .wrapper,
body.brf-mobile-active.brf-mobile-layout-fixes .col-full,
body.brf-mobile-active.brf-mobile-layout-fixes #content,
body.brf-mobile-active.brf-mobile-layout-fixes .content,
body.brf-mobile-active.brf-mobile-layout-fixes #main,
body.brf-mobile-active.brf-mobile-layout-fixes .main,
body.brf-mobile-active.brf-mobile-layout-fixes #sidebar,
body.brf-mobile-active.brf-mobile-layout-fixes .sidebar,
body.brf-mobile-active.brf-mobile-layout-fixes #footer,
body.brf-mobile-active.brf-mobile-layout-fixes #footer-widgets {
	box-sizing: border-box !important;
	width: auto !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes #wrapper,
body.brf-mobile-active.brf-mobile-layout-fixes .wrapper,
body.brf-mobile-active.brf-mobile-layout-fixes .col-full,
body.brf-mobile-active.brf-mobile-layout-fixes #content {
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding-right: max(14px, env(safe-area-inset-right)) !important;
	padding-left: max(14px, env(safe-area-inset-left)) !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes #main,
body.brf-mobile-active.brf-mobile-layout-fixes .main,
body.brf-mobile-active.brf-mobile-layout-fixes #sidebar,
body.brf-mobile-active.brf-mobile-layout-fixes .sidebar,
body.brf-mobile-active.brf-mobile-layout-fixes .col-left,
body.brf-mobile-active.brf-mobile-layout-fixes .col-right,
body.brf-mobile-active.brf-mobile-layout-fixes .footer-widget-1,
body.brf-mobile-active.brf-mobile-layout-fixes .footer-widget-2,
body.brf-mobile-active.brf-mobile-layout-fixes .footer-widget-3,
body.brf-mobile-active.brf-mobile-layout-fixes .footer-widget-4 {
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes img,
body.brf-mobile-active.brf-mobile-layout-fixes video,
body.brf-mobile-active.brf-mobile-layout-fixes canvas,
body.brf-mobile-active.brf-mobile-layout-fixes svg {
	max-width: 100%;
	height: auto;
}

body.brf-mobile-active.brf-mobile-layout-fixes iframe,
body.brf-mobile-active.brf-mobile-layout-fixes embed,
body.brf-mobile-active.brf-mobile-layout-fixes object {
	max-width: 100% !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes figure,
body.brf-mobile-active.brf-mobile-layout-fixes .wp-caption,
body.brf-mobile-active.brf-mobile-layout-fixes .gallery,
body.brf-mobile-active.brf-mobile-layout-fixes .wp-block-image,
body.brf-mobile-active.brf-mobile-layout-fixes .wp-block-embed,
body.brf-mobile-active.brf-mobile-layout-fixes .wp-block-video,
body.brf-mobile-active.brf-mobile-layout-fixes .fl-module-content,
body.brf-mobile-active.brf-mobile-layout-fixes .fl-row-content,
body.brf-mobile-active.brf-mobile-layout-fixes .fl-col-content {
	max-width: 100% !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes table {
	display: block;
	width: 100% !important;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-collapse: collapse;
}

body.brf-mobile-active.brf-mobile-layout-fixes pre,
body.brf-mobile-active.brf-mobile-layout-fixes code {
	max-width: 100%;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

body.brf-mobile-active.brf-mobile-layout-fixes input,
body.brf-mobile-active.brf-mobile-layout-fixes select,
body.brf-mobile-active.brf-mobile-layout-fixes textarea,
body.brf-mobile-active.brf-mobile-layout-fixes button {
	max-width: 100%;
}

body.brf-mobile-active.brf-mobile-layout-fixes .wooslider,
body.brf-mobile-active.brf-mobile-layout-fixes .flexslider,
body.brf-mobile-active.brf-mobile-layout-fixes .slides,
body.brf-mobile-active.brf-mobile-layout-fixes .slide,
body.brf-mobile-active.brf-mobile-layout-fixes .addtoany_share_save_container {
	max-width: 100% !important;
}

body.brf-mobile-active.brf-mobile-layout-fixes .addtoany_list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* Gravity Forms: presentation only; no data, validation, or event hooks are changed. */
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper form,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gform_fields,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gfield,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .ginput_container {
	max-width: 100% !important;
	min-width: 0 !important;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gform_fields {
	grid-template-columns: minmax(0, 1fr) !important;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gfield,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper [class*="gfield--width-"] {
	grid-column: 1 / -1 !important;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper select,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper textarea {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 44px;
	font-size: 16px;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .ginput_complex,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gform_footer,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gform_page_footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .ginput_complex > span {
	flex: 1 1 100%;
	min-width: 0;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper input[type="submit"],
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper input[type="button"],
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper button {
	min-height: 44px;
	padding: 0.65rem 1rem;
}

body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gfield_validation_message,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .validation_message,
body.brf-mobile-active.brf-mobile-gform-fixes .gform_wrapper .gform_validation_errors {
	overflow-wrap: anywhere;
}

/* The Events Calendar: retain plugin routing, data, and schema; fix only layout. */
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-single,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-common,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events .tribe-events-l-container {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

body.brf-mobile-active.brf-mobile-events-fixes .tribe-events .tribe-events-l-container {
	padding-right: 0 !important;
	padding-left: 0 !important;
}

body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-sub-nav,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-c-nav__list,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-single-event-description,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-event-meta {
	max-width: 100%;
	min-width: 0;
}

body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-sub-nav,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-c-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-event-meta,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-meta-group {
	float: none !important;
	width: 100% !important;
}

body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-venue-map,
body.brf-mobile-active.brf-mobile-events-fixes .tribe-events-venue-map iframe {
	max-width: 100% !important;
}

@media (min-width: 783px) {
	body.admin-bar .brf-mobile-shell {
		top: 32px;
	}
}

@media (max-width: 420px) {
	.brf-mobile-bar {
		gap: 0.3rem;
		padding-right: 0.4rem;
		padding-left: 0.4rem;
	}

	.brf-mobile-logo-link {
		max-width: 42%;
	}

	.brf-mobile-contact {
		display: none;
	}
}

@media (min-width: 1025px) {
	.brf-mobile-shell {
		display: none !important;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.brf-mobile-menu-icon span,
	.brf-mobile-submenu-toggle span::before {
		transition: transform 160ms ease, opacity 160ms ease;
	}
}
