/**
 * ShelterSync Online Form Styles
 * Scoped within .sheltermgr-form-wrap — no theme or admin style impact.
 * SM-FRM-001b, NFR-05-06
 */

.sheltermgr-form-wrap {
	width: 100%;
}

/* ── Error summary ─────────────────────────────────────────────────────────── */

.sheltermgr-form-error-summary {
	background: #fdf2f2;
	border: 1px solid #e8b4b4;
	border-left: 4px solid #b32d2e;
	border-radius: 4px;
	padding: 0.75rem 1rem;
	margin-bottom: 1.25rem;
	color: #6b1e1e;
	font-size: 0.9rem;
}

.sheltermgr-form-error-summary p,
.sheltermgr-form-error-summary ul {
	margin: 0 0 0.25rem;
}

.sheltermgr-form-error-summary ul {
	padding-left: 1.25rem;
}

/* ── Confirmation ──────────────────────────────────────────────────────────── */

.sheltermgr-form-confirmation {
	background: #f0f9f2;
	border: 1px solid #a3d9b0;
	border-left: 4px solid #1a7a3f;
	border-radius: 4px;
	padding: 1rem 1.25rem;
	color: #1a3d25;
}

/* ── Header / footer / markup ─────────────────────────────────────────────── */

.sheltermgr-form-header,
.sheltermgr-form-footer,
.sheltermgr-form-markup {
	margin-bottom: 1.25rem;
}

.sheltermgr-form-markup h2,
.sheltermgr-form-markup h3 {
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

/* ── Field wrapper ─────────────────────────────────────────────────────────── */

.sheltermgr-form-field {
	margin-bottom: 1.1rem;
}

.sheltermgr-form-field--error .sheltermgr-form-input,
.sheltermgr-form-field--error .sheltermgr-form-textarea,
.sheltermgr-form-field--error .sheltermgr-form-select,
.sheltermgr-form-field--error .sheltermgr-form-file {
	border-color: #b32d2e;
}

/* ── Labels ────────────────────────────────────────────────────────────────── */

.sheltermgr-form-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
	color: inherit;
}

.sheltermgr-form-label--checkbox {
	display: inline;
	font-weight: normal;
	margin-left: 0.4rem;
}

.sheltermgr-form-required {
	color: #b32d2e;
	margin-left: 2px;
}

/* ── Inputs ────────────────────────────────────────────────────────────────── */

.sheltermgr-form-input,
.sheltermgr-form-textarea,
.sheltermgr-form-select,
.sheltermgr-form-wrap input[type="number"],
.sheltermgr-form-wrap input[type="date"] {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--sheltermgr-border, #ccd0d4);
	border-radius: var(--sheltermgr-radius, 4px);
	font-size: 0.9rem;
	line-height: 1.5;
	box-sizing: border-box;
	background: #fff;
	color: var(--sheltermgr-text, #1d2327) !important;
	font-family: inherit;
	-webkit-text-fill-color: var(--sheltermgr-text, #1d2327) !important;
}

/* Extra specificity to override Porto/Elementor on text inputs */
.sheltermgr-form-wrap input.sheltermgr-form-input[type="text"],
.sheltermgr-form-wrap input.sheltermgr-form-input[type="email"],
.sheltermgr-form-wrap input.sheltermgr-form-input[type="tel"],
.sheltermgr-form-wrap input.sheltermgr-form-input[type="date"],
.sheltermgr-form-wrap input.sheltermgr-form-input {
	color: var(--sheltermgr-text, #1d2327) !important;
	-webkit-text-fill-color: var(--sheltermgr-text, #1d2327) !important;
	border: 1px solid var(--sheltermgr-border, #ccd0d4) !important;
	border-radius: var(--sheltermgr-radius, 4px) !important;
	background: #fff !important;
}

.sheltermgr-form-input:focus,
.sheltermgr-form-textarea:focus,
.sheltermgr-form-select:focus,
.sheltermgr-form-wrap input[type="number"]:focus,
.sheltermgr-form-wrap input[type="date"]:focus {
	border-color: var(--sheltermgr-primary, #1a73e8);
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px rgba(var(--sheltermgr-primary-rgb, 26,115,232), 0.2);
}

.sheltermgr-form-textarea {
	resize: vertical;
	min-height: 100px;
}

/* ── Checkbox ─────────────────────────────────────────────────────────────── */

.sheltermgr-form-checkbox-wrap {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
}

.sheltermgr-form-checkbox {
	flex-shrink: 0;
	margin-top: 2px;
	width: 1rem;
	height: 1rem;
	cursor: pointer;
}

/* ── File upload ───────────────────────────────────────────────────────────── */

.sheltermgr-form-file {
	display: block;
	width: 100%;
	font-size: 0.875rem;
}

.sheltermgr-form-file-hint {
	font-size: 0.8rem;
	color: #72777c;
	margin: 0.25rem 0 0;
}

/* ── Hint / tooltip ────────────────────────────────────────────────────────── */

.sheltermgr-form-hint {
	display: block;
	font-size: 0.825rem;
	color: #50575e;
	margin-bottom: 0.3rem;
}

/* ── Field-level error ─────────────────────────────────────────────────────── */

.sheltermgr-form-field-error {
	color: #b32d2e;
	font-size: 0.8rem;
	margin-top: 0.25rem;
	min-height: 1em;
}

/* ── Submit button ─────────────────────────────────────────────────────────── */

.sheltermgr-form-submit-row {
	margin-top: 1.5rem;
}

.sheltermgr-form-submit {
	display: inline-block;
	padding: 0.6rem 1.5rem;
	background: var(--sheltermgr-primary, #1a73e8);
	color: #fff;
	border: none;
	border-radius: var(--sheltermgr-radius, 4px);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.4;
}

.sheltermgr-form-submit:hover {
	background: var(--sheltermgr-primary, #1a73e8);
	filter: brightness(0.88);
}

.sheltermgr-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── General error (shortcode-level) ──────────────────────────────────────── */

.sheltermgr-form-error {
	color: #8a2424;
	font-style: italic;
}
