/* ============================================================
   Elementor Registration Form Widget – Frontend Styles
   ============================================================ */

.erw-registration-form-wrapper {
	width: 100%;
}

.erw-registration-form {
	width: 100%;
}

/* ── Fields Row ─────────────────────────────────────────────── */

.erw-fields-row {
	margin-bottom: 15px;
}

/* Flexbox container — columns sit side-by-side with gap */
.erw-fields-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
}

/* ── Column Widths ──────────────────────────────────────────── */
/* Width = (declared % of row) minus half the gap. Using
   flex-basis with calc keeps columns honest when gap is present. */

.erw-form-field.erw-col-25 {
	flex: 0 0 calc(25% - 12px);
	min-width: 0;
}
.erw-form-field.erw-col-50 {
	flex: 0 0 calc(50% - 8px);
	min-width: 0;
}
.erw-form-field.erw-col-75 {
	flex: 0 0 calc(75% - 4px);
	min-width: 0;
}
.erw-form-field.erw-col-100 {
	flex: 0 0 100%;
	min-width: 0;
}

/* ── Form Field ─────────────────────────────────────────────── */
.erw-form-field {
	display: flex;
	flex-direction: column;
}

/* ── Label ──────────────────────────────────────────────────── */
.erw-form-label {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
}

.erw-required {
	color: #e74c3c;
	margin-left: 3px;
}

/* ── Input ──────────────────────────────────────────────────── */
.erw-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid #d5dadf;
	border-radius: 4px;
	background-color: #fff;
	color: #333;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.erw-input:focus {
	border-color: #6EC1E4;
	box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.2);
}

.erw-input:disabled {
	background-color: #f5f5f5;
	cursor: not-allowed;
	opacity: 0.7;
}

/* ── Submit Button Wrapper ───────────────────────────────────── */
.erw-submit-wrap {
	display: block;
	margin-top: 4px;
}

/* Alignment — Elementor adds erw-btn-align-left/center/right to the
   widget's outer .elementor-widget wrapper. We target it from there. */

/* Default / left */
.erw-btn-align-left .erw-submit-wrap,
.erw-btn-align-left .erw-submit-wrap {
	text-align: left;
}
.erw-btn-align-center .erw-submit-wrap {
	text-align: center;
}
.erw-btn-align-right .erw-submit-wrap {
	text-align: right;
}

/* Responsive breakpoints that Elementor appends: -tablet / -mobile */
@media (max-width: 1024px) {
	.erw-btn-align-tablet-left   .erw-submit-wrap { text-align: left;   }
	.erw-btn-align-tablet-center .erw-submit-wrap { text-align: center; }
	.erw-btn-align-tablet-right  .erw-submit-wrap { text-align: right;  }
}
@media (max-width: 767px) {
	.erw-btn-align-mobile-left   .erw-submit-wrap { text-align: left;   }
	.erw-btn-align-mobile-center .erw-submit-wrap { text-align: center; }
	.erw-btn-align-mobile-right  .erw-submit-wrap { text-align: right;  }
}

/* The button itself is inline so text-align on the parent works */
.erw-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
	text-align: center;
	background-color: #6EC1E4;
	color: #fff;
	border-radius: 4px;
}

.erw-submit-btn:hover {
	background-color: #4eacd4;
}

.erw-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Sizes */
.erw-btn-sm { padding: 8px 18px;  font-size: 13px; }
.erw-btn-md { padding: 12px 28px; font-size: 15px; }
.erw-btn-lg { padding: 16px 36px; font-size: 17px; }

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

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

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

/* ── Messages ────────────────────────────────────────────────── */
.erw-message {
	font-size: 14px;
	padding: 0;
	min-height: 0;
	transition: all 0.25s;
	display: none;
}

.erw-message:not(:empty) {
	display: block;
	padding: 14px 16px;
	border-radius: 6px;
	margin-bottom: 12px;
}

.erw-message.erw-success {
	color: #1a6e3e;
	background-color: #eaf7ef;
	border: 1px solid #b7e8cb;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

.erw-message.erw-error {
	color: #e74c3c;
	background-color: #fef0ee;
	border: 1px solid #f5c6c1;
}

.erw-success-icon {
	display: inline-block;
	font-weight: 700;
	color: #23a455;
	margin-right: 4px;
}

/* Login link shown inside the success message */
.erw-success-login-link {
	display: inline-block;
	margin-top: 10px;
	color: #fff;
	background-color: #23a455;
	padding: 8px 20px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: background-color 0.2s;
}

.erw-success-login-link:hover {
	background-color: #1a7a40;
	color: #fff;
	text-decoration: none;
}

/* Make the success message flex so the button sits on its own line */
.erw-message.erw-success {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

/* ── Login Link ──────────────────────────────────────────────── */
.erw-login-link {
	margin-top: 14px;
	font-size: 13px;
	text-align: center; /* default, overridden by Elementor selector */
}

.erw-login-link a {
	color: #6EC1E4;
	text-decoration: none;
	transition: color 0.2s;
}

.erw-login-link a:hover {
	color: #4eacd4;
	text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
	/* On mobile all columns collapse to full width */
	.erw-form-field.erw-col-25,
	.erw-form-field.erw-col-50,
	.erw-form-field.erw-col-75 {
		flex: 0 0 100%;
	}
}
