/**
 * College-in-3 Lead Manager — Frontend Styles
 * Matches the exact design from the provided screenshots.
 *
 * @package CollegeIn3LeadManager
 */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
.ci3lm-form-wrap {
	--ci3lm-blue:       #1e3a8a;
	--ci3lm-blue-mid:   #2d5be3;
	--ci3lm-gold:       #f59e0b;
	--ci3lm-gold-dark:  #d97706;
	--ci3lm-white:      #ffffff;
	--ci3lm-bg:         #f7f8fa;
	--ci3lm-border:     #d1d5db;
	--ci3lm-shadow:     0 2px 10px rgba(0, 0, 0, 0.08);
	--ci3lm-shadow-in:  inset 0 2px 6px rgba(0, 0, 0, 0.06);
	--ci3lm-radius:     10px;
	--ci3lm-radius-pill:50px;
	--ci3lm-text:       #111827;
	--ci3lm-label:      #111827;
	--ci3lm-error:      #dc2626;
	--ci3lm-success:    #16a34a;
	--ci3lm-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	--ci3lm-transition: 0.2s ease;
}

/* ============================================================
   Form Wrapper
   ============================================================ */
.ci3lm-form-wrap {
	font-family: var(--ci3lm-font);
	color: var(--ci3lm-text);
	max-width: 780px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
}

/* ============================================================
   Titles
   ============================================================ */
.ci3lm-form-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ci3lm-blue);
	margin: 0 0 20px;
}

.ci3lm-news-title {
	color: var(--ci3lm-blue);
}

.ci3lm-news-desc {
	font-size: 0.95rem;
	color: #374151;
	margin: 0 0 24px;
	line-height: 1.6;
}

/* ============================================================
   Alerts
   ============================================================ */
.ci3lm-alert {
	padding: 14px 18px;
	border-radius: var(--ci3lm-radius);
	margin-bottom: 20px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.ci3lm-alert--success {
	background: #dcfce7;
	border: 1px solid #86efac;
	color: #166534;
}

.ci3lm-alert--error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

/* ============================================================
   Form Layout
   ============================================================ */
.ci3lm-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ci3lm-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.ci3lm-row--name {
	gap: 14px;
}

/* ============================================================
   Field Groups
   ============================================================ */
.ci3lm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ci3lm-field--checkbox {
	gap: 0;
}

/* ============================================================
   Labels
   ============================================================ */
.ci3lm-label {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ci3lm-label);
	display: flex;
	align-items: center;
	gap: 5px;
}

.ci3lm-tag-required {
	font-size: 0.78rem;
	font-weight: 400;
	color: #ef4444;
}

.ci3lm-sub-label {
	font-size: 0.78rem;
	color: #6b7280;
	margin-top: 2px;
}

.ci3lm-required {
	color: #ef4444;
}

/* ============================================================
   Inputs — Membership (rounded rectangle, matches screenshot 1)
   ============================================================ */
.ci3lm-input {
	width: 100%;
	box-sizing: border-box;
	background: var(--ci3lm-bg);
	border: 1.5px solid transparent;
	border-radius: var(--ci3lm-radius);
	box-shadow: var(--ci3lm-shadow), var(--ci3lm-shadow-in);
	padding: 14px 16px;
	font-size: 0.95rem;
	font-family: var(--ci3lm-font);
	color: var(--ci3lm-text);
	outline: none;
	transition: border-color var(--ci3lm-transition), box-shadow var(--ci3lm-transition);
	-webkit-appearance: none;
	appearance: none;
}

.ci3lm-input:focus {
	border-color: var(--ci3lm-blue-mid);
	box-shadow: 0 0 0 3px rgba(45, 91, 227, 0.15), var(--ci3lm-shadow-in);
	background: var(--ci3lm-white);
}

.ci3lm-input.ci3lm-has-error {
	border-color: var(--ci3lm-error);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Pill inputs — Newsletter form (matches screenshot 2) */
.ci3lm-input--pill {
	border-radius: var(--ci3lm-radius-pill);
	padding: 14px 20px;
}

/* Textarea */
.ci3lm-textarea {
	resize: vertical;
	min-height: 140px;
	border-radius: var(--ci3lm-radius);
}

/* ============================================================
   Field Errors
   ============================================================ */
.ci3lm-field-error {
	font-size: 0.8rem;
	color: var(--ci3lm-error);
	display: none;
}

.ci3lm-field-error.visible {
	display: block;
}

/* ============================================================
   Checkbox
   ============================================================ */
.ci3lm-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 0.875rem;
	color: #374151;
	line-height: 1.5;
}

.ci3lm-checkbox {
	width: 18px;
	height: 18px;
	min-width: 18px;
	accent-color: var(--ci3lm-blue);
	cursor: pointer;
	margin-top: 2px;
}

/* ============================================================
   Submit Button — Membership (dark blue, matches screenshot 1)
   ============================================================ */
.ci3lm-btn {
	position: relative;
	width: 100%;
	padding: 16px 24px;
	border: none;
	border-radius: var(--ci3lm-radius-pill);
	font-size: 1rem;
	font-weight: 700;
	font-family: var(--ci3lm-font);
	cursor: pointer;
	transition: opacity var(--ci3lm-transition), transform var(--ci3lm-transition), box-shadow var(--ci3lm-transition);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	overflow: hidden;
	-webkit-appearance: none;
	appearance: none;
}

.ci3lm-btn--submit {
	background: linear-gradient(135deg, var(--ci3lm-blue) 0%, #2d4fc3 100%);
	color: var(--ci3lm-white);
	box-shadow: 0 4px 18px rgba(30, 58, 138, 0.35);
}

.ci3lm-btn--submit:hover:not(:disabled) {
	opacity: 0.92;
	transform: translateY(-1px);
	box-shadow: 0 6px 24px rgba(30, 58, 138, 0.45);
}

/* Newsletter button — golden/amber (matches screenshot 2) */
.ci3lm-btn--news {
	background: linear-gradient(135deg, var(--ci3lm-gold) 0%, var(--ci3lm-gold-dark) 100%);
	color: var(--ci3lm-white);
	box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.ci3lm-btn--news:hover:not(:disabled) {
	opacity: 0.92;
	transform: translateY(-1px);
	box-shadow: 0 6px 24px rgba(217, 119, 6, 0.5);
}

.ci3lm-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.ci3lm-btn-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ci3lm-spin 0.7s linear infinite;
}

.ci3lm-btn.loading .ci3lm-btn-spinner {
	display: inline-block;
}

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

/* ============================================================
   Honeypot — visually hidden
   ============================================================ */
.ci3lm-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   Newsletter Wrap — bordered card (matches red box in screenshot 2)
   ============================================================ */
.ci3lm-newsletter-wrap .ci3lm-newsletter-form {
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px 32px;
	background: var(--ci3lm-white);
}

/* ============================================================
   Responsive — tablets & mobile
   ============================================================ */
@media (max-width: 640px) {
	.ci3lm-row,
	.ci3lm-row--name {
		grid-template-columns: 1fr;
	}

	.ci3lm-newsletter-wrap .ci3lm-newsletter-form {
		padding: 20px 16px;
	}

	.ci3lm-form-title {
		font-size: 1.4rem;
	}
}

@media (max-width: 400px) {
	.ci3lm-btn {
		font-size: 0.92rem;
		padding: 14px 20px;
	}
}

/* Select dropdown for custom fields */
.ci3lm-select {
	width: 100%;
	padding: 14px 16px;
	background: #f8f9fa;
	border: 1.5px solid #dde2ea;
	border-radius: 12px;
	font-size: 15px;
	color: #1a1a2e;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 10px;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s;
}
.ci3lm-select:focus {
	outline: none;
	border-color: #2d4fa1;
	box-shadow: 0 0 0 3px rgba(45,79,161,.12);
}
