/**
 * Newsletter Frontend Styles
 * 
 * @package Newsletter_Subscriptions
 * @version 2.0.0
 */

/* Container */
.newsletter-container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Content */
.newsletter-content {
	display: flex;
	flex-direction: column;
	padding: 0px;
	gap: 16px;
	width: 100%;
}

/* Title & Description */
.newsletter-title {
	font-family: "Inter", sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: #1a1a1a;
	margin: 0 0 8px;
}

.newsletter-description {
	font-family: "Inter", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #667085;
	margin: 0 0 16px;
}

/* Form */
.newsletter-form {
	width: 100%;
}

/* Email capture */
.newsletter-email-capture {
	display: flex;
	flex-direction: row;
	padding: 0px;
	gap: 16px;
	width: 100%;
}

/* Input field */
.newsletter-input-field {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 0px;
	gap: 6px;
	width: 100%;
}

.newsletter-input-wrapper {
	width: 100%;
}

/* Input */
.newsletter-input {
	box-sizing: border-box;
	display: flex;
	width: 100%;
	padding: 10px 14px;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
	border-radius: 8px;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	line-height: 24px;
	color: #1a1a1a;
	min-width: 269px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-input::placeholder {
	color: #667085;
}

.newsletter-input:focus {
	outline: none;
	border-color: #44403c;
	box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), 0 0 0 3px rgba(68, 64, 60, 0.1);
}

.newsletter-input:disabled {
	background: #f9fafb;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Button */
.newsletter-button {
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 10px 16px;
	width: 100%;
	background: #44403c;
	box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), 
	            inset 0px 0px 0px 1px rgba(16, 24, 40, 0.18), 
	            inset 0px -2px 0px rgba(16, 24, 40, 0.05);
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-family: "Inter", sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: #ffffff;
	transition: background 0.2s ease, opacity 0.2s ease;
	max-width: 30%;
	white-space: nowrap;
}

.newsletter-button:hover {
	background: #353330;
}

.newsletter-button:active {
	background: #292624;
}

.newsletter-button:disabled {
	cursor: not-allowed;
	opacity: 0.6;
	background: #44403c;
}

/* Loading State */
.newsletter-form--loading .newsletter-input {
	opacity: 0.6;
}

.newsletter-form--loading .newsletter-button {
	position: relative;
}

.newsletter-form--loading .newsletter-button::after {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: newsletter-spin 0.6s linear infinite;
}

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

/* Message */
.newsletter-message {
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	width: 100%;
	min-height: 24px;
	padding: 8px 12px;
	margin-top: 12px;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.newsletter-message:empty {
	padding: 0;
	min-height: 0;
}

/* Accessibility */
.newsletter-input:focus-visible,
.newsletter-button:focus-visible {
	outline: 2px solid #44403c;
	outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.newsletter-email-capture {
		flex-direction: column;
	}
	
	.newsletter-button {
		max-width: 100%;
	}
}

@media (max-width: 479px) {
	.newsletter-input {
		min-width: auto;
		font-size: 16px; /* Prevent zoom on iOS */
	}
	
	.newsletter-title {
		font-size: 20px;
	}
	
	.newsletter-description {
		font-size: 14px;
	}
}

/* Print */
@media print {
	.newsletter-container {
		display: none;
	}
}
