/*
 * scs-overrides.css - hand-written corrections on top of the built child.css (which has no source
 * in this repository and must not be edited). Loaded by child_enqueue_styles() in
 * inc/child-functions.php. One rule per problem, each with its reason.
 */

/*
 * Dropdowns in Gravity Forms (Country, State, any select field): the text sat too low and was cut
 * off at the bottom of the box.
 * Why: child.css gives every <select> "padding: .5rem !important", which leaves 20px for the text
 * in the 38px box; Gravity Forms' own stylesheet sets the line height of a dropdown to the full
 * box height (38px) because it expects no vertical padding. 38px of line in 20px of room = the
 * text drops and is clipped. Text inputs are not affected (a browser centres their text itself).
 * Fix: a line height that fits the room the theme's padding leaves. Multi-selects and list boxes
 * keep Gravity Forms' values.
 */
.gform_wrapper.gform-theme--framework .gfield select:not([multiple]):not([size]) {
	line-height: 1.4 !important;
}

/*
 * Calendar pop-up of date inputs in Gravity Forms (jQuery UI datepicker, printed at the end of
 * <body>, so outside any form wrapper).
 * 1. "Previous" / "Next" showed as "Pr" / "Ne": the platform's base calendar style
 *    (mu-plugin scs-gf3-datepicker-compat) squeezes the label into a 1em box meant for an icon,
 *    and this theme supplies no icon. Fix: an arrow drawn in CSS; the label stays in the page for
 *    screen readers, visually hidden.
 * 2. The month and year dropdowns were cramped with the arrow drawn over the text: child.css pads
 *    every <select> with .5rem and puts its arrow at 98%. Fix: room on the right for the arrow.
 * 3. The pop-up used Arial (jQuery UI's default); it now uses the form's font.
 */
.ui-datepicker {
	font-family: "GT America", sans-serif !important;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	top: 10px;
	padding: 4px 10px;
	font-size: 22px;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}
.ui-datepicker .ui-datepicker-prev::before {
	content: "\2039";
}
.ui-datepicker .ui-datepicker-next::before {
	content: "\203A";
}
.ui-datepicker .ui-datepicker-prev .ui-icon,
.ui-datepicker .ui-datepicker-next .ui-icon {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
}
.ui-datepicker .ui-datepicker-title select {
	display: inline-block !important;
	width: auto !important;
	padding: 4px 24px 4px 8px !important;
	background-position: right 8px center !important;
	font-size: 14px;
	line-height: 1.4;
}
