/*
 * Join page additions. join-business.css holds the site owner's manual tweaks and is
 * not edited; these rules load after it (handle bameshek-join-business-additions).
 */

/* The hero's H1: 40px at every width, on the join page and the Eshkol page only (body
   classes of their templates). It replaces join-business.css's clamp(40px, 5vw, 66px), which
   gave 66px on desktop and 40-50px between 801px and 1000px; at 800px and below the clamp
   was already 40px, so phones are unchanged. */
body.page-template-template-join-business-php .bms-join__hero h1,
body.page-template-template-join-eshkol-php .bms-join__hero h1 { font-size: 40px; }

/* The dedication's "במועצה אזורית אשכול בלבד" (bameshek_eshkol_dedication_text()). In the paid
   page's hero (green): bold yellow text. In the Eshkol intro card (white): bold, in the card's
   ink colour (the paragraph around it is the muted grey), no background. */
.bms-join__hero-copy > p[data-eshkol-dedication] .bms-join__dedication-highlight {
	font-weight: 700;
	color: #ffd500;
}
.bms-join__plan-selector > p .bms-join__dedication-highlight {
	font-weight: 700;
	color: var(--join-ink);
}

/* What the PRO card includes, above the frequency choice. The list itself uses the
   former plan cards' ✓ list (.bms-join__plan-option ul / li); only its spacing is set here. */
.bms-join__pro-includes { margin: 0 0 18px; }
.bms-join__pro-includes ul { margin: 0; }

/* The free-versus-PRO table on a phone (Eshkol page): its 680px min-width made the free and
   PRO columns scroll out of view. Below 700px (join-business.css's own breakpoint) it fits
   the screen: three columns, the ability column wider, tighter cells. Scoped to the table
   outside #registration: the hours editor in the form shares the bms-join__compare class
   and keeps its own mobile layout. */
@media (max-width: 700px) {
	.bms-join > .bms-join__section:not(#registration) .bms-join__compare { min-width: 0; table-layout: fixed; }
	.bms-join > .bms-join__section:not(#registration) .bms-join__compare th,
	.bms-join > .bms-join__section:not(#registration) .bms-join__compare td { padding: 12px 8px; font-size: 14px; overflow-wrap: anywhere; }
	.bms-join > .bms-join__section:not(#registration) .bms-join__compare th:first-child,
	.bms-join > .bms-join__section:not(#registration) .bms-join__compare td:first-child { width: 46%; padding-inline-start: 14px; }
}

/* Eshkol intro card: the link to the paid join page, styled as the form's privacy link
   (.bms-join__privacy a). */
.bms-join__plan-selector > p.bms-join__pro-link { margin: 0; color: var(--join-ink); font-weight: 700; }
.bms-join__pro-link a { color: var(--join-green-dark); text-decoration: underline; text-underline-offset: 3px; }

/*
 * The Eshkol settlement field as Select2, matched to the form's text fields
 * (.bms-join__field input: min-height 50px, padding 12px 14px, 1px #cbd6ce border,
 * radius 13px, white; on focus a green border and ring). Scoped to the join form: the
 * open list is rendered inside the form (dropdownParent), so no other Select2 on the
 * site changes.
 */
.bms-join__form .select2-container { font: inherit; }

.bms-join__form .select2-container--default .select2-selection--single {
	display: flex;
	align-items: center;
	height: auto;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid #cbd6ce;
	border-radius: 13px;
	outline: none;
	background: #fff;
}
.bms-join__form .select2-container--default .select2-selection--single .select2-selection__rendered {
	flex: 1 1 auto;
	padding: 0 0 0 24px;   /* room for the arrow, on the left in RTL */
	color: inherit;
	line-height: inherit;
	text-align: right;
}
/* The placeholder reads like the form's native selects ("בחירת תחום"), not greyed out. */
.bms-join__form .select2-container--default .select2-selection--single .select2-selection__placeholder { color: inherit; }
.bms-join__form .select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 0;
	right: auto;
	left: 10px;
	height: 100%;
}

.bms-join__form .select2-container--default .select2-selection--single:focus,
.bms-join__form .select2-container--default.select2-container--focus .select2-selection--single,
.bms-join__form .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--join-green);
	box-shadow: 0 0 0 3px rgba(31,143,85,.12);
}
/* Open: the field keeps its corners; the list opens as a separate card just below (or above). */
.bms-join__form .select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.bms-join__form .select2-container--default.select2-container--open.select2-container--above .select2-selection--single { border-radius: 13px; }

.bms-join__form .select2-dropdown {
	overflow: hidden;
	border: 1px solid #cbd6ce;
	border-radius: 13px;
	background: #fff;
	box-shadow: var(--join-shadow);
	direction: rtl;
	text-align: right;
}
.bms-join__form .select2-container--open .select2-dropdown--below { margin-top: 6px; border-top: 1px solid #cbd6ce; border-radius: 13px; }
.bms-join__form .select2-container--open .select2-dropdown--above { margin-top: -6px; border-bottom: 1px solid #cbd6ce; border-radius: 13px; }

.bms-join__form .select2-search--dropdown { padding: 10px; }
.bms-join__form .select2-container--default .select2-search--dropdown .select2-search__field {
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid #cbd6ce;
	border-radius: 10px;
	outline: none;
	direction: rtl;
	text-align: right;
}
.bms-join__form .select2-container--default .select2-search--dropdown .select2-search__field:focus {
	border-color: var(--join-green);
	box-shadow: 0 0 0 3px rgba(31,143,85,.12);
}

.bms-join__form .select2-results__option { padding: 10px 14px; }
.bms-join__form .select2-container--default .select2-results__option[aria-selected="true"] { color: var(--join-green-dark); background: var(--join-green-soft); }
.bms-join__form .select2-container--default .select2-results__option--highlighted[aria-selected] { color: #fff; background: var(--join-green-dark); }
