/* Community Schooling - Public
 * Global typography + shared buttons and links across public shortcodes
 * (registration, dashboard, My Community School, etc.)
 */

/* Base typography */
body .cs-registration-wrap,
body .cs-dashboard,
body .cs-my-community-wrap {
	font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #1a1d21;
}

.cs-registration-wrap h1,
.cs-dashboard h1,
.cs-my-community-wrap .cs-community-title {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: #111827;
	margin: 0 0 0.8rem;
}

.cs-registration-wrap h2,
.cs-dashboard h2,
.cs-section-title {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.3rem;
	font-weight: 600;
	color: #111827;
	margin: 1.5rem 0 0.75rem;
}

.cs-registration-wrap p,
.cs-dashboard p,
.cs-my-community-wrap p,
.cs-registration-wrap li,
.cs-dashboard li {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #1a1d21;
}

.cs-registration-wrap small,
.cs-dashboard small {
	font-size: 0.8rem;
	color: #6b7280;
}

/* Links */
.cs-registration-wrap a,
.cs-dashboard a,
.cs-my-community-wrap a {
	color: #1e40af;
	text-decoration: none;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.cs-registration-wrap a:hover,
.cs-registration-wrap a:focus,
.cs-dashboard a:hover,
.cs-dashboard a:focus,
.cs-my-community-wrap a:hover,
.cs-my-community-wrap a:focus {
	color: #1d4ed8;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

/* Shared button styles */
.cs-btn,
.cs-registration-wrap .button,
.cs-dashboard .button,
.cs-my-community-wrap .cs-btn,
.cs-my-community-wrap button[type="submit"],
.cs-my-community-wrap button[type="button"],
.cs-registration-wrap input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem 1.1rem;
	border-radius: 999px;
	font-family: 'Fraunces', Georgia, serif;
	font-size: 0.9375rem;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cs-btn-primary,
.cs-registration-wrap .cs-btn-primary,
.cs-dashboard .cs-btn-primary {
	background-color: #1e40af;
	border-color: #1e40af;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.cs-btn-primary:hover,
.cs-btn-primary:focus {
	background-color: #1d4ed8;
	border-color: #1d4ed8;
	color: #ffffff;
}

.cs-btn-secondary,
.cs-registration-wrap .cs-btn-secondary,
.cs-dashboard .cs-btn-secondary {
	background-color: #ffffff;
	border-color: #d1d5db;
	color: #1e40af;
}

.cs-btn-secondary:hover,
.cs-btn-secondary:focus {
	background-color: #eff6ff;
	border-color: #1d4ed8;
	color: #1d4ed8;
}

.cs-btn-ghost {
	background: transparent;
	border-color: transparent;
	color: #1e40af;
	box-shadow: none;
}

.cs-btn-ghost:hover,
.cs-btn-ghost:focus {
	background-color: rgba(37, 99, 235, 0.06);
	color: #1d4ed8;
}

/* Unified public message / alert styles */
.cs-message {
	padding: 0.7rem 0.9rem;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 0.9rem;
	line-height: 1.5;
	margin: 0.9rem 0;
}

.cs-message-info {
	background-color: #e0f2fe;  /* light blue */
	border-color:    #7dd3fc;
	color:           #0c4a6e;
}

.cs-message-success {
	background-color: #dcfce7;  /* light green */
	border-color:    #6ee7b7;
	color:           #166534;
}

.cs-message-error {
	background-color: #fee2e2;  /* light red */
	border-color:    #fecaca;
	color:           #b91c1c;
}

.cs-message-warning {
	background-color: #fef3c7;  /* light amber */
	border-color:    #fde68a;
	color:           #92400e;
}

/* Existing layout + form rules follow */

/* Community Schooling - Public forms and tables */
.cs-registration-wrap .cs-form fieldset {
	margin: 1.5em 0;
	border: 1px solid #e0e0e0;
	padding: 1.25em 1.5em;
	border-radius: 8px;
	background: #fafafa;
}
.cs-registration-wrap .cs-form legend {
	font-weight: 600;
	padding: 0 0.75em;
	font-size: 1rem;
	margin-bottom: 0 !important;
}
.cs-registration-wrap .cs-form p {
	margin: 0.5em 0;
}
.cs-registration-wrap .cs-form label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.25em;
}
.cs-registration-wrap .cs-form input[type="text"],
.cs-registration-wrap .cs-form input[type="email"],
.cs-registration-wrap .cs-form input[type="tel"],
.cs-registration-wrap .cs-form input[type="date"],
.cs-registration-wrap .cs-form select,
.cs-registration-wrap .cs-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.45em 0.6em;
	border-radius: 4px;
	border: 1px solid #ccc;
	font-size: 0.95rem;
}
.cs-fieldset-two-col .cs-fieldset-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	grid-column-gap: 1.5em;
	grid-row-gap: 0.75em;
}
.cs-fieldset-two-col .cs-field.cs-field-full {
	grid-column: 1 / -1;
}
.cs-registration-wrap .required { color: #b00; }
.cs-child-row {
	border: 1px dashed #ddd;
	padding: 0.75em;
	margin: 0.5em 0;
	border-radius: 6px;
	background: #fff;
}
.cs-message { padding: 0.75em 1em; margin: 1em 0; border-radius: 4px; }
.cs-message-error { background: #f8d7da; color: #721c24; }
.cs-message-info { background: #d1ecf1; color: #0c5460; }
.cs-message-success { background: #d4edda; color: #155724; }
.cs-dashboard h2 { margin-top: 0; }
.cs-membership-status.cs-inactive { color: #856404; }
.cs-dashboard-table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.cs-dashboard-table th, .cs-dashboard-table td { padding: 0.5em 0.75em; text-align: left; border: 1px solid #ddd; }
.cs-dashboard-table th { background: #f5f5f5; }
.cs-no-payments { color: #666; }

/* User Account section (registration) */
.cs-fieldset-user-account .cs-user-account-placeholder {
	color: #555;
	font-size: 0.95em;
	margin: 0;
}
.cs-fieldset-user-account .cs-user-account-existing {
	font-weight: 500;
	color: #0c5460;
}
.cs-fieldset-user-account .cs-user-account-new .cs-field {
	margin-bottom: 0.75em;
}
.cs-field-msg {
	display: block;
	font-size: 0.85em;
	margin-top: 0.25em;
}
.cs-field-msg.cs-msg-ok { color: #155724; }
.cs-field-msg.cs-msg-error { color: #721c24; }

/* Registration submit button with loader */
.cs-registration-submit-wrap {
	margin: 1.25em 0;
}
.cs-btn-submit {
	position: relative;
	min-height: 42px;
}
.cs-btn-submit .cs-btn-text,
.cs-btn-submit .cs-btn-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.cs-btn-submit.cs-btn-loading .cs-btn-text {
	visibility: hidden;
}
.cs-btn-submit .cs-btn-loader {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}
.cs-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cs-spin 0.7s linear infinite;
}
.cs-btn-submit .cs-btn-loading-text {
	font-size: 0.95em;
}
@keyframes cs-spin {
	to { transform: rotate(360deg); }
}
