/* WP-CR-Connect — public styles */

.wpcr-stories {
	display: flex;
	flex-direction: column;
	gap: 2em;
}

.wpcr-story-title {
	margin-bottom: 0.25em;
}

.wpcr-story-date {
	color: #666;
	font-size: 0.9em;
	margin-bottom: 0.75em;
}

.wpcr-story-image {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 0.75em;
}

/* Images embedded inside raw ClubRunner-authored HTML (story Content,
   event Description) often carry their own fixed width/height attributes
   or inline styles sized for ClubRunner's own portal layout — those
   override the theme's default responsive-image CSS (which only targets
   WordPress's own wp-image-* class), causing stretched/oversized images.
   !important is deliberate here: it needs to beat inline style="" attrs
   ClubRunner's content sometimes includes. */
.wpcr-story-content img,
.wpcr-event-description img {
	max-width: 100% !important;
	height: auto !important;
}

.wpcr-notice {
	padding: 0.75em 1em;
	background: #f7f7f7;
	border-left: 4px solid #ccc;
}

/* Events
 *
 * Modeled on WP Connect's rwc-cal-list widget (rotary-wp-connect,
 * includes/modules/calendar.php + assets/css/rwc-styles.css) so the two
 * plugins' list-style event widgets match visually: a boxed
 * day-of-week/month/day-number date card on the left, time/title/venue
 * stacked on the right.
 */
.wpcr-events-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpcr-event {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 14px 0;
}

.wpcr-event + .wpcr-event {
	border-top: 1px solid #ededed;
}

/* Boxed date "card" */
.wpcr-event-date {
	flex: 0 0 auto;
	width: 84px;
	text-align: center;
	border: 1px solid #d9d9d9;
	border-radius: 6px;
	background: #f7f7f7;
	padding: 8px 4px 10px;
	line-height: 1.15;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wpcr-event-date .wpcr-event-dow,
.wpcr-event-date .wpcr-event-month {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #4a4a4a;
}

.wpcr-event-date .wpcr-event-day {
	display: block;
	font-size: 2.1rem;
	font-weight: 800;
	color: #1a1a1a;
	margin-top: 2px;
	letter-spacing: -0.5px;
}

/* Right-hand info column */
.wpcr-event-info {
	flex: 1 1 auto;
	min-width: 0;
}

.wpcr-event-time {
	font-size: 0.92rem;
	color: #555;
	margin-bottom: 3px;
}

.wpcr-event-title {
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.25;
	color: #1a1a1a;
	margin: 0;
}

.wpcr-event-title a {
	color: inherit;
	text-decoration: none;
}

.wpcr-event-title a:hover {
	color: #2271b1;
}

/* Event-detail modal trigger — used for [wpcr-events] titles,
   [wpcr-events-calendar] list-mode titles, and month-grid chips. Reset
   to look like plain text/links (not a browser default <button>), since
   it's a drop-in replacement for what used to be a plain <a>. */
.wpcr-event-trigger {
	all: unset;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.wpcr-event-trigger:hover,
.wpcr-event-trigger:focus-visible {
	color: #2271b1;
}

.wpcr-event-location {
	font-size: 0.92rem;
	color: #555;
	margin-top: 3px;
}

.wpcr-event-description {
	font-size: 0.88rem;
	color: #666;
	line-height: 1.45;
	margin-top: 5px;
}

.wpcr-event-register {
	margin-top: 6px;
}

.wpcr-event-register-link {
	font-size: 0.88rem;
	font-weight: 600;
	color: #17458F;
	text-decoration: none;
}

.wpcr-event-register-link:hover {
	color: #2271b1;
	text-decoration: underline;
}

.wpcr-meeting-when,
.wpcr-meeting-where,
.wpcr-club-address {
	color: #666;
	font-size: 0.9em;
}

@media (max-width: 480px) {
	.wpcr-event { gap: 14px; }
	.wpcr-event-date { width: 70px; }
	.wpcr-event-date .wpcr-event-day { font-size: 1.8rem; }
	.wpcr-event-title { font-size: 1.1rem; }
}

/* Club Info / Where Clubs Meet */
.wpcr-club-logo {
	max-width: 120px;
	height: auto;
	margin-bottom: 0.5em;
}

.wpcr-club-motto {
	font-style: italic;
	margin-bottom: 0.5em;
}

.wpcr-club-homepage {
	display: inline-block;
	margin-top: 0.5em;
}

/* Club List (Where Clubs Meet) — DataTables, adapted from WP Connect's
   club-list.php / rwc-styles.css */
.wpcr-cl-wrap {
	margin: 1em 0;
}

table.wpcr-club-list tbody tr {
	cursor: pointer;
}

table.wpcr-club-list tbody tr:hover {
	background-color: #f3f6fb;
}

table.wpcr-club-list td.wpcr-cl-control,
table.wpcr-club-list th.wpcr-cl-control {
	text-align: center;
	vertical-align: middle;
}

table.wpcr-club-list td.wpcr-cl-control::before {
	content: "\002B";
	display: inline-block;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	border-radius: 3px;
	background: #2271b1;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
}

table.wpcr-club-list tr.wpcr-cl-open td.wpcr-cl-control::before {
	content: "\2212";
	background: #135e96;
}

.wpcr-cl-url-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #17458F;
	text-decoration: none;
	line-height: 1;
}

.wpcr-cl-url-icon svg {
	display: block;
}

.wpcr-cl-url-icon:hover {
	color: #EAAA00;
}

.wpcr-cl-url-col {
	text-align: center !important;
	white-space: nowrap;
}

td.wpcr-cl-url-col {
	text-align: center !important;
}

.wpcr-cl-detail {
	padding: 8px 12px;
	font-size: .9em;
	line-height: 1.7;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
}

.wpcr-cl-detail strong {
	color: #1d2327;
}

.wpcr-cl-detail a {
	color: #17458F;
}

.wpcr-cl-detail a:hover {
	text-decoration: underline;
}

.wpcr-cl-detail-empty {
	color: #888;
	font-style: italic;
}

@media (max-width: 600px) {
	.wpcr-cl-wrap table.dataTable tbody tr td {
		font-size: 15px !important;
		padding: 6px 2px !important;
	}
	.wpcr-cl-wrap table.dataTable thead th {
		font-size: 13px !important;
		padding: 6px 3px !important;
		white-space: nowrap;
	}
	.wpcr-cl-wrap .wpcr-cl-detail {
		font-size: .82em;
	}
	.wpcr-cl-wrap table.dataTable td.wpcr-cl-url-col {
		padding: 4px 2px !important;
	}
}

/* Events Calendar */
.wpcr-ec-grid {
	display: block;
}

.wpcr-ec-list {
	display: none;
}

/* Auto-switch to list below tablet width. Does not apply when the
   force-list wrapper class is present (view="list"), since the grid is
   never rendered server-side in that case anyway. */
@media (max-width: 768px) {
	.wpcr-ec-grid {
		display: none;
	}
	.wpcr-ec-list {
		display: block;
	}
}

.wpcr-ec-force-list .wpcr-ec-list {
	display: block !important;
}

.wpcr-ec-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1em;
	font-weight: 600;
}

.wpcr-ec-nav a {
	text-decoration: none;
}

.wpcr-ec-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.wpcr-ec-table th {
	padding: 0.5em;
	text-align: left;
	font-size: 0.8em;
	color: #666;
	border-bottom: 1px solid #ddd;
}

.wpcr-ec-day {
	vertical-align: top;
	border: 1px solid #eee;
	padding: 0.4em;
	height: 5.5em;
	overflow: hidden;
	font-size: 0.85em;
}

.wpcr-ec-day-empty {
	background: #fafafa;
}

.wpcr-ec-day.has-events {
	background: #f5f9ff;
}

.wpcr-ec-day-num {
	font-weight: 600;
	margin-bottom: 0.25em;
}

.wpcr-ec-event-chip {
	background: #e8f0fe;
	border-radius: 3px;
	padding: 0.15em 0.35em;
	margin-bottom: 0.2em;
	font-size: 0.85em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpcr-ec-event-chip .wpcr-event-trigger {
	display: block;
	width: 100%;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpcr-ec-list-items {
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.wpcr-ec-list-item {
	display: flex;
	gap: 1em;
}

.wpcr-ec-list-date {
	flex: 0 0 auto;
	font-weight: 600;
	white-space: nowrap;
}

.wpcr-ec-list-title {
	margin: 0 0 0.25em;
}

.wpcr-ec-list-location {
	color: #666;
	font-size: 0.9em;
}

.wpcr-ec-more {
	display: inline-block;
	margin-top: 1em;
	font-weight: 600;
}

/* Events Subscribe */
.wpcr-es-wrap {
	max-width: 32em;
}

.wpcr-es-providers {
	display: flex;
	gap: 0.75em;
	flex-wrap: wrap;
}

.wpcr-es-sub-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.5em 1em;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9em;
	color: inherit;
}

.wpcr-es-sub-btn:hover {
	background: #f0f0f0;
}

.wpcr-es-sub-icon {
	width: 20px;
	height: 20px;
}

/* Club Map (Leaflet) */
.wpcr-leaflet-map {
	border-radius: 4px;
	z-index: 1;
}

.wpcr-map-popup {
	font-size: 0.9em;
	line-height: 1.5;
}

.wpcr-map-popup a {
	color: #17458F;
}

.wpcr-map-geo-note {
	font-size: 12px;
	color: #646970;
	margin-top: 0.5em;
}

/* Leaders / District Leaders
 *
 * Deliberately flexbox + justify-content: center rather than CSS grid.
 * A grid track keeps every row's cards pinned to the same left-aligned
 * column positions, so an incomplete final row (1-3 cards under a
 * 4-column layout, etc.) sits flush left instead of centering — flexbox
 * with a fixed per-card width lets a short last row wrap and center
 * itself naturally. Per-column widths below reproduce the same visual
 * column count as the old grid, accounting for the row gap.
 */
.wpcr-leaders {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5em;
}

.wpcr-leaders > .wpcr-leader {
	flex: 0 0 auto;
	box-sizing: border-box;
}

.wpcr-leaders-cols-1 > .wpcr-leader { width: 100%; }
.wpcr-leaders-cols-2 > .wpcr-leader { width: calc(50% - 0.75em); }
.wpcr-leaders-cols-3 > .wpcr-leader { width: calc(33.333% - 1em); }
.wpcr-leaders-cols-4 > .wpcr-leader { width: calc(25% - 1.125em); }

.wpcr-leader {
	text-align: center;
}

.wpcr-leader-photo {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 50%;
	margin: 0 auto 0.5em;
	display: block;
}

.wpcr-leader-photo-placeholder {
	background: #e2e4e7;
	color: #a7a9ac;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpcr-leader-name {
	font-weight: 600;
}

.wpcr-leader-title {
	color: #666;
	font-size: 0.9em;
}

.wpcr-leader-club {
	color: #888;
	font-size: 0.85em;
}

@media (max-width: 600px) {
	.wpcr-leaders > .wpcr-leader {
		width: calc(50% - 0.75em) !important;
	}
}

.wpcr-leader-actions {
	margin-top: 0.5em;
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	align-items: center;
}

.wpcr-leader-profile-link {
	font-size: 0.85em;
}

.wpcr-leader-contact-btn {
	font-size: 0.85em;
	background: #17458F;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.4em 0.9em;
	cursor: pointer;
}

.wpcr-leader-contact-btn:hover {
	background: #0f3068;
}

/* District Leaders — Governor hero card */
.wpcr-d-leaders-wrap {
	display: flex;
	flex-direction: column;
	gap: 2em;
}

.wpcr-leaders-hero {
	display: flex;
	justify-content: center;
	gap: 2em;
	flex-wrap: wrap;
}

.wpcr-leader-hero {
	text-align: center;
	max-width: 320px;
}

.wpcr-leader-hero .wpcr-leader-name {
	font-size: 1.4em;
}

.wpcr-leader-hero .wpcr-leader-title {
	font-size: 1em;
}

/* Leader contact popup */
.wpcr-contact-modal[hidden] {
	display: none;
}

.wpcr-contact-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpcr-contact-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.wpcr-contact-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 6px;
	max-width: 420px;
	width: calc(100% - 2em);
	max-height: calc(100vh - 2em);
	overflow-y: auto;
	padding: 1.75em;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.wpcr-contact-modal-close {
	position: absolute;
	top: 0.5em;
	right: 0.75em;
	background: none;
	border: none;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.wpcr-contact-modal-title {
	margin: 0 0 0.25em;
	padding-right: 1.5em;
}

.wpcr-contact-modal-subtitle {
	font-size: 0.85em;
	color: #666;
	margin-top: 0;
}

#wpcr-contact-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25em;
	font-size: 0.9em;
}

#wpcr-contact-form input[type="text"],
#wpcr-contact-form input[type="email"],
#wpcr-contact-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.5em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: inherit;
}

.wpcr-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wpcr-contact-submit {
	background: #17458F;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.6em 1.2em;
	cursor: pointer;
	font-size: 1em;
}

.wpcr-contact-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.wpcr-contact-modal-status {
	min-height: 1.2em;
	font-size: 0.9em;
}

.wpcr-contact-modal-status-success {
	color: #00a32a;
}

.wpcr-contact-modal-status-error {
	color: #d63638;
}

body.wpcr-contact-modal-open {
	overflow: hidden;
}

/* Event-detail popup — [wpcr-events] titles, [wpcr-events-calendar]
   list-mode titles, and month-grid event chips all open this same
   modal. Same structural convention as .wpcr-contact-modal above. */
.wpcr-cal-modal[hidden] {
	display: none;
}

.wpcr-cal-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpcr-cal-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.wpcr-cal-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 6px;
	max-width: 560px;
	width: calc(100% - 2em);
	max-height: calc(100vh - 2em);
	overflow-y: auto;
	padding: 1.75em;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.wpcr-cal-modal-close {
	position: absolute;
	top: 0.5em;
	right: 0.75em;
	background: none;
	border: none;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.wpcr-cal-modal-close:hover {
	color: #1a1a1a;
}

.wpcr-cal-modal-title {
	margin: 0 0 0.4em;
	padding-right: 1.5em;
	font-size: 1.25rem;
	line-height: 1.25;
}

.wpcr-cal-modal-when {
	color: #50575e;
	font-size: 0.95em;
	margin-bottom: 0.9em;
}

.wpcr-cal-modal-loc {
	color: #555;
	font-size: 0.92em;
	margin-bottom: 0.6em;
}

.wpcr-cal-modal-desc {
	margin-top: 0.6em;
	line-height: 1.55;
	font-size: 0.95em;
}

.wpcr-cal-modal-desc img {
	max-width: 100% !important;
	height: auto !important;
}

.wpcr-cal-modal-more {
	margin-top: 1.1em;
}

.wpcr-cal-more-link {
	display: inline-block;
	background: #17458F;
	color: #fff;
	border-radius: 4px;
	padding: 0.5em 1.1em;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
}

.wpcr-cal-more-link:hover {
	background: #135e96;
	color: #fff;
}

body.wpcr-cal-modal-open {
	overflow: hidden;
}

/* District Business Directory */
.wpcr-bd-wrap {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.wpcr-bd-toggle {
	display: flex;
	gap: 0.5em;
}

.wpcr-bd-toggle-link {
	display: inline-block;
	padding: 0.4em 1em;
	border: 1px solid #ccc;
	border-radius: 999px;
	text-decoration: none;
	color: #444;
	font-size: 0.9em;
	font-weight: 600;
}

.wpcr-bd-toggle-link:hover {
	background: #f0f0f0;
}

.wpcr-bd-toggle-link.is-active {
	background: #17458F;
	border-color: #17458F;
	color: #fff;
}

.wpcr-bd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5em;
}

.wpcr-bd-card {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1.25em;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.wpcr-bd-logo {
	max-width: 120px;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin-bottom: 0.25em;
}

.wpcr-bd-heading {
	font-weight: 700;
	font-size: 1.1em;
}

.wpcr-bd-subheading {
	color: #666;
	font-size: 0.9em;
	margin-top: -0.4em;
}

.wpcr-bd-about {
	font-size: 0.9em;
	line-height: 1.5;
	color: #444;
}

.wpcr-bd-about img {
	max-width: 100% !important;
	height: auto !important;
}

.wpcr-bd-address-small {
	font-size: 0.82em;
	color: #777;
	margin-top: -0.15em;
}

.wpcr-bd-contact-row a {
	color: #17458F;
	text-decoration: none;
	font-size: 0.9em;
}

.wpcr-bd-contact-row a:hover {
	text-decoration: underline;
}

.wpcr-bd-view-profile-link {
	align-self: flex-start;
	background: none;
	border: none;
	padding: 0;
	margin-top: 0.25em;
	color: #17458F;
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.wpcr-bd-view-profile-link:hover {
	color: #0f3068;
}

.wpcr-bd-icons {
	display: flex;
	gap: 0.6em;
	flex-wrap: wrap;
	margin-top: 0.25em;
}

.wpcr-bd-icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f2f2f2;
	color: #4a4a4a;
	text-decoration: none;
	line-height: 1;
}

.wpcr-bd-icon-link svg {
	display: block;
}

.wpcr-bd-icon-link:hover {
	background: #e2e2e2;
	color: #1a1a1a;
}

.wpcr-bd-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5em;
	font-size: 0.9em;
}

.wpcr-bd-page-link {
	font-weight: 600;
	text-decoration: none;
	color: #17458F;
}

.wpcr-bd-page-link:hover {
	text-decoration: underline;
}

.wpcr-bd-page-status {
	color: #666;
}

/* Business Directory — full-profile popup */
.wpcr-bd-modal[hidden] {
	display: none;
}

.wpcr-bd-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpcr-bd-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.wpcr-bd-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 6px;
	max-width: 480px;
	width: calc(100% - 2em);
	max-height: calc(100vh - 2em);
	overflow-y: auto;
	padding: 1.75em;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.wpcr-bd-modal-close {
	position: absolute;
	top: 0.5em;
	right: 0.75em;
	background: none;
	border: none;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.wpcr-bd-modal-close:hover {
	color: #1a1a1a;
}

.wpcr-bd-modal-logo {
	max-width: 160px;
	max-height: 100px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin-bottom: 0.5em;
}

.wpcr-bd-modal-heading {
	font-weight: 700;
	font-size: 1.25em;
	padding-right: 1.5em;
}

.wpcr-bd-modal-subheading {
	color: #666;
	font-size: 0.95em;
	margin-top: -0.2em;
}

.wpcr-bd-modal-loading,
.wpcr-bd-modal-error {
	color: #666;
	font-size: 0.9em;
	margin-top: 0.75em;
}

.wpcr-bd-modal-error {
	color: #d63638;
}

.wpcr-bd-modal-about {
	margin-top: 1em;
	line-height: 1.55;
	font-size: 0.95em;
}

.wpcr-bd-modal-about img {
	max-width: 100% !important;
	height: auto !important;
}

body.wpcr-bd-modal-open {
	overflow: hidden;
}

/* Business Directory Map — marker "contact card" popup */
.wpcr-bd-map-popup {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	min-width: 200px;
}

.wpcr-bd-map-popup .wpcr-bd-icons {
	margin-top: 0.15em;
}
