/* Keyboard focus for GMS pages (WCAG 2.4.7, and 1.4.11 for the focus state).
   Bootstrap, custom.css, and custom-sms.css drop the browser ring and leave a #66afe9 glow.
   That blue is about 2.4:1 on white, under the 3:1 non-text contrast minimum.
   The first outline is the Firefox fallback; Firefox ignores -webkit-focus-ring-color. */

input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="url"]:focus-visible,
input[type="time"]:focus-visible,
input[type="date"]:focus-visible,
input[type="search"]:focus-visible,
input[type="file"]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.form-control:focus-visible,
.btn:focus-visible,
.btn:active:focus-visible,
.btn-danger:focus-visible,
.btn-danger:active:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-toggle:active:focus-visible,
.navbar-toggle:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 2px solid Highlight;
	outline: -webkit-focus-ring-color auto 1px;
	outline-offset: 2px;
	/* custom.css paints a #66afe9 glow on :focus. That blue is about 2.4:1 on white, so it is not the indicator. */
	box-shadow: none;
}

/* The real checkbox, radio, and select are covered by the jcf wrapper.
   jcf adds .jcf-focus to that wrapper while the control has focus. */
.jcf-checkbox.jcf-focus,
.jcf-radio.jcf-focus,
.jcf-select.jcf-focus,
.select2-container-active .select2-choice,
.select2-container-active .select2-choices,
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
	outline: 2px solid Highlight;
	outline: -webkit-focus-ring-color auto 1px;
	outline-offset: 2px;
	box-shadow: none;
}

/* The select text is taller than the 36px border-box, and the auto ring would bulge to include it.
   Clip the text only. overflow:hidden on the wrapper also clips .jcf-select-drop (top: 100%) while the control is focused. */
.jcf-select.jcf-focus {
	overflow: visible;
}
.jcf-select.jcf-focus .jcf-select-text {
	max-height: 100%;
	overflow: hidden;
}

/* Bootstrap removes the outline on .carousel-control:focus. The arrows are transparent strips, so draw the ring inside them. */
.carousel-control:focus-visible {
	outline: 2px solid Highlight;
	outline: -webkit-focus-ring-color auto 5px;
	outline-offset: -6px;
}
