/**
 * Simple Mailing List - Frontend Styles
 */

.sml-container {
	max-width: 540px;
	margin: 1.5rem auto;
	padding: 1.75rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	font-family: inherit;
	box-sizing: border-box;
}

.sml-container *,
.sml-container *::before,
.sml-container *::after {
	box-sizing: border-box;
}

.sml-title {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.25;
}

.sml-description {
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: #64748b;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sml-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sml-field-group {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.sml-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 0.35rem;
}

.sml-required {
	color: #e11d48;
	margin-left: 2px;
}

.sml-input {
	width: 100%;
	padding: 0.65rem 0.85rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #1e293b;
	background-color: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.sml-input:focus {
	outline: none;
	border-color: #3b82f6;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.sml-button-group {
	margin-top: 0.5rem;
}

.sml-submit-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.75rem 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff;
	background-color: #2563eb;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.15s ease-in-out, opacity 0.15s ease-in-out, transform 0.1s ease-in-out;
	position: relative;
}

.sml-submit-button:hover {
	background-color: #1d4ed8;
}

.sml-submit-button:active {
	transform: scale(0.99);
}

.sml-submit-button:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

/* Spinner */
.sml-spinner {
	display: none;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: sml-spin 0.75s linear infinite;
}

.sml-submit-button.sml-loading .sml-spinner {
	display: inline-block;
}

@keyframes sml-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Feedback Message Box */
.sml-message-box {
	margin-bottom: 1.25rem;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	font-size: 0.925rem;
	line-height: 1.4;
}

.sml-message-box.sml-success {
	background-color: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.sml-message-box.sml-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

/* Unsubscribe specific styling */
.sml-unsubscribe-container .sml-submit-button {
	background-color: #475569;
}

.sml-unsubscribe-container .sml-submit-button:hover {
	background-color: #334155;
}

/* Responsive adjustment */
@media (max-width: 480px) {
	.sml-container {
		padding: 1.25rem;
	}
	.sml-title {
		font-size: 1.25rem;
	}
}

