/**
 * Lead Magnet Delivery - Public front-end styles
 */

.lmd-optin-wrap {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	max-width: 100%;
}

.lmd-optin-wrap *,
.lmd-optin-wrap *::before,
.lmd-optin-wrap *::after {
	box-sizing: inherit;
}

/* Honeypot - hidden from users */
.lmd-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	opacity: 0;
	pointer-events: none;
}

/* Card style (default) */
.lmd-style-card .lmd-form-container {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	padding: 24px;
}

.lmd-style-card .lmd-thumbnail {
	margin-bottom: 16px;
}

.lmd-style-card .lmd-thumbnail img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.lmd-style-card .lmd-title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	color: #1e293b;
}

.lmd-style-card .lmd-description {
	margin-bottom: 20px;
	font-size: 0.9rem;
	color: #64748b;
	line-height: 1.5;
}

.lmd-style-card .lmd-field {
	margin-bottom: 12px;
}

.lmd-style-card .lmd-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 1rem;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.lmd-style-card .lmd-input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.lmd-style-card .lmd-submit {
	width: 100%;
	padding: 14px 24px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	position: relative;
}

.lmd-style-card .lmd-submit:hover {
	background: #1d4ed8;
}

.lmd-style-card .lmd-submit:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Minimal style */
.lmd-style-minimal .lmd-form-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.lmd-style-minimal .lmd-field {
	margin-bottom: 0;
	flex: 1;
	min-width: 180px;
}

.lmd-style-minimal .lmd-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 0.95rem;
}

.lmd-style-minimal .lmd-input:focus {
	outline: none;
	border-color: #2563eb;
}

.lmd-style-minimal .lmd-submit-wrap {
	flex: 0 0 auto;
}

.lmd-style-minimal .lmd-submit {
	padding: 10px 20px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.lmd-style-minimal .lmd-submit:hover {
	background: #1d4ed8;
}

.lmd-style-minimal .lmd-consent {
	flex: 1 1 100%;
}

/* Inline style */
.lmd-style-inline .lmd-form-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	padding: 24px;
}

.lmd-style-inline .lmd-thumbnail {
	flex: 0 0 120px;
	margin-bottom: 0;
}

.lmd-style-inline .lmd-thumbnail img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.lmd-style-inline .lmd-content {
	flex: 1;
	min-width: 180px;
}

.lmd-style-inline .lmd-title {
	margin: 0 0 4px;
	font-size: 1.1rem;
}

.lmd-style-inline .lmd-description {
	margin: 0;
	font-size: 0.85rem;
	color: #64748b;
}

.lmd-style-inline .lmd-optin-form {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
}

.lmd-style-inline .lmd-field {
	margin-bottom: 0;
}

.lmd-style-inline .lmd-field.lmd-consent {
	flex: 1 1 100%;
}

.lmd-style-inline .lmd-input {
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 0.95rem;
}

.lmd-style-inline .lmd-submit {
	padding: 10px 20px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}

/* Loading spinner */
.lmd-submit {
	position: relative;
}

.lmd-submit .lmd-spinner {
	display: none;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: lmd-spin 0.7s linear infinite;
}

.lmd-submit.lmd-loading .lmd-btn-text {
	visibility: hidden;
}

.lmd-submit.lmd-loading .lmd-spinner {
	display: block;
}

@keyframes lmd-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error message */
.lmd-error {
	background: #fef2f2;
	color: #b91c1c;
	padding: 10px 14px;
	border-radius: 6px;
	margin-bottom: 12px;
	font-size: 0.9rem;
}

/* Success message */
.lmd-success-inner {
	text-align: center;
	padding: 24px;
	background: #f0fdf4;
	border-radius: 8px;
	border: 1px solid #bbf7d0;
}

.lmd-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: #22c55e;
	color: #fff;
	border-radius: 50%;
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 12px;
}

.lmd-success-title {
	margin: 0 0 8px;
	color: #166534;
	font-size: 1.25rem;
}

.lmd-success-magnet-name {
	margin: 0 0 4px;
	font-weight: 600;
	color: #1e293b;
}

.lmd-success-text {
	margin: 0;
	color: #64748b;
	font-size: 0.95rem;
}

/* Mobile */
@media (max-width: 640px) {
	.lmd-style-inline .lmd-form-container {
		flex-direction: column;
		align-items: stretch;
	}

	.lmd-style-inline .lmd-optin-form {
		flex-direction: column;
	}

	.lmd-style-minimal .lmd-form-container {
		flex-direction: column;
	}

	.lmd-style-minimal .lmd-field {
		min-width: 100%;
	}
}
