/**
 * Unified Web Forms CSS
 * Texas Comptroller of Public Accounts
 * Shared styles for all forms in /webform-unification/
 * Last Updated: 2026-01-07
 */

/* Parsley Validation Error Styling */
.error-dialog,
.error-dialog-b,
.help-block.error {
	color: #e82721;
	list-style-type: none;
	text-align: left;
	font-weight: bold;
	padding: .25rem;
	font-size: 0.8rem;
	margin-bottom: 1rem;
	margin-top: 0;
}

/* Form Field Error States */
input[type="text"].error,
input[type="date"].error,
input[type="email"].error,
input[type="tel"].error,
input[type="number"].error,
textarea.error,
select.error {
	background-color: rgba(199, 34, 33, 0.25);
	border: 1px solid #c72221;
	margin-bottom: 0;
}

/* Form Field Valid States */
input[type="text"].valid,
input[type="date"].valid,
input[type="email"].valid,
input[type="tel"].valid,
input[type="number"].valid,
textarea.valid,
select.valid {
	background-color: rgba(42, 199, 33, 0.25);
	border: 1px solid rgba(42, 199, 33, 1);
	margin-bottom: 0;
}

/* Help Text */
.help-text {
	margin-bottom: 1rem;
}

/* Label Styling */
label {
	font-size: 1rem;
}

/* Conditional Field Containers (used with Parsley show/hide) */
[id^="maskDiv"].parselytada {
	display: block;
	background: #f8f8f8;
	border: 1px solid #e3ddda;
	padding: 1rem;
	margin-bottom: 1rem;
}

/* Form Input Spacing */
[type='text'],
[type='password'],
[type='date'],
[type='datetime'],
[type='datetime-local'],
[type='month'],
[type='week'],
[type='email'],
[type='number'],
[type='search'],
[type='tel'],
[type='time'],
[type='url'],
[type='color'],
textarea {
	margin: 0 0 1.5rem;
}

/* Recaptcha Error Message */
.recaptcha-error {
	color: #e82721;
	font-weight: bold;
	margin-top: 0.5rem;
}

/* Required Field Indicator */
.red {
	color: #c72221;
}

/* Form Fieldset Styling */
fieldset.fieldset {
	border-top: 1px solid #cacaca;
	padding: 1.25rem;
	margin: 1.5rem 0;
}

fieldset.fieldset legend {
	background: #fff;
	padding: 0 0.5rem;
	margin-left: -0.5rem;
	font-weight: bold;
}
fieldset.fieldset legend {
    border: 1px solid #e3ddda;
    background: #f8f8f8;
    padding: .5em 1em;
}

/* Parsley Error List */
.parsley-errors-list {
	list-style: none;
	margin: 0.5rem 0 0 0;
	padding: 0;
	color: #e82721;
	font-size: 0.875rem;
}

.parsley-errors-list li {
	margin-bottom: 0.25rem;
}

/* Focus State for Form Rows */
.rowfocus {
	background-color: #f0f8ff;
	transition: background-color 0.2s ease;
}

/* Button Styling */
button.button,
input[type="submit"].button {
	cursor: pointer;
}

button.button:disabled,
input[type="submit"].button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Accessibility - Skip to Content */
.skip-to-content {
	position: absolute;
	left: -9999px;
	z-index: 999;
}

.skip-to-content:focus {
	left: 0;
	top: 0;
	background: #005ea2;
	color: #fff;
	padding: 1rem;
	text-decoration: none;
}
