/* HECEA Auth Modal styles
   Mirrors the Tailwind-based markup from the live React site, rebuilt in
   plain CSS so it drops cleanly into any WordPress theme. */

:root {
	--hecea-primary-color: #0f766e;
	--hecea-secondary-color: #b45309;
}

.hecea-modal-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 1rem;
}

.hecea-modal-overlay.is-open {
	display: flex;
}

.hecea-modal-box {
	background: #fff;
	border-radius: 1rem;
	max-width: 28rem;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	animation: hecea-pop-in 0.18s ease-out;
}

@keyframes hecea-pop-in {
	from { opacity: 0; transform: scale(0.96) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hecea-modal-inner {
	padding: 1.5rem;
}

.hecea-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.hecea-modal-title {
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 700;
	margin: 0;
	color: #111827;
}

.hecea-modal-close {
	background: transparent;
	border: 0;
	padding: 0.5rem;
	border-radius: 0.5rem;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
}

.hecea-modal-close:hover {
	background-color: #f3f4f6;
}

.hecea-icon-x {
	font-size: 1.25rem;
	display: inline-block;
}

.hecea-alert {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.hecea-alert.hecea-alert-error {
	background-color: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.hecea-alert.hecea-alert-success {
	background-color: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.hecea-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hecea-field {
	display: flex;
	flex-direction: column;
}

.hecea-field-inline {
	flex-direction: row;
	justify-content: flex-end;
	margin-top: -0.5rem;
}

.hecea-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: #374151;
}

.hecea-helper-text {
	font-size: 0.875rem;
	color: #6b7280;
	margin: 0 0 0.25rem;
}

.hecea-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	font-size: 1rem;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.hecea-input:focus {
	outline: none;
	border-color: transparent;
	box-shadow: 0 0 0 2px var(--hecea-primary-color);
}

.hecea-btn-primary {
	width: 100%;
	background-color: var(--hecea-primary-color);
	color: #fff;
	border: 0;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s, background-color 0.15s;
}

.hecea-btn-primary:hover {
	opacity: 0.92;
}

.hecea-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.hecea-switch-links {
	margin-top: 1.5rem;
	text-align: center;
}

.hecea-switch-links p {
	color: #4b5563;
	margin: 0.4rem 0;
	font-size: 0.95rem;
}

.hecea-link {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--hecea-primary-color);
	font-weight: 500;
	text-decoration: none;
}

.hecea-link:hover {
	text-decoration: underline;
}

.hecea-link-secondary {
	color: var(--hecea-secondary-color);
}

.hecea-link-muted {
	color: #6b7280;
	font-size: 0.875rem;
}

/* Trigger buttons (used by the shortcodes) */
.hecea-trigger-btn {
	display: inline-block;
	background-color: var(--hecea-primary-color);
	color: #fff;
	border: 0;
	border-radius: 0.5rem;
	padding: 0.6rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.hecea-trigger-btn-secondary {
	background-color: var(--hecea-secondary-color);
}

.hecea-account-widget {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.95rem;
}

.hecea-account-name {
	font-weight: 600;
}

/* Small screens */
@media (max-width: 480px) {
	.hecea-modal-inner {
		padding: 1.25rem;
	}
	.hecea-modal-title {
		font-size: 1.25rem;
	}
}
