/**
 * Login modal for My Community School page.
 */

.cs-login-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.cs-login-modal-overlay.is-open {
	display: flex;
}

.cs-login-modal {
	position: relative;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	max-width: 400px;
	width: 100%;
	padding: 1.5rem 1.75rem;
	max-height: 90vh;
	overflow-y: auto;
}

.cs-login-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: #555;
	cursor: pointer;
	padding: 0.25rem;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

.cs-login-modal-close:hover,
.cs-login-modal-close:focus {
	color: #1a1a1a;
	background: #f0f0f0;
	outline: none;
}

.cs-login-modal-title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.cs-login-modal-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 500;
}

.cs-login-modal-form .login-username,
.cs-login-modal-form .login-password {
	margin-bottom: 1rem;
}

.cs-login-modal-form input[type="text"],
.cs-login-modal-form input[type="password"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 1rem;
	box-sizing: border-box;
}

.cs-login-modal-form input:focus {
	border-color: #1e40af;
	outline: none;
}

.cs-login-modal-form .login-submit {
	margin-top: 0.5rem;
}

.cs-login-modal-form .login-remember {
	margin-bottom: 0.75rem;
}

.cs-login-modal-links {
	margin: 1rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid #eee;
	font-size: 0.9rem;
}

.cs-login-modal-links a {
	color: #1e40af;
}

.cs-login-modal-links a:hover {
	text-decoration: underline;
}

/* Button styling when used next to modal trigger */
.cs-section-login .cs-btn {
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
}

.cs-section-login .cs-btn-secondary {
	display: inline-block;
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	border: 1px solid currentColor;
}
