/* HCIP Smart Forms — public stylesheet.
 * Colors, radii and max width are controlled by CSS custom properties,
 * set inline per-render from HCIP Forms > Settings (and optionally
 * overridden per form). Fallback values below match the plugin defaults
 * so the form still looks right even if the variables are missing.
 */
.hcip-form-wrap {
	--hcip-primary-color: #2563eb;
	--hcip-primary-hover-color: #1d4ed8;
	--hcip-text-color: #1f2937;
	--hcip-label-color: #374151;
	--hcip-border-color: #d1d5db;
	--hcip-background-color: #f3f4f6;
	--hcip-card-background: #ffffff;
	--hcip-border-radius: 16px;
	--hcip-input-radius: 8px;
	--hcip-button-radius: 8px;
	--hcip-max-width: 660px;
	--hcip-heading-font-family: Literata, Georgia, serif;
	--hcip-body-font-family: Muli, Arial, Helvetica, sans-serif;

	max-width: var(--hcip-max-width);
	margin: 0 auto;
	box-sizing: border-box;
}
.hcip-form-wrap *, .hcip-form-wrap *::before, .hcip-form-wrap *::after {
	box-sizing: border-box;
}

.hcip-form {
	background: var(--hcip-card-background);
	border-radius: var(--hcip-border-radius);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
	padding: 32px;
	color: var(--hcip-text-color);
	font-family: var(--hcip-body-font-family);
	font-size: 16px;
	line-height: 1.5;
}
@media (min-width: 640px) {
	.hcip-form { padding: 40px; }
}

/* These print as real <p> tags, so — same reasoning as the heading
 * above — theme global paragraph styling can otherwise override
 * font size/color/margin here. */
.hcip-form-status-note {
	background: #fef3c7;
	color: #92400e !important;
	padding: 10px 14px;
	border-radius: var(--hcip-input-radius);
	margin: 0 0 16px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.hcip-form-status {
	padding: 12px 16px;
	border-radius: var(--hcip-input-radius);
	margin-bottom: 20px;
	font-size: 15px;
}
.hcip-form-status.hcip-status-error { background: #fee2e2; color: #991b1b; }
.hcip-form-status.hcip-status-success { background: #d1fae5; color: #065f46; }

.hcip-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hcip-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 16px;
	margin-bottom: 8px;
}

.hcip-field {
	flex: 0 0 100%;
	max-width: 100%;
}
.hcip-field--w100 { flex-basis: 100%; max-width: 100%; }
.hcip-field--w75  { flex-basis: calc(75% - 12px); max-width: calc(75% - 12px); }
.hcip-field--w66  { flex-basis: calc(66% - 11px); max-width: calc(66% - 11px); }
.hcip-field--w50  { flex-basis: calc(50% - 8px); max-width: calc(50% - 8px); }
.hcip-field--w33  { flex-basis: calc(33% - 11px); max-width: calc(33% - 11px); }
.hcip-field--w25  { flex-basis: calc(25% - 12px); max-width: calc(25% - 12px); }

@media (max-width: 640px) {
	.hcip-field--w75, .hcip-field--w66, .hcip-field--w50, .hcip-field--w33, .hcip-field--w25 {
		flex-basis: 100%;
		max-width: 100%;
	}
}

.hcip-field[hidden],
.hcip-field.hcip-js-hidden {
	display: none !important;
}

.hcip-field-label {
	display: block !important;
	font-weight: var(--hcip-label-weight, 600) !important;
	font-style: var(--hcip-label-style, normal) !important;
	color: var(--hcip-label-color) !important;
	margin: 0 0 6px !important;
	font-size: var(--hcip-label-size, 14px) !important;
	line-height: 1.4 !important;
}
.hcip-required { color: #dc2626; }

/* !important below: the heading prints as a real <h3> (for correct
 * document outline/accessibility), and most WordPress themes apply
 * their own global h1-h6 typography rules with class+element
 * selectors — higher specificity than a single class alone — which
 * would otherwise override this and make headings inside the form
 * inherit the page's h3 styling (wrong font, often much larger). */
.hcip-field-heading {
	/* padding:0 matters here too, not just margin — the theme's own
	 * h3 rule was adding an unrequested 24px bottom padding that
	 * widened the gap before the next field. Styled to match the
	 * regular field labels (bold, body font, ~label-sized) rather
	 * than a large display heading. */
	margin: 0 0 8px !important;
	padding: 0 !important;
	font-family: var(--hcip-body-font-family) !important;
	font-size: var(--hcip-title-size, 16px) !important;
	font-weight: var(--hcip-title-weight, 700) !important;
	font-style: var(--hcip-title-style, normal) !important;
	line-height: 1.4 !important;
	color: var(--hcip-title-color, var(--hcip-text-color)) !important;
}
@media (max-width: 480px) {
	.hcip-field-heading { font-size: var(--hcip-title-size-phone, var(--hcip-title-size, 16px)) !important; }
}
.hcip-field-paragraph {
	color: var(--hcip-paragraph-color, var(--hcip-label-color));
	font-size: var(--hcip-paragraph-size, 14px);
	font-weight: var(--hcip-paragraph-weight, 400);
	font-style: var(--hcip-paragraph-style, normal);
	margin-bottom: 4px;
}
/* Paragraph text is usually wrapped in <p>, which themes style globally;
 * make it follow the Design tab settings above instead (1.3.0). */
.hcip-field-paragraph p {
	font-family: var(--hcip-body-font-family) !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	font-style: inherit !important;
	color: inherit !important;
	line-height: inherit !important;
}

.hcip-input,
.hcip-select,
.hcip-textarea {
	width: 100%;
	font-size: var(--hcip-input-size, 16px);
	font-weight: var(--hcip-input-weight, 400);
	font-style: var(--hcip-input-style, normal);
	padding: 12px 14px;
	border: 1px solid var(--hcip-border-color);
	border-radius: var(--hcip-input-radius);
	background: #fff;
	color: var(--hcip-text-color);
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	min-height: 48px;
}
.hcip-textarea { min-height: 110px; resize: vertical; }

.hcip-input:focus,
.hcip-select:focus,
.hcip-textarea:focus {
	outline: none;
	border-color: var(--hcip-primary-color);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hcip-field-help {
	margin: 6px 0 0 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	color: #6b7280 !important;
}

.hcip-choice-group {
	display: flex;
	flex-direction: column;
}
.hcip-choice-group.hcip-two-column {
	/* Fixed left/right pairing in the order choices were added (row 1:
	 * items 1-2, row 2: items 3-4, ...) — an odd final item sits alone
	 * under the left column, matching the requested reference layout. */
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 24px;
	row-gap: 2px;
}
@media (max-width: 480px) {
	.hcip-choice-group.hcip-two-column { grid-template-columns: 1fr; }
}

.hcip-choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 6px 0;
}
.hcip-choice input[type="checkbox"],
.hcip-choice input[type="radio"] {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: var(--hcip-primary-color);
}
.hcip-choice label {
	/* flex:1 + min-width:0 lets a long, wrapping choice label (e.g.
	 * "Replace my Baylor Scott & White plan") fill the remaining row
	 * width and wrap normally instead of shrinking to its own
	 * content width; text-align:left guards against a theme's global
	 * label/list styling centering that wrapped second line. */
	flex: 1 1 auto !important;
	min-width: 0 !important;
	text-align: left !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	color: var(--hcip-text-color) !important;
	line-height: 1.4 !important;
	margin: 0 !important;
}

.hcip-single-checkbox label {
	font-size: var(--hcip-checkbox-size, 15px) !important;
	font-weight: var(--hcip-checkbox-weight, 600) !important;
	font-style: var(--hcip-checkbox-style, normal) !important;
	color: var(--hcip-checkbox-color, var(--hcip-label-color)) !important;
}

.hcip-field--submit { margin-top: 28px; }

/* Real <button> tag — same theme-collision reasoning as above. */
.hcip-submit-button {
	display: block !important;
	width: 100% !important;
	background: var(--hcip-primary-color) !important;
	color: var(--hcip-button-color, #fff) !important;
	border: none !important;
	padding: 16px 24px !important;
	font-family: var(--hcip-body-font-family) !important;
	font-size: var(--hcip-button-size, 17px) !important;
	font-weight: var(--hcip-button-weight, 700) !important;
	font-style: var(--hcip-button-style, normal) !important;
	line-height: 1.4 !important;
	border-radius: var(--hcip-button-radius) !important;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}
.hcip-submit-button:hover { background: var(--hcip-primary-hover-color) !important; }
.hcip-submit-button:focus-visible {
	outline: 3px solid var(--hcip-primary-color);
	outline-offset: 2px;
}
.hcip-submit-button:disabled { opacity: 0.6; cursor: not-allowed; }

.hcip-privacy-text {
	text-align: center !important;
	font-family: var(--hcip-body-font-family) !important;
	color: var(--hcip-footer-color, #6b7280) !important;
	font-size: var(--hcip-footer-size, 13px) !important;
	font-weight: var(--hcip-footer-weight, 400) !important;
	font-style: var(--hcip-footer-style, normal) !important;
	line-height: 1.4 !important;
	margin: 16px 0 0 !important;
}

.hcip-field-error {
	color: #dc2626;
	font-size: 13px;
	margin-top: 6px;
}
.hcip-field.hcip-has-error .hcip-input,
.hcip-field.hcip-has-error .hcip-select,
.hcip-field.hcip-has-error .hcip-textarea {
	border-color: #dc2626;
}

.hcip-form-preview { opacity: 0.98; }
