/*
Theme Name:   ASG Nashville (Hello Elementor Child)
Theme URI:    https://www.asg-nashville.org/
Description:  Child theme of Hello Elementor for the American Sewing Guild Nashville Chapter. Colors, fonts and buttons are managed in Elementor Site Settings and global classes — this theme only holds small site-wide tweaks that survive Hello Elementor updates.
Author:       WebTechsNow!
Author URI:   https://webtechsnow.com
Template:     hello-elementor
Version:      1.0.4
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  asg-nashville-child
*/

/* ------------------------------------------------------------------
 * Site-wide CSS tweaks go below.
 *
 * Prefer Elementor first (Site Settings, global classes, variables) so
 * colors and fonts stay editable in one place. Use this file only for
 * things Elementor can't reach — e.g. plugin output or theme markup.
 * Use the site's color/font variables so changes in Site Settings
 * carry through, e.g. color: var(--color-primary);
 * ------------------------------------------------------------------ */

/* Cream page background everywhere (matches the Home page), so pages
   built outside Elementor — group pages, spotlight archives, event
   pages — don't show a white background. */
body {
	background-color: var(--color-cream, #F8F4EB);
}


/* ------------------------------------------------------------------
 * 1. Small phones (320 px): keep the header inside the screen
 *
 * At 320 px the logo-and-title block would not shrink, so the menu
 * column was squeezed to nothing and the hamburger button hung about
 * ten pixels off the right edge — which made every page scroll
 * sideways. These rules let the title block shrink and wrap, hold the
 * hamburger at its own width, and cap the logo at the same 64 px the
 * other pages already use on a phone.
 *
 * Only applies at 360 px and below. Nothing changes at 375 px or wider.
 * ------------------------------------------------------------------ */
@media (max-width: 360px) {

	/* Flex children default to min-width:auto, which stops them
	   shrinking below their content. Zero lets them give way. */
	.elementor-location-header .e-con,
	.elementor-location-header a {
		min-width: 0;
	}

	/* The logo + chapter name block: allow it to shrink. */
	.elementor-location-header .e-con > .e-con:first-child {
		width: auto !important;
		max-width: 100%;
		flex: 0 1 auto;
	}

	/* The menu column keeps exactly the width the hamburger needs. */
	.elementor-location-header .elementor-widget-nav-menu {
		flex: 0 0 auto;
	}

	/* Two pages (About Our Chapter, How to Join) serve the logo at
	   300 px instead of the usual 64 px on a phone. This cap keeps the
	   header the same on every page until that is sorted out in
	   Elementor. */
	.elementor-location-header img {
		max-width: 64px;
		height: auto;
	}

	/* Let the chapter name wrap rather than run off the edge. */
	.elementor-location-header p {
		white-space: normal;
		overflow-wrap: break-word;
	}
}


/* ------------------------------------------------------------------
 * 2. Long buttons wrap instead of pushing the page sideways
 *
 * The green "Chapter Advisory Board →" button on Contact Us is set to
 * one unbroken line, which made it 308 px wide inside a 288 px column.
 * This can also be set on the .btn global class in Elementor, which
 * would be the tidier home for it — this rule is the safety net.
 * ------------------------------------------------------------------ */
.elementor .btn {
	max-width: 100%;
	box-sizing: border-box;
}

@media (max-width: 480px) {
	.elementor .btn {
		white-space: normal;
	}
}


/* ------------------------------------------------------------------
 * 3. Visible keyboard focus on the Ultimate Member forms
 *
 * Ultimate Member's own stylesheets remove the focus ring with
 * !important on Login, Password Reset, Account and the member profile,
 * so someone using the keyboard cannot see which field they are in.
 * These rules put a ring back.
 *
 * This draws a ring AROUND the field. It does not touch the field's
 * background, border or text color — nothing turns beige.
 *
 * :focus-visible means the ring appears for keyboard users and not on
 * an ordinary mouse click.
 *
 * The color comes from --color-focus if that variable is ever added in
 * Elementor → Site Settings → Variables. The fallback, #767676, is a
 * mid gray that reads as gray but still meets the 3:1 minimum a focus
 * indicator needs (4.5:1 on white, 4.1:1 on the cream background).
 * A very light gray such as #D9D9D9 only reaches 1.4:1 and would be
 * invisible to the people who need it.
 * ------------------------------------------------------------------ */
.um a:focus-visible,
.um input:focus-visible,
.um select:focus-visible,
.um textarea:focus-visible,
.um button:focus-visible,
.um-form a:focus-visible,
.um-form input:focus-visible,
.um-form select:focus-visible,
.um-form textarea:focus-visible,
.um-account a:focus-visible,
.um-modal a:focus-visible,
.um input[type="submit"]:focus-visible {
	outline: 2px solid var(--color-focus, #767676) !important;
	outline-offset: 2px !important;
}


/* ------------------------------------------------------------------
 * 4. Make the "Skip to content" link visible when it is focused
 *
 * The link is the first thing a keyboard user reaches, but it stays
 * 1 px by 1 px even when focused, so it cannot be seen or understood.
 * When focused it now appears as a normal link at the top left.
 * ------------------------------------------------------------------ */
.skip-link:focus,
.skip-link:focus-visible {
	position: absolute !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto !important;
	height: auto !important;
	clip: auto !important;
	clip-path: none !important;
	padding: 12px 20px;
	background: var(--color-cream, #F8F4EB);
	color: var(--color-primary, #34545E);
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	outline: 2px solid var(--color-focus, #767676);
	outline-offset: 2px;
}


/* ------------------------------------------------------------------
 * 5. Footer text links stay legible on the dark footer band
 *
 * Site Settings styles any link inside a paragraph with --color-link,
 * a mid teal. Against the footer's dark band that lands at about
 * 1.4:1 contrast - effectively invisible. The Privacy Policy link sits
 * inside the copyright paragraph, so it is caught by that rule.
 *
 * The kit's selector is specific enough that nothing settable on the
 * widget itself wins, which is why !important is needed here.
 *
 * Scoped to the footer, so links everywhere else keep --color-link.
 * ------------------------------------------------------------------ */
.elementor-location-footer .e-paragraph-base a,
.elementor-location-footer a.e-paragraph-link-base {
	color: var(--color-white, #FFFFFF) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.elementor-location-footer .e-paragraph-base a:hover,
.elementor-location-footer .e-paragraph-base a:focus-visible,
.elementor-location-footer a.e-paragraph-link-base:hover,
.elementor-location-footer a.e-paragraph-link-base:focus-visible {
	color: var(--color-white, #FFFFFF) !important;
	opacity: 1;
}
