/* Columbia Running Club - RunSignup Member Access
 *
 * Written to sit inside the club's Divi child theme rather than fight it:
 * fonts and text colour are inherited from the theme, and the button
 * geometry matches Divi's (uppercase, 6px 20px, 17px radius, 2px border).
 *
 * Colours come from the plugin settings as CSS variables, so they can be
 * changed in the admin without touching this file. --crc-accent and
 * --crc-heading are set inline by the plugin; the values below are fallbacks.
 *
 * Deliberately no prefers-color-scheme rules: the site is light in every
 * colour scheme, and a dark panel on a white page looks broken.
 */

.crc-rsu-gate,
.crc-rsu-renewal,
.crc-rsu-flash {
	font-family: inherit;
	box-sizing: border-box;
	padding: 25px 30px;
	border-radius: 6px;
	line-height: 1.7;

	/* Centred, and held to the panel width set in the admin, so the panel sits
	   inside the theme's content column instead of spanning the viewport. */
	max-width: var(--crc-panel-width, 720px);
	margin: 1.5em auto;
}

/* Optional: centre the text as well. Off by default - a centred panel with
   left-aligned text reads better once there is more than one line. */
.crc-rsu-panel--center {
	text-align: center;
}

/* ---- Gate: shown in place of member-only content ---- */

.crc-rsu-gate {
	background: #f6f8fa;
	border: 1px solid #e1e6ec;
	border-left: 4px solid var(--crc-heading, #2c446d);
	color: inherit;
}

.crc-rsu-gate p {
	margin: 0 0 1em;
}

.crc-rsu-gate p:last-child {
	margin-bottom: 0;
}

.crc-rsu-gate__small {
	font-size: 0.9em;
	opacity: 0.75;
}

/* ---- Renewal banner: lapsed but inside the grace period ---- */

.crc-rsu-renewal {
	background: #fff8ec;
	border: 1px solid #f0dcbc;
	border-left: 4px solid #e0921f;
}

.crc-rsu-renewal p {
	margin: 0 0 1em;
}

.crc-rsu-renewal p:last-child {
	margin-bottom: 0;
}

.crc-rsu-renewal__lead {
	color: #8a5300;
	font-size: 1.05em;
}

/* ---- One-off sign-in error ---- */

.crc-rsu-flash {
	background: #fff8ec;
	border-left: 4px solid #e0921f;
}

.crc-rsu-flash p {
	margin: 0;
}

/* ---- Buttons: matched to the theme's own ---- */

.crc-rsu-button {
	display: inline-block;
	background: var(--crc-accent, #03a9f4);
	border: 2px solid var(--crc-accent, #03a9f4);
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.7;
	text-transform: uppercase;
	text-decoration: none;
	padding: 6px 20px;
	border-radius: 17px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.crc-rsu-button:hover,
.crc-rsu-button:focus {
	background: transparent;
	color: var(--crc-accent, #03a9f4);
	text-decoration: none;
}

.crc-rsu-button:focus-visible {
	outline: 3px solid var(--crc-heading, #2c446d);
	outline-offset: 2px;
}

/* When the theme's own button class is added in settings, let the theme win
   so the button is pixel-identical to every other button on the site. */
.crc-rsu-button.et_pb_button {
	background: none;
	border-width: 2px;
	font-size: inherit;
	padding: 0.3em 1em;
	border-radius: 17px;
}

/* ---- Status line ---- */

.crc-rsu-status {
	font-size: 0.95em;
}

.crc-rsu-status--lapsed {
	color: #8a5300;
}

@media (max-width: 640px) {

	.crc-rsu-gate,
	.crc-rsu-renewal,
	.crc-rsu-flash {
		padding: 20px;
	}

	.crc-rsu-button {
		display: block;
		text-align: center;
		font-size: 16px;
	}
}
