/* Oversite — Frontend Form Styles */

.qweb-form {
	max-width: 640px;
	margin: 0 auto;
	font-family: inherit;
}

.qweb-form__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.qweb-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.qweb-form__field label {
	font-weight: 600;
	font-size: 14px;
	color: #374151;
}

.qweb-form__field label span[aria-hidden="true"] {
	color: #ED1C24;
	margin-left: 2px;
}

.qweb-form__field input[type="text"],
.qweb-form__field input[type="email"],
.qweb-form__field input[type="tel"],
.qweb-form__field input[type="date"],
.qweb-form__field select,
.qweb-form__field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #D1D5DB;
	border-radius: 6px;
	font-size: 15px;
	color: #111827;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}

.qweb-form__field input:focus,
.qweb-form__field select:focus,
.qweb-form__field textarea:focus {
	outline: none;
	border-color: #ED1C24;
	box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.12);
}

.qweb-form__field input.qweb-error,
.qweb-form__field select.qweb-error,
.qweb-form__field textarea.qweb-error {
	border-color: #DC2626;
}

.qweb-form__field textarea {
	resize: vertical;
	min-height: 110px;
}

/* Phone wrap */
.qweb-form__phone-wrap {
	display: flex;
	align-items: center;
	border: 1.5px solid #D1D5DB;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.qweb-form__phone-wrap:focus-within {
	border-color: #ED1C24;
	box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.12);
}

.qweb-form__phone-prefix {
	padding: 10px 12px;
	background: #F9FAFB;
	border-right: 1.5px solid #D1D5DB;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	white-space: nowrap;
}

.qweb-form__phone-wrap input[type="tel"] {
	border: none;
	box-shadow: none;
	flex: 1;
}

.qweb-form__phone-wrap input[type="tel"]:focus {
	outline: none;
	border: none;
	box-shadow: none;
}

/* EPS fieldset */
.qweb-form__fieldset {
	border: 1.5px solid #BFDBFE;
	border-radius: 8px;
	padding: 16px 20px 20px;
	background: #EFF6FF;
}

.qweb-form__fieldset legend {
	font-weight: 700;
	font-size: 14px;
	color: #1D4ED8;
	padding: 0 6px;
}

.qweb-form__fieldset .qweb-form__field label {
	color: #1E40AF;
}

.qweb-form__hint {
	font-size: 12px;
	color: #6B7280;
	margin: 2px 0 0;
}

/* Submit row */
.qweb-form__submit-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.qweb-form__btn {
	display: block;
	width: 100%;
	background: var(--qweb-btn-bg, #ED1C24);
	color: #fff !important;
	border: none !important;
	border-radius: 6px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s, filter 0.15s;
	text-align: center;
	letter-spacing: 0.02em;
	line-height: 1.4;
	box-sizing: border-box;
	font-family: inherit;
}

.qweb-form__btn:hover {
	filter: brightness(0.85);
}

.qweb-form__btn:active {
	transform: scale(0.98);
}

.qweb-form__btn:disabled {
	background: #9CA3AF !important;
	filter: none;
	cursor: not-allowed;
}

/* Cancel / Reset button */
.qweb-form__cancel-btn {
	display: block;
	width: 100%;
	padding: 10px 24px;
	background: transparent;
	color: #6B7280;
	border: 1.5px solid #D1D5DB;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	text-align: center;
	font-family: inherit;
	box-sizing: border-box;
}

.qweb-form__cancel-btn:hover {
	background: #F3F4F6;
	color: #374151;
	border-color: #9CA3AF;
}

/* Spinner */
.qweb-form__spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2.5px solid #E5E7EB;
	border-top-color: #ED1C24;
	border-radius: 50%;
	animation: qweb-spin 0.7s linear infinite;
}

.qweb-form__spinner.is-visible {
	display: inline-block;
}

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

/* Messages */
.qweb-form__messages {
	font-size: 14px;
	padding: 10px 14px;
	border-radius: 6px;
	display: none;
}

.qweb-form__messages.is-success {
	display: block;
	background: #F0FDF4;
	border: 1px solid #86EFAC;
	color: #15803D;
	font-weight: 600;
}

.qweb-form__messages.is-error {
	display: block;
	background: #FEF2F2;
	border: 1px solid #FCA5A5;
	color: #DC2626;
	font-weight: 600;
}
