/* ---------- Widget: upcoming events list ---------- */
.sce-widget-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sce-widget-item {
	padding: 6px 0;
	border-bottom: 1px solid #e2e2e2;
}
.sce-widget-item:last-child {
	border-bottom: none;
}
.sce-widget-date {
	display: block;
	font-size: 0.85em;
	color: #666;
}
.sce-widget-empty {
	color: #666;
}

/* ---------- Shortcode: detailed list view ---------- */
.sce-list-item {
	margin-bottom: 1.75em;
	padding-bottom: 1.5em;
	border-bottom: 1px solid #e2e2e2;
}
.sce-list-item:last-child {
	border-bottom: none;
}
.sce-list-title {
	margin: 0 0 0.2em;
}
.sce-list-date {
	color: #666;
	font-size: 0.9em;
	margin-bottom: 0.5em;
}
.sce-empty {
	color: #666;
}

/* Links typed into an event's description (via "Insert link" in the admin
   page, or the WordPress editor's own link button). Explicit styling here
   so they're visibly links even if the site's theme doesn't style <a> tags
   distinctly by default. */
.sce-list-desc a,
.sce-modal-desc a {
	color: #2c4a6e;
	text-decoration: underline;
}
.sce-list-desc a:hover,
.sce-modal-desc a:hover {
	color: #1a2f47;
}

/* ---------- Shortcode: calendar view ---------- */
.sce-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75em;
}
.sce-calendar-month {
	font-weight: 600;
	font-size: 1.15em;
}
.sce-print-only {
	display: none;
}
.sce-calendar-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}
.sce-calendar-table th,
.sce-calendar-table td {
	border: 1px solid #ccc;
	vertical-align: top;
	padding: 4px;
}
.sce-calendar-table th {
	background: #f2f2f2;
	text-align: center;
	padding: 6px 4px;
}
.sce-day-cell {
	height: 90px;
	overflow: hidden;
}
.sce-empty-cell {
	background: #fafafa;
}
.sce-day-number {
	font-weight: 600;
	font-size: 0.85em;
	margin-bottom: 2px;
}
.sce-today {
	background: #fff8e1;
}
.sce-day-events {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.8em;
}
.sce-day-events li {
	margin-bottom: 2px;
	line-height: 1.2;
}
.sce-day-events a {
	text-decoration: none;
}
.sce-day-events a:hover {
	text-decoration: underline;
}

/* ---------- Modal / lightbox ---------- */
.sce-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}
.sce-modal-overlay[hidden] {
	display: none;
}
.sce-modal-box {
	background: #fff;
	max-width: 560px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 28px 24px 24px;
	border-radius: 4px;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.sce-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}
.sce-modal-close:hover {
	color: #000;
}
.sce-modal-title {
	margin: 0 0 4px;
	padding-right: 20px;
}
.sce-modal-date {
	color: #666;
	margin-bottom: 14px;
	font-size: 0.9em;
}

/* ---------- Print styles: calendar should print cleanly ---------- */
@media print {
	.sce-no-print {
		display: none !important;
	}
	.sce-print-only {
		display: block !important;
	}
	.sce-day-cell {
		height: auto;
		min-height: 70px;
	}
	body * {
		visibility: hidden;
	}
	.sce-calendar-view,
	.sce-calendar-view * {
		visibility: visible;
	}
	.sce-calendar-view {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
	}
}

/* ---------- Annual programme view ---------- */
.sce-programme-view {
	--sce-navy: #03243E;
	--sce-gold: #C9A24D;
	--sce-pale: #F8F5ED;
	margin: 1rem 0 1.5rem;
}
.sce-programme-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}
.sce-programme-heading-no-title {
	justify-content: flex-end;
}
.sce-programme-heading h2 {
	margin: 0;
	color: var(--sce-navy);
}
.sce-print-button {
	border: 1px solid var(--sce-gold);
	border-radius: 3px;
	background: var(--sce-navy);
	color: #fff;
	font: inherit;
	font-weight: 600;
	padding: .55rem .9rem;
	cursor: pointer;
}
.sce-print-button:hover,
.sce-print-button:focus {
	background: #0a3556;
	color: #fff;
}
.sce-programme-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}
.sce-programme-table th,
.sce-programme-table td {
	border: 1px solid #b9b9b9;
	padding: .62rem .7rem;
	text-align: left;
	vertical-align: top;
}
.sce-programme-table th {
	background: var(--sce-navy);
	color: #fff;
	border-color: var(--sce-navy);
	border-bottom: 3px solid var(--sce-gold);
	text-align: center;
	font-weight: 700;
}
.sce-programme-table tbody tr:nth-child(even) td {
	background: var(--sce-pale);
}
.sce-programme-table .sce-status-cancelled td {
	background: #f4f4f4;
	color: #555;
}
.sce-cancelled-label {
	color: #8b1e1e;
	white-space: nowrap;
}
@media (max-width:700px) {
	.sce-programme-table { font-size:.9rem; }
	.sce-programme-table th,
	.sce-programme-table td { padding:.45rem; }
	.sce-programme-heading { align-items:flex-start; }
}


/* ---------- Homepage meetings feature ----------
   Deliberately separate from list/calendar/programme views so existing sites
   such as Rotary retain their conventional presentation. */
.sce-home-meetings {
	--sce-navy: #03243E;
	--sce-gold: #C9A24D;
	--sce-cream: #f7f4ed;
	display: grid;
	grid-template-columns: minmax(290px, 39%) minmax(0, 61%);
	margin: 1rem 0 1.5rem;
	border-top: 3px solid var(--sce-gold);
	box-shadow: 0 1px 5px rgba(0,0,0,.08);
}
.sce-home-next {
	background: var(--sce-navy);
	color: #fff;
	padding: 1.45rem 1.6rem 1.55rem;
	min-height: 300px;
	box-sizing: border-box;
}
.sce-home-kicker,
.sce-home-forthcoming-title {
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
}
.sce-home-kicker { color: var(--sce-gold); margin-bottom: .65rem; }
.sce-home-next-date-top { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; margin-bottom: .15rem; }
.sce-home-next-title { color:#fff; font-family: Georgia, 'Times New Roman', serif; font-size: 1.75rem; line-height:1.08; font-weight:400; margin:.15rem 0 .15rem; }
.sce-home-next-speaker { font-family: Georgia, 'Times New Roman', serif; font-size:1.08rem; color:#f0e7d6; margin-bottom:1.05rem; }
.sce-home-next-details { border-top:1px solid rgba(255,255,255,.15); padding-top:.7rem; font-family: Georgia, 'Times New Roman', serif; font-size:.92rem; }
.sce-home-next-details > div { display:grid; grid-template-columns:1.35rem 1fr; gap:.35rem; align-items:start; margin:.45rem 0; }
.sce-home-icon { color:var(--sce-gold); font-family:Arial,sans-serif; }
.sce-home-more { display:inline-block; margin-top:.8rem; background:var(--sce-gold); color:#132c40 !important; text-decoration:none !important; padding:.62rem 1rem; font-family:Georgia,'Times New Roman',serif; font-size:.92rem; }
.sce-home-more:hover { filter:brightness(1.05); }
.sce-home-forthcoming { background:linear-gradient(100deg,#faf8f3,#f2eee6); padding:1.45rem 1.35rem 1.05rem; box-sizing:border-box; min-width:0; }
.sce-home-forthcoming-title { color:#43536a; font-family:Georgia,'Times New Roman',serif; margin-bottom:.85rem; }
.sce-home-mini-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.sce-home-mini-card { background:rgba(255,255,255,.78); padding:.7rem; min-width:0; box-sizing:border-box; }
.sce-home-mini-date { color:#40526b; font-family:Georgia,'Times New Roman',serif; font-size:.82rem; margin-bottom:.5rem; }
.sce-home-mini-image { width:100%; aspect-ratio:1.45/1; object-fit:cover; display:block; margin-bottom:.55rem; }
.sce-home-mini-title { font-family:Georgia,'Times New Roman',serif; color:#23384d; font-size:1rem; line-height:1.18; font-weight:400; margin:.15rem 0 .35rem; }
.sce-home-mini-speaker { font-family:Georgia,'Times New Roman',serif; font-style:italic; color:#43536a; font-size:.82rem; line-height:1.25; }
.sce-home-all { text-align:center; margin-top:1rem; font-family:Georgia,'Times New Roman',serif; font-size:.88rem; }
.sce-home-all a { color:#31465c; text-decoration:none; }
.sce-home-all a:hover { text-decoration:underline; }
@media (max-width: 900px) {
	.sce-home-meetings { grid-template-columns:1fr; }
	.sce-home-next { min-height:0; }
}
@media (max-width: 650px) {
	.sce-home-mini-grid { grid-template-columns:1fr; }
	.sce-home-next, .sce-home-forthcoming { padding:1.2rem; }
	.sce-home-next-title { font-size:1.5rem; }
}

/* ---------- Dedicated Meetings page ----------
   Compact two-column catalogue. Opt-in, so Rotary list/calendar views are unchanged. */
.sce-meetings-view {
	--sce-navy: #03243E;
	--sce-gold: #C9A24D;
	--sce-cream: #F8F5ED;
	margin: 1rem 0 1.75rem;
}
.sce-meetings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.15rem;
	align-items: start;
}
.sce-meeting-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ddd8cd;
	border-top: 3px solid var(--sce-gold);
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	overflow: hidden;
	min-width: 0;
}
.sce-meeting-card-body {
	padding: 1rem 1.1rem 1.05rem;
	min-width: 0;
}
.sce-meeting-date {
	color: #6b604d;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: .3rem;
}
.sce-meeting-title {
	color: var(--sce-navy);
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.35rem;
	line-height: 1.15;
	font-weight: 400;
	margin: 0 0 .3rem;
}
.sce-meeting-speaker {
	color: #26394a;
	font-size: .95rem;
	margin-bottom: .55rem;
}
.sce-meeting-description {
	color: #292929;
	font-size: .95rem;
	line-height: 1.45;
}
.sce-meeting-description p:first-child { margin-top: 0; }
.sce-meeting-description p:last-child { margin-bottom: .6rem; }
.sce-meeting-description a { color: #314f6d; text-decoration: underline; }
.sce-meeting-more {
	display: inline-block;
	margin-top: .15rem;
	color: var(--sce-navy) !important;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none !important;
	border-bottom: 2px solid var(--sce-gold);
	padding-bottom: .1rem;
}
.sce-meeting-more:hover { color: #0a456d !important; }
.sce-meeting-card-next {
	border-top-color: var(--sce-navy);
	box-shadow: inset 0 3px 0 var(--sce-gold), 0 1px 3px rgba(0,0,0,.04);
}
.sce-meeting-card-next .sce-meeting-date::before {
	content: "NEXT MEETING · ";
	color: var(--sce-gold);
}
.sce-meetings-programme-link {
	text-align: right;
	margin: 1.25rem 0 .25rem;
}
.sce-meetings-programme-link a {
	display: inline-block;
	background: var(--sce-navy);
	border: 1px solid var(--sce-gold);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	padding: .65rem 1rem;
}
.sce-meetings-programme-link a:hover { background: #0a3556; }
@media (max-width: 760px) {
	.sce-meetings-grid { grid-template-columns: 1fr; gap: .9rem; }
	.sce-meeting-title { font-size: 1.3rem; }
	.sce-meetings-programme-link { text-align: left; }
}


/* Programme year selector (v1.1.11) */
.sce-programme-controls {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}
.sce-programme-year-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sce-programme-year-form label {
    font-weight: 600;
}
.sce-programme-year-form select {
    min-width: 100px;
    padding: 7px 30px 7px 10px;
}
@media (max-width: 600px) {
    .sce-programme-controls { justify-content: flex-start; }
}


/* ---------- Forthcoming visits (v1.1.13) ----------
   [club_events view="visits"] is the dedicated-meetings layout with visit
   wording, so only the "NEXT ..." label on the first card needs its own rule. */
.sce-meetings-view--visits .sce-meeting-card-next .sce-meeting-date::before {
	content: "NEXT VISIT · ";
	color: var(--sce-gold);
}


/* ---------- Past events and past visits (v1.1.13) ----------
   [club_events view="past"] — a dated record of events that have already
   happened, most recent first. Used for a club's visits archive and, with
   type="meeting", for a record of past meetings. */
.sce-past-view {
	--sce-navy: #03243E;
	--sce-gold: #C9A24D;
	--sce-cream: #F8F5ED;
	margin: 1rem 0 1.75rem;
}
/* No typography of its own: the heading is a section heading among the page's
   own, so it takes the theme's heading type (theme.json elements.h2) and only
   the spacing inside the section is set here. */
.sce-past-heading {
	margin: 0 0 1.5rem;
}
.sce-past-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sce-past-item {
	display: grid;
	grid-template-columns: 9.5rem minmax(0, 1fr);
	gap: .25rem 1.15rem;
	padding: .9rem 0;
	border-top: 1px solid #e2ddd2;
}
/* The first entry carries the gold rule the rest of the design uses to mark
   the top of a list. */
.sce-past-item:first-child {
	border-top: 2px solid var(--sce-gold);
}
.sce-past-date {
	color: #6b604d;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding-top: .3rem;
}
.sce-past-title {
	color: var(--sce-navy);
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.2rem;
	line-height: 1.18;
	font-weight: 400;
	margin: 0;
}
.sce-past-speaker {
	color: #26394a;
	font-size: .95rem;
	margin-top: .2rem;
}
.sce-past-summary {
	color: #292929;
	font-size: .95rem;
	line-height: 1.45;
	margin-top: .3rem;
}
.sce-past-summary p { margin: 0; }
.sce-past-summary a { color: #314f6d; text-decoration: underline; }
.sce-past-more {
	display: inline-block;
	margin-top: .45rem;
	color: var(--sce-navy) !important;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none !important;
	border-bottom: 2px solid var(--sce-gold);
	padding-bottom: .1rem;
}
.sce-past-more:hover { color: #0a456d !important; }
@media (max-width: 640px) {
	/* The date sits above the entry on a phone rather than in its own column. */
	.sce-past-item { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
	.sce-past-date { padding-top: 0; }
	.sce-past-title { font-size: 1.15rem; }
}


/* ---------- Coming Up band (v1.1.16) ----------
   [club_events view="coming_up"] - a heading, a link to the full programme and up
   to three compact cards (a day/month block, the title and the venue).

   Self-contained on purpose: the section, its pale blue band and its heading all
   come from the plugin, so a theme only has to print the shortcode. Widths follow
   the Rotary Coastal theme's 1120px column, and step in at the same two
   breakpoints the theme uses. */
.sce-upcoming {
	background: #e8f4fc;
	padding: 16px 0 20px;
}
.sce-upcoming-inner {
	width: min(calc(100% - 104px), 1120px);
	margin-inline: auto;
}
.sce-upcoming-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 10px;
}
.sce-upcoming-title {
	margin: 0;
	color: #073e90;
	font-size: 29px;
	line-height: 1.18;
}
.sce-upcoming-more {
	font-weight: 700;
	color: #004a98;
	text-decoration: none;
}
.sce-upcoming-more:hover,
.sce-upcoming-more:focus {
	text-decoration: underline;
}
.sce-upcoming-events {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.sce-upcoming-event {
	background: #fff;
	display: flex;
	align-items: center;
	gap: 22px;
	min-height: 87px;
	border-radius: 6px;
	padding: 10px 15px;
	box-shadow: 0 4px 14px rgba(11, 52, 83, .11);
}
.sce-upcoming-date {
	flex: none;
	width: 57px;
	border: 1px solid #0d55a0;
	border-radius: 4px;
	text-align: center;
	color: #1a2d45;
	line-height: 1.02;
	padding: 0 0 5px;
	font-size: 12px;
}
/* The two dots along the top edge stand in for a calendar's binding. */
.sce-upcoming-date::before {
	content: "\25CF  \25CF";
	display: block;
	background: #0b4e9a;
	color: #0b4e9a;
	height: 9px;
	letter-spacing: 8px;
	margin: 0 0 5px;
	overflow: hidden;
}
.sce-upcoming-day {
	display: block;
	font-size: 25px;
}
.sce-upcoming-month {
	display: block;
}
.sce-upcoming-event-title {
	color: #03438f;
	font-size: 15px;
	margin: 0 0 7px;
}
.sce-upcoming-venue {
	font-size: 13px;
	margin: 0;
}
.sce-upcoming-pin {
	color: #0054a0;
	margin-right: 5px;
}
@media (max-width: 850px) {
	.sce-upcoming-inner { width: min(calc(100% - 44px), 1120px); }
}
@media (max-width: 650px) {
	.sce-upcoming-events { grid-template-columns: 1fr; gap: 20px; }
	.sce-upcoming-head { align-items: start; }
	.sce-upcoming-title { font-size: 26px; }
	.sce-upcoming-more { font-size: 13px; }
	.sce-upcoming-event { min-height: 78px; gap: 10px; padding: 10px; }
}

/* ---------- Admin: event image picker ----------
   Used only on the Add/Edit Event screen. The admin stylesheet is shared with
   the front end, so these rules are scoped to the picker markup. */
.sce-image-preview {
	margin-bottom: 8px;
}
.sce-image-preview img {
	display: block;
	max-width: 320px;
	height: auto;
	border: 1px solid #dcdcde;
	background: #fff;
	padding: 4px;
}
.sce-image-field .button-link {
	margin-left: 8px;
	color: #b32d2e;
	text-decoration: none;
}
