/* ============================================================
   HiveEngage Speaker Form — Styles
   Matches the thehivemind theme design system:
   Font: Krub | Brand gradient: #435CD6 → #AA5996 → #F45669
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.he-form-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 32px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
	font-family: 'Krub', 'Montserrat', sans-serif;
}

/* ── Header ──────────────────────────────────────────────── */
.he-form-header {
	margin-bottom: 32px;
	text-align: center;
}

.he-form-logo {
	display: block;
	margin: 0 auto 20px;
	height: 58px;
	width: auto;
	filter: invert(100%);
}

.he-form-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #333333;
	margin: 0 0 10px;
	line-height: 1.2;
}

.he-form-subtitle {
	font-size: 0.95rem;
	color: #666666;
	line-height: 1.6;
	max-width: 560px;
	margin: 0 auto;
}

/* ── Form Groups ─────────────────────────────────────────── */
.he-form-group {
	margin-bottom: 28px;
}

.he-label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	color: #333333;
	margin-bottom: 8px;
}

.he-required {
	color: #f14e56;
	margin-left: 3px;
}

.he-optional {
	color: #999999;
	font-weight: 400;
	font-size: 0.85rem;
	margin-left: 4px;
}

/* ── Textarea ────────────────────────────────────────────── */
.he-textarea {
	display: block;
	width: 100%;
	min-height: 120px;
	padding: 14px 16px;
	border: 1px solid #aaaaaa;
	border-radius: 10px;
	font-family: 'Krub', 'Montserrat', sans-serif;
	font-size: 0.95rem;
	color: #333333;
	background: #fafafa;
	resize: vertical;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	line-height: 1.6;
}

.he-textarea:focus {
	outline: none;
	border-color: #0080ff;
	box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.12);
	background: #ffffff;
}

.he-textarea::placeholder {
	color: #bbbbbb;
}

/* ── Field Hint ──────────────────────────────────────────── */
.he-field-hint {
	display: block;
	margin-top: 6px;
	font-size: 0.82rem;
	color: #888888;
	line-height: 1.5;
}

/* ── File Upload ─────────────────────────────────────────── */
.he-file-upload-area {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	border: 2px dashed #cccccc;
	border-radius: 10px;
	background: #fafafa;
	transition: border-color 0.2s ease, background 0.2s ease;
	cursor: pointer;
	flex-wrap: wrap;
}

.he-file-upload-area:hover {
	border-color: #0080ff;
	background: #f0f7ff;
}

.he-file-upload-area.he-drag-over {
	border-color: #0080ff;
	background: #e8f3ff;
}

.he-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.he-file-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	background: linear-gradient(90deg, rgba(67, 92, 214, 0.85) 0%, #AA5996 51.44%, rgba(244, 86, 105, 0.85) 100%);
	color: #ffffff;
	font-family: 'Krub', 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 0.88rem;
	padding: 10px 22px;
	border-radius: 25px;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.he-file-label:hover {
	opacity: 0.85;
}

.he-upload-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.he-file-name {
	font-size: 0.88rem;
	color: #888888;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.he-file-name.he-has-file {
	color: #333333;
	font-weight: 600;
}

/* ── Error Message ───────────────────────────────────────── */
.he-form-error {
	display: none;
	padding: 14px 18px;
	background: #fff0f0;
	border: 1px solid #f9c0c0;
	border-radius: 8px;
	color: #c0392b;
	font-size: 0.9rem;
	margin-bottom: 20px;
	line-height: 1.5;
}

.he-form-error.is-visible {
	display: block;
}

/* ── Submit Button ───────────────────────────────────────── */
.he-form-actions {
	display: flex;
	justify-content: center;
	padding-top: 8px;
}

.he-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	background: linear-gradient(90deg, rgba(67, 92, 214, 0.85) 0%, #AA5996 51.44%, rgba(244, 86, 105, 0.85) 100%);
	color: #ffffff;
	font-family: 'Krub', 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	padding: 16px 48px;
	border: none;
	border-radius: 25px;
	outline: none;
	transition: opacity 0.2s ease, transform 0.1s ease;
	min-width: 160px;
}

.he-submit-btn:hover:not(:disabled) {
	opacity: 0.88;
	transform: translateY(-1px);
}

.he-submit-btn:active:not(:disabled) {
	transform: translateY(0);
}

.he-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── Spinner ─────────────────────────────────────────────── */
.he-submit-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: he-spin 0.7s linear infinite;
	flex-shrink: 0;
}

.he-submit-btn.is-loading .he-submit-spinner {
	display: block;
}

.he-submit-btn.is-loading .he-submit-text {
	opacity: 0.6;
}

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

/* ── Thank You ───────────────────────────────────────────── */
.he-thankyou {
	text-align: center;
	padding: 48px 16px;
	animation: he-fade-in 0.5s ease both;
}

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

.he-thankyou-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(67, 92, 214, 0.85) 0%, #AA5996 51.44%, rgba(244, 86, 105, 0.85) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 32px rgba(170, 89, 150, 0.35);
}

.he-thankyou-icon svg {
	width: 44px;
	height: 44px;
}

/* Animated checkmark */
.he-thankyou-icon svg circle {
	stroke: rgba(255,255,255,0.5);
	stroke-width: 2;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: he-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

.he-thankyou-icon svg path {
	stroke: #ffffff;
	stroke-width: 3;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: he-stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes he-stroke {
	to { stroke-dashoffset: 0; }
}

.he-thankyou-title {
	font-size: 1.9rem;
	font-weight: 700;
	color: #333333;
	margin: 0 0 14px;
}

.he-thankyou-message {
	font-size: 1rem;
	color: #555555;
	line-height: 1.7;
	max-width: 480px;
	margin: 0 auto 12px;
}

.he-thankyou-sub {
	font-size: 0.9rem;
	color: #999999;
	font-weight: 600;
	margin: 0;
}

/* ── General Notices ─────────────────────────────────────── */
.he-notice {
	padding: 16px 20px;
	border-radius: 10px;
	font-family: 'Krub', 'Montserrat', sans-serif;
	font-size: 0.95rem;
	line-height: 1.6;
}

.he-notice--warning {
	background: #fff8e1;
	border: 1px solid #ffe082;
	color: #7a5600;
}

.he-notice--warning a {
	color: #0080ff;
}

/* ── "Already Submitted" static state ───────────────────── */
.he-thankyou--static {
	animation: none;
}

.he-thankyou--static .he-thankyou-icon svg circle,
.he-thankyou--static .he-thankyou-icon svg path {
	animation: none;
	stroke-dashoffset: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
	.he-form-wrap {
		padding: 28px 18px;
		border-radius: 12px;
	}

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

	.he-file-upload-area {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.he-file-name {
		width: 100%;
	}

	.he-submit-btn {
		width: 100%;
		justify-content: center;
	}
}
