/**
 * Group Life front-end styles.
 * Scoped under .sf-gl so they won't collide with the theme.
 * Colors use CSS variables you can override from your theme if desired.
 */
.sf-gl {
	--sf-gl-accent: #2A3D48;          /* brand primary */
	--sf-gl-accent-dark: #1d2b33;     /* darker primary for hover/headings */
	--sf-gl-accent-soft: #556874;     /* brand lighter blue */
	--sf-gl-new: #EE2D24;             /* brand red — "New" badge */
	--sf-gl-ink: #22272b;
	--sf-gl-muted: #556874;           /* brand lighter blue for secondary text */
	--sf-gl-line: #e3e7ea;
	--sf-gl-card: #ffffff;
	--sf-gl-bg-soft: #f5f7f8;
	--sf-gl-radius: 14px;
	--sf-gl-shadow: 0 1px 2px rgba(20,30,40,.06), 0 6px 18px rgba(20,30,40,.06);

	color: var(--sf-gl-ink);
	max-width: 100%;
	margin: 0 auto;
	-webkit-font-smoothing: antialiased;
}
.sf-gl *,
.sf-gl *::before,
.sf-gl *::after { box-sizing: border-box; }

/* ---------- Controls ---------- */
.sf-gl-controls {
	background: var(--sf-gl-bg-soft);
	padding: 14px;
	border-radius: var(--sf-gl-radius);
	margin-bottom: 22px;
}
.sf-gl-search { margin-bottom: 12px; }
.sf-gl-q {
	width: 100%;
	font-size: 16px;
	padding: 12px 16px;
	border: 1px solid var(--sf-gl-line);
	border-radius: 999px;
	background: #fff;
	outline: none;
}
.sf-gl-q:focus { border-color: var(--sf-gl-accent); box-shadow: 0 0 0 3px rgba(42,61,72,.18); }

.sf-gl-days { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-gl-pill {
	font: inherit;
	font-size: 14px;
	line-height: 1;
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid var(--sf-gl-line);
	background: #fff;
	color: var(--sf-gl-ink);
	cursor: pointer;
	transition: background .12s, border-color .12s, color .12s;
}
.sf-gl-pill:hover { border-color: var(--sf-gl-accent); }
.sf-gl-pill.is-active {
	background: var(--sf-gl-accent);
	border-color: var(--sf-gl-accent);
	color: #fff;
}
.sf-gl-pill.sf-gl-today {
	border-color: var(--sf-gl-accent);
	color: var(--sf-gl-accent-dark);
	font-weight: 600;
}
.sf-gl-pill.sf-gl-today.is-active { color: #fff; }
.sf-gl-types {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.sf-gl-secondary {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--sf-gl-line);
}
/* The Support type pill keeps its filled look even when inactive, to stay findable. */
.sf-gl-type-pill-support { border-color: var(--sf-gl-accent); color: var(--sf-gl-accent-dark); font-weight: 600; }
.sf-gl-type-pill-support.is-active { background: var(--sf-gl-accent); border-color: var(--sf-gl-accent); color: #fff; }
.sf-gl-select select {
	font: inherit;
	font-size: 14px;
	padding: 9px 12px;
	border: 1px solid var(--sf-gl-line);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
}
.sf-gl-newtoggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}
.sf-gl-status {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--sf-gl-muted);
}

/* ---------- Featured "New Groups" band ---------- */
.sf-gl-featured {
	margin: 0 0 30px;
	padding: 16px 18px 18px;
	border: 1px solid var(--sf-gl-line);
	border-top: 3px solid var(--sf-gl-new);
	border-radius: var(--sf-gl-radius);
	background: var(--sf-gl-bg-soft);
}
.sf-gl-featured-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 2px;
	font-size: 20px;
	color: var(--sf-gl-accent-dark);
}
.sf-gl-featured-note {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--sf-gl-muted);
}

/* ---------- Day sections ---------- */
.sf-gl-day-section { margin-bottom: 46px; }
.sf-gl-day-section + .sf-gl-day-section { margin-top: 10px; }
.sf-gl-day-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: .005em;
	margin: 0 0 18px;
	padding: 0 0 10px;
	border-bottom: 3px solid var(--sf-gl-accent);
	color: var(--sf-gl-accent-dark);
}
/* Colored tick makes each day header easy to spot while scrolling. */
.sf-gl-day-heading::before {
	content: "";
	flex: 0 0 auto;
	width: 6px;
	height: 1.05em;
	border-radius: 3px;
	background: var(--sf-gl-accent);
}

/* ---------- Cards grid ---------- */
.sf-gl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}
.sf-gl-card {
	background: var(--sf-gl-card);
	border: 1px solid var(--sf-gl-line);
	border-radius: var(--sf-gl-radius);
	box-shadow: var(--sf-gl-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
/* Colored title header */
.sf-gl-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 13px 16px;
	background: var(--sf-gl-accent);
	color: #fff;
}
.sf-gl-card-head .sf-gl-card-title {
	font-size: 18px;
	line-height: 1.25;
	margin: 0;
	/* !important so a theme's heading color can't override the header title. */
	color: #fff !important;
}
.sf-gl-badges {
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}
.sf-gl-badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
	color: #fff;
	white-space: nowrap;
}
.sf-gl-badge-new { background: var(--sf-gl-new); }
/* On the colored header, the type badge is a readable white outline. */
.sf-gl-badge-type {
	font-weight: 600;
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,.55);
}
.sf-gl-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.sf-gl-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sf-gl-meta li {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-size: 14px;
	color: var(--sf-gl-muted);
}
.sf-gl-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	color: var(--sf-gl-accent-soft);
}
.sf-gl-svg {
	width: 16px;
	height: 16px;
	display: block;
}
.sf-gl-meta li .sf-gl-ico { margin-top: 1px; }
.sf-gl-featured-heading .sf-gl-svg { width: 20px; height: 20px; color: var(--sf-gl-new); }

/* Off-campus tag next to the location */
.sf-gl-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	padding: 3px 7px;
	margin-left: 4px;
	border-radius: 999px;
	vertical-align: middle;
	white-space: nowrap;
}
.sf-gl-tag-off {
	background: var(--sf-gl-bg-soft);
	color: var(--sf-gl-accent-dark);
	border: 1px solid var(--sf-gl-line);
}

/* Schedule / timing note callout */
.sf-gl-schedule-note {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	font-size: 13px;
	line-height: 1.4;
	margin: 0 0 12px;
	padding: 8px 11px;
	border-radius: 8px;
	background: rgba(238,45,36,.07);
	border: 1px solid rgba(238,45,36,.25);
	color: var(--sf-gl-ink);
}
.sf-gl-schedule-note::before {
	content: "🗓️";
	font-size: 13px;
	line-height: 1.4;
}
.sf-gl-study {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 12px;
	color: var(--sf-gl-ink);
}
.sf-gl-study :first-child { margin-top: 0; }
.sf-gl-study :last-child { margin-bottom: 0; }
.sf-gl-study-label { font-weight: 600; color: var(--sf-gl-accent-dark); }
.sf-gl-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.sf-gl-btn {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--sf-gl-accent);
	color: #fff !important;
	border: 1px solid var(--sf-gl-accent);
}
.sf-gl-btn:hover { background: var(--sf-gl-accent-dark); }
.sf-gl-btn-ghost {
	background: #fff;
	color: var(--sf-gl-accent-dark) !important;
	border-color: var(--sf-gl-line);
}
.sf-gl-btn-ghost:hover { border-color: var(--sf-gl-accent); background: #fff; }

/* ---------- States ---------- */
.sf-gl-noresults {
	text-align: center;
	padding: 30px 10px;
	color: var(--sf-gl-muted);
	font-size: 15px;
}
.sf-gl-reset {
	font: inherit;
	color: var(--sf-gl-accent-dark);
	background: none;
	border: none;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}
.sf-gl-empty { color: var(--sf-gl-muted); }
.sf-gl [hidden] { display: none !important; }

/* WP accessibility helper (in case theme lacks it) */
.sf-gl .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.sf-gl-controls { padding: 12px; }
	.sf-gl-secondary { justify-content: space-between; }
	.sf-gl-grid { grid-template-columns: 1fr; }
	.sf-gl-day-heading { font-size: 21px; }
	.sf-gl-day-section { margin-bottom: 38px; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.sf-gl-pill { transition: none; }
}
