/* GroupsIO Directory Plugin Styles */
/* Add custom frontend and admin styles here */
.groupsIOwrapper { width: var(--wp--style--global--content-size); }
.groupsioTable.groupsioGroups {  margin-top: 3rem; display: grid;  grid-column-gap: 3rem; grid-row-gap: 1rem;}
.groupsioGroups1 { aspect-ratio: 4 / 5; overflow: hidden; }
.groupsioGroups1 img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
h2.groupsio_topic_heading { font-size: 1.2rem; }
.filtersCols { display: flex; flex-direction: row; gap: 1rem;}
.filters_rows { display: flex; flex-direction: column; gap: 0.75rem; }
.filters_row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.75rem; }
/* min-width forces flex-wrap to kick in once items would otherwise have to
 * squeeze below a readable size, rather than letting them all shrink down to
 * min-content (just wide enough for the dropdown arrow) to stay on one line
 * — which is what let the "Flexible" row cram every filter onto one line
 * with bunched-up labels before wrapping. This adapts to however many
 * filters are configured and at any viewport width, instead of a fixed
 * breakpoint tied to today's specific filter count. */
.filters_select-outer { flex: 1 1 0; display: flex; min-width: 160px; }
.filters_select-outer select { width: 100%; }
.filters_select-outer.reset-cell { flex: 0 0 auto; min-width: 0; }

/* Mobile breakpoints — override to a fixed grid regardless of how many rows
 * the "Number of filter rows" block setting produced (Flexible/2/3/4): every
 * filter item reflows to 2-per-row below 600px, 1-per-row below 360px.
 *
 * .filters_row is set to display:contents rather than itself becoming the
 * grid — the desktop PHP-side chunking (filters.php) splits items into
 * separate sibling .filters_row divs (e.g. 3 items / 4 items), each its own
 * box. Gridding each one independently reflows them as two separate
 * sequences, which can strand a lone odd-one-out item (e.g. a 3-item chunk's
 * third item sits alone with an empty cell next to it) instead of pairing
 * with whatever comes first in the next chunk. display:contents removes the
 * .filters_row boxes from layout entirely, so their children become direct
 * grid items of .filters_rows — one continuous grid spanning every item in
 * document order, ignoring the desktop row boundaries altogether. */
@media (max-width: 599px) {
	.filters_rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.filters_row { display: contents; }
}
@media (max-width: 359px) {
	.filters_rows { grid-template-columns: 1fr; }
}

.sendHTML { display: none; }
.groupsioGroups2 { padding: 0.5rem 1rem;}
.groupsioGroups2.textAlign-left .groupsio_topic_heading,
.groupsioGroups2.textAlign-left .basicDetails,
.groupsioGroups2.textAlign-left .groupsioDetails { text-align: left; }
.groupsioGroups2.textAlign-center .groupsio_topic_heading,
.groupsioGroups2.textAlign-center .basicDetails,
.groupsioGroups2.textAlign-center .groupsioDetails { text-align: center; }
.groupsioGroups2.textAlign-right .groupsio_topic_heading,
.groupsioGroups2.textAlign-right .basicDetails,
.groupsioGroups2.textAlign-right .groupsioDetails { text-align: right; }
.groupsioGroups2 .groupsioDetails dialog.details,
.groupsioGroups2 .groupsioDetails dialog.details * { font-size: 1.1rem; text-align: start; }
.groupsioGroups2 .basicDetails { font-size: 1.1rem; }
.dir_choice_pill { display: inline-block; background: #e0e3ea; color: #333; border-radius: 999px; padding: 2px 10px; margin-block: 2px; margin-inline: 0 4px; font-size: 0.85em; }
.dir_field_grid { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: 0.5rem; margin: 1rem 0; align-items: start; }
.dir_field_label { font-weight: 700; }
.dialogBtn { border-radius: 999px; background: #f5f5f5; border: 1px solid #cccccc; padding: 6px 16px; cursor: pointer; margin-top: 1rem; }
.groupsioGroups1.circlePhotos { aspect-ratio: 1 / 1; border-radius: 50%; }
.groupsioGroups1.circlePhotos img { border-radius: 50%; }
dialog.details { width: 50%; min-width: 320px; max-width: 640px; border: 1px solid #cccccc; border-radius: 12px; padding: 24px; box-sizing: border-box; position: relative; }
dialog.details::backdrop { background: rgba(0, 0, 0, 0.5); }
@media (max-width: 480px) { dialog.details { width: 90%; min-width: unset; } }
.dialogCloseBtn { position: absolute; top: 12px; right: 12px; inset-inline-end: 12px; width: 32px; height: 32px; padding: 0; margin-top: 0; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; line-height: 1; }
dialog.details .dialogNameTitle { font-size: 1.8rem; font-weight: 600; margin: 0 0 0.5rem 0; margin-inline-end: 2.5rem; }
dialog.details .dialogDivider { border: none; border-top: 1px solid #e0e0e0; margin: 1rem 0; }

/* search and filtering classes */
/* imported/adapted from the original groupsio plugin's groupsio.css — class names
 * adjusted where this fork renamed them (groupsioRow -> groupsioPerson), theme
 * color custom properties replaced with concrete fallbacks, and image-based icons
 * dropped since those asset files aren't part of this plugin. */

/* row hidden by search/filter — without this, toggling .resourceHidden in view.js has no visual effect */
.groupsioPerson.resourceHidden { display: none; }

/* brief dim while a search/filter pass runs. A plain transition (not a keyframe
 * animation) is used deliberately: view.js adds/removes the .faded class on its
 * own timers (300ms for search, 750ms for dropdown filters), and a transition
 * smoothly reverses from whatever opacity it's currently at the instant the class
 * is removed — an animation restarts from a fixed keyframe instead, which caused
 * a visible flash/snap whenever removal didn't line up with the animation's own
 * timeline. */
.groupsIOwrapper { transition: opacity 0.2s ease; }
.groupsIOwrapper.faded { opacity: 0.9; }

/* shared look for the search box and filter dropdowns — explicit height +
 * border-box so a <select> and an <input> render at the same height despite
 * their differing native vertical rhythm (a <select> otherwise renders
 * taller than a text input with identical padding/border/font-size). */
.filters-select { box-sizing: border-box; height: 2.375rem; border: none; border-bottom: 3px solid #cccccc; background-color: #f9f9f9; display: block; width: 100%; padding: 5px 0; font-size: 15px; }

/* reset/"clear filters" button — sized to its icon rather than stretching
 * like a select cell (see .reset-cell above); stroke="currentColor" on the
 * SVG means .noMatches's color:#fff recolors the icon with no extra rule.
 * Dimmed via .idle until a filter is actually active — see updateResetButtonState()
 * in view.js — as a visual cue that clicking it wouldn't currently do anything. */
.output_filter_reset { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #cccccc; border-radius: 4px; background-color: #f9f9f9; color: #333; cursor: pointer; }
.output_filter_reset.idle { opacity: 0.2; }
.output_filter_reset.noMatches { background-color: #e74c3c; color: #ffffff; }

/* "Email selected people" button — currently shown only once matches exist */
.send_results.hidden { display: none; }

/* "Choose groups" dropdown filter */
.groups-dropdown { position: relative; width: 100%; display: inline-block; text-align: start; }
.filters_groups_btn { width: 100%; text-align: start; font-size: 1rem; border: 1px solid #cccccc; padding: 6px 10px; background-color: #f9f9f9; border-radius: 4px; cursor: pointer; }
.filters_groups_btn::-moz-focus-inner { padding: 0 !important; border: 0 none !important; }
.filters_groups_btn span.arrow { float: right; float: inline-end; }
.groups-dropdown-content { display: none; position: absolute; background-color: #ffffff; width: 100%; border: 1px solid #cccccc; border-top: 0; box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15); z-index: 1; padding-bottom: 10px; border-radius: 0 0 4px 4px; }
.groups-dropdown-content label { display: block; margin: 10px 15px 0; }
.groups-dropdown-content input { margin-inline-end: 8px; }

/* sub-group membership badges — reuses this plugin's existing pill look (see .dir_choice_pill) */
.groupsIOdiv .groupIO,
.groupsIOdivExp .groupIO { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 10px; border-radius: 999px; background: #e0e3ea; color: #333; font-size: 0.85em; }
.groups-dropdown-content .groupIO { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #e0e3ea; margin-right: 6px; vertical-align: middle; }
.groupsIOdivExp .groupIO.filteredIcon { background: #cfe8cf; font-weight: 600; }

.detailsTitle { text-align: left; font-weight: 600; margin: 0.5rem 0 0.25rem; }

.noResultsMessage { text-align: center; margin: 1.5rem 0; color: #555; }
.noResultsMessage.hidden { display: none; }
.noResultsMessage .clearFiltersLink { text-decoration: underline; cursor: pointer; }
