/**
 * Frontend Styles for Ageless Living Gift Signup.
 * Fully namespaced with .agl-gift- prefix to prevent style pollution.
 *
 * @package AgelessLivingGift
 */

/* Container and Section */
.agl-gift-section {
	width: 100%;
	box-sizing: border-box;
	background: transparent;
	border: none;
	padding: 50px 24px;
	margin: 20px 0;
	color: #403A37;
	font-family: Arial, Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.agl-gift-section *,
.agl-gift-section *::before,
.agl-gift-section *::after {
	box-sizing: border-box;
}

.agl-gift-container {
	max-width: 1120px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
}

/* Left Column: Editorial Content */
.agl-gift-editorial {
	flex: 1 1 50%;
	max-width: 520px;
}

.agl-gift-eyebrow {
	display: inline-block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #C79A58;
	margin-bottom: 14px;
}

.agl-gift-heading {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 38px;
	line-height: 1.25;
	font-weight: normal;
	color: #7F2027;
	margin: 0 0 16px 0;
	letter-spacing: -0.01em;
}

.agl-gift-flourish {
	margin: 0 0 20px 0;
	line-height: 1;
}

.agl-gift-description {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	line-height: 1.65;
	color: #403A37;
	margin-bottom: 26px;
}

.agl-gift-description p {
	margin: 0 0 14px 0;
	line-height: 1.65;
}

.agl-gift-description p:last-child {
	margin-bottom: 0;
}

.agl-gift-editorial-highlights {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid #EAD9CF;
}

.agl-gift-highlight-item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #65151C;
	font-weight: 500;
}

.agl-gift-highlight-item svg {
	flex-shrink: 0;
}

/* Right Column: Form Card */
.agl-gift-card {
	flex: 1 1 50%;
	max-width: 480px;
	background-color: #FFFFFF;
	border: 1px solid #EAD9CF;
	border-radius: 10px;
	padding: 42px 38px;
	box-shadow: 0 12px 32px rgba(101, 21, 28, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
	position: relative;
	transition: all 0.3s ease;
}

/* Form Groups and Fields */
.agl-gift-field-group {
	margin-bottom: 20px;
}

.agl-gift-label {
	display: block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #282323;
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}

.agl-gift-required {
	color: #B72D37;
	font-weight: bold;
	margin-left: 2px;
}

.agl-gift-form input.agl-gift-input,
.agl-gift-input {
	display: block;
	width: 100%;
	height: 54px;
	padding: 12px 18px !important;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	color: #282323;
	background-color: #FFFFFF;
	border: 1.5px solid #EAD9CF;
	border-radius: 8px;
	outline: none;
	box-sizing: border-box !important;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.agl-gift-input::placeholder {
	color: #A89D97;
	opacity: 1;
}

.agl-gift-input:focus {
	border-color: #7F2027;
	box-shadow: 0 0 0 3px rgba(127, 32, 39, 0.15);
	background-color: #FFFDFB;
}

.agl-gift-input.agl-gift-has-error {
	border-color: #B72D37;
	background-color: #FFF9F9;
}

.agl-gift-input.agl-gift-has-error:focus {
	border-color: #922029;
	box-shadow: 0 0 0 3px rgba(183, 45, 55, 0.18);
}

.agl-gift-field-error {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	color: #B72D37;
	margin-top: 6px;
	min-height: 18px;
	display: none;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

.agl-gift-field-error.agl-active {
	display: flex;
}

/* Optional Marketing Consent Checkbox */
.agl-gift-consent-group {
	margin-bottom: 24px;
	padding: 4px 0;
}

.agl-gift-checkbox-label {
	display: flex;
	align-items: flex-start;
	cursor: pointer;
	gap: 12px;
	position: relative;
	user-select: none;
}

.agl-gift-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

.agl-gift-checkbox-custom {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 2px;
	background-color: #FFFFFF;
	border: 1.5px solid #EAD9CF;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.agl-gift-checkbox-custom svg {
	opacity: 0;
	transform: scale(0.6);
	transition: all 0.2s ease;
}

.agl-gift-checkbox:focus-visible + .agl-gift-checkbox-custom {
	outline: 2px solid #7F2027;
	outline-offset: 2px;
}

.agl-gift-checkbox:checked + .agl-gift-checkbox-custom {
	border-color: #7F2027;
	background-color: #FBF1EC;
}

.agl-gift-checkbox:checked + .agl-gift-checkbox-custom svg {
	opacity: 1;
	transform: scale(1);
}

.agl-gift-consent-text {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13.5px;
	line-height: 1.55;
	color: #403A37;
}

/* Submit Button & CTA */
.agl-gift-submit-group {
	margin-bottom: 18px;
}

.agl-gift-form button.agl-gift-submit-btn,
.agl-gift-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 16px 28px !important;
	background-color: #7F2027 !important;
	color: #FFFFFF !important;
	border: 1.5px solid #65151C !important;
	border-radius: 8px !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(127, 32, 39, 0.25);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	text-decoration: none;
	line-height: 1.2 !important;
}

.agl-gift-submit-btn:hover {
	background-color: #65151C;
	border-color: #490e13;
	box-shadow: 0 6px 20px rgba(101, 21, 28, 0.35);
	transform: translateY(-1px);
	color: #FFFFFF;
}

.agl-gift-submit-btn:active {
	transform: translateY(1px);
	box-shadow: 0 2px 8px rgba(101, 21, 28, 0.25);
}

.agl-gift-submit-btn:focus-visible {
	outline: 2px solid #C79A58;
	outline-offset: 3px;
}

.agl-gift-submit-btn:disabled {
	opacity: 0.8;
	cursor: not-allowed;
	transform: none !important;
}

.agl-gift-btn-spinner {
	display: none;
	margin-left: 10px;
	line-height: 1;
}

.agl-gift-submit-btn.agl-loading .agl-gift-btn-spinner {
	display: inline-flex;
}

.agl-spinner-svg {
	animation: agl-spin 1s linear infinite;
}

@keyframes agl-spin {
	100% {
		transform: rotate(360deg);
	}
}

/* Privacy Assurance Note */
.agl-gift-privacy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding-bottom: 0 !important;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12.5px;
	color: #666;
	line-height: 1.4;
	text-align: center;
}

.agl-gift-privacy svg {
	flex-shrink: 0;
}

/* General Alert / Error Box */
.agl-gift-general-error {
	background-color: #FFF2F2;
	border-left: 4px solid #B72D37;
	border-radius: 4px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 13.5px;
	color: #922029;
	line-height: 1.5;
}

/* Thank You State */
.agl-gift-thank-you-wrapper {
	width: 100%;
	animation: agl-fade-in 0.4s ease forwards;
}

@keyframes agl-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.agl-gift-thank-you {
	text-align: center;
	padding: 10px 4px 6px;
}

.agl-gift-ty-icon {
	margin-bottom: 18px;
	line-height: 1;
}

.agl-gift-ty-heading {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 26px;
	line-height: 1.3;
	font-weight: normal;
	color: #7F2027;
	margin: 0 0 14px 0;
}

.agl-gift-ty-divider {
	width: 44px;
	height: 1.5px;
	background-color: #C79A58;
	margin: 0 auto 20px;
}

.agl-gift-ty-download-action {
	margin: 0 0 24px 0;
}

.agl-gift-card .agl-gift-ty-download-btn,
.agl-gift-ty-download-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 16px 28px !important;
	background-color: #7F2027 !important;
	color: #FFFFFF !important;
	border: 1.5px solid #65151C !important;
	border-radius: 8px !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(127, 32, 39, 0.25);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box !important;
}

.agl-gift-card .agl-gift-ty-download-btn:hover,
.agl-gift-ty-download-btn:hover {
	background-color: #65151C !important;
	color: #FFFFFF !important;
	box-shadow: 0 6px 20px rgba(101, 21, 28, 0.35);
	transform: translateY(-1px);
}

.agl-gift-ty-message {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 16.5px;
	line-height: 1.7;
	color: #403A37;
	margin-bottom: 26px;
}

.agl-gift-ty-message p {
	margin: 0 0 14px 0;
}

.agl-gift-ty-message p:last-child {
	margin-bottom: 0;
}

.agl-gift-ty-action {
	margin-top: 24px;
}

.agl-gift-ty-btn {
	display: inline-block;
	padding: 14px 28px;
	background-color: #7F2027;
	color: #FFFFFF;
	border-radius: 6px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 1px solid #65151C;
}

.agl-gift-ty-btn:hover {
	background-color: #65151C;
	color: #FFFFFF;
	box-shadow: 0 4px 12px rgba(101, 21, 28, 0.25);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Tablet (Max 960px) */
@media screen and (max-width: 960px) {
	.agl-gift-section {
		padding: 50px 20px;
	}
	.agl-gift-container {
		gap: 40px;
	}
	.agl-gift-heading {
		font-size: 32px;
	}
	.agl-gift-description {
		font-size: 17px;
	}
	.agl-gift-card {
		padding: 34px 28px;
	}
}

/* Mobile (Max 720px) */
@media screen and (max-width: 720px) {
	.agl-gift-section {
		padding: 44px 16px;
		margin: 30px 0;
	}
	.agl-gift-container {
		flex-direction: column;
		align-items: stretch;
		gap: 36px;
	}
	.agl-gift-editorial {
		max-width: 100%;
		text-align: center;
	}
	.agl-gift-flourish {
		display: flex;
		justify-content: center;
	}
	.agl-gift-editorial-highlights {
		align-items: center;
	}
	.agl-gift-highlight-item {
		text-align: left;
	}
	.agl-gift-card {
		max-width: 100%;
		width: 100%;
		padding: 30px 20px;
		border-radius: 8px;
	}
	.agl-gift-heading {
		font-size: 28px;
	}
	.agl-gift-description {
		font-size: 16px;
	}
	.agl-gift-input {
		font-size: 16px; /* Prevents auto-zoom on iOS Safari */
		height: 52px;
	}
	.agl-gift-submit-btn {
		min-height: 52px;
		padding: 15px 20px;
		font-size: 13.5px;
	}
}
