/* CTV Forms - Public Styles */

.ctv-form-wrapper {
	margin: 0 auto;
	font-family: inherit;
}

.ctv-form-title {
	margin-bottom: 4px;
}

.ctv-form-description {
	color: #555;
	margin-bottom: 16px;
}

.ctv-form-message {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 14px;
}
.ctv-form-message.ctv-message-success {
	background: #eafaf1;
	color: #1a7f4b;
	border: 1px solid #b7e6cc;
}
.ctv-form-message.ctv-message-error {
	background: #fdecea;
	color: #a02622;
	border: 1px solid #f5c2c0;
}

.ctv-field-row {
	margin-bottom: 18px;
}

.ctv-field-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.ctv-required {
	color: #d9534f;
}

.ctv-field-row input[type="text"],
.ctv-field-row input[type="email"],
.ctv-field-row input[type="tel"],
.ctv-field-row input[type="number"],
.ctv-field-row input[type="date"],
.ctv-field-row input[type="file"],
.ctv-field-row select,
.ctv-field-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.ctv-field-row input:focus,
.ctv-field-row select:focus,
.ctv-field-row textarea:focus {
	border-color: #2271b1;
	outline: none;
}

.ctv-field-row.ctv-field-error input,
.ctv-field-row.ctv-field-error select,
.ctv-field-row.ctv-field-error textarea {
	border-color: #d9534f;
}

.ctv-field-error-message {
	color: #d9534f;
	font-size: 12px;
	margin-top: 4px;
}

.ctv-choice {
	display: block;
	font-weight: 400 !important;
	margin-bottom: 6px;
}
.ctv-choice input {
	margin-right: 6px;
	width: auto;
}

.ctv-hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

.ctv-submit-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ctv-submit-button {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 12px 28px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}
.ctv-submit-button:hover {
	background: #185a8a;
}
.ctv-submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ctv-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid #ddd;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: ctv-spin 0.7s linear infinite;
}

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

.ctv-html-block {
	font-size: 14px;
}

/* Advanced 12-column form grid */


.ctv-form-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 18px;
}

.ctv-form-grid .ctv-field-row {
	margin-bottom: 0;
	min-width: 0;
}

.ctv-col-12 { grid-column: span 12; }
.ctv-col-8 { grid-column: span 8; }
.ctv-col-6 { grid-column: span 6; }
.ctv-col-4 { grid-column: span 4; }
.ctv-col-3 { grid-column: span 3; }

.ctv-input-small input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.ctv-input-small select,
.ctv-input-small textarea {
	max-width: 280px;
}

.ctv-input-medium input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.ctv-input-medium select,
.ctv-input-medium textarea {
	max-width: 520px;
}

.ctv-field-row input[type="url"],
.ctv-field-row input[type="time"],
.ctv-field-row input[type="datetime-local"],
.ctv-field-row input[type="color"],
.ctv-field-row input[type="range"],
.ctv-field-row select[multiple] {
	width: 100%;
	box-sizing: border-box;
}

.ctv-field-row select[multiple] {
	min-height: 130px;
}

.ctv-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.ctv-field-description {
	font-size: 12px;
	line-height: 1.5;
	color: #646970;
}

.ctv-description-above {
	margin: -2px 0 7px;
}

.ctv-description-below {
	margin-top: 6px;
}

.ctv-section-heading {
	padding: 6px 0 10px;
	border-bottom: 1px solid #e2e4e7;
}

.ctv-section-heading h4 {
	margin: 0;
	font-size: 20px;
}

.ctv-section-heading p {
	margin: 5px 0 0;
	color: #646970;
}

.ctv-compound-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ctv-compound-grid label {
	font-weight: 400;
	font-size: 12px;
	color: #50575e;
}

.ctv-compound-grid label > span {
	display: block;
	margin-bottom: 5px;
}

.ctv-compound-full {
	grid-column: 1 / -1;
}

.ctv-toggle-control {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	font-weight: 400 !important;
	cursor: pointer;
}

.ctv-toggle-control input {
	position: absolute;
	op: auto;
	left: -9999px;
}

.ctv-toggle-slider {
	position: relative;
	width: 44px;
	height: 24px;
	border-radius: 30px;
	background: #b6b8ba;
	transition: 0.2s;
}

.ctv-toggle-slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: 0.2s;
}

.ctv-toggle-control input:checked + .ctv-toggle-slider {
	background: #2271b1;
}

.ctv-toggle-control input:checked + .ctv-toggle-slider::after {
	transform: translateX(20px);
}

.ctv-consent {
	display: flex !important;
	align-items: flex-start;
	gap: 8px;
}

.ctv-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 3px;
}

.ctv-rating input {
	position: absolute;
	left: -9999px;
}

.ctv-rating label {
	font-size: 28px;
	line-height: 1;
	color: #c3c4c7;
	cursor: pointer;
}

.ctv-rating label:hover,
.ctv-rating label:hover ~ label,
.ctv-rating input:checked ~ label {
	color: #dba617;
}

.ctv-range-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ctv-range-wrap input {
	flex: 1;
}

.ctv-range-wrap output {
	min-width: 48px;
	padding: 4px 8px;
	border-radius: 4px;
	background: #f0f0f1;
	text-align: center;
}

.ctv-file-help {
	display: block;
	margin-top: 5px;
	color: #646970;
}

.ctv-form-step[hidden] {
	display: none !important;
}

.ctv-step-heading {
	margin-bottom: 18px;
}

.ctv-step-heading h4 {
	margin: 0;
	font-size: 22px;
}

.ctv-step-heading p {
	margin: 5px 0 0;
	color: #646970;
}

.ctv-form-progress {
	margin: 0 0 24px;
}

.ctv-progress-track {
	height: 8px;
	border-radius: 20px;
	background: #e2e4e7;
	overflow: hidden;
}

.ctv-progress-bar {
	display: block;
	height: 100%;
	background: #2271b1;
	transition: width 0.25s ease;
}

.ctv-progress-text {
	margin-top: 7px;
	font-size: 12px;
	color: #646970;
	text-align: right;
}

.ctv-step-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}

.ctv-step-button {
	border: 1px solid #2271b1;
	background: #fff;
	color: #2271b1;
	padding: 11px 24px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.ctv-step-next {
	margin-left: auto;
	background: #2271b1;
	color: #fff;
}

.ctv-field-error .ctv-choice,
.ctv-field-error .ctv-toggle-control,
.ctv-field-error .ctv-rating {
	outline: 1px solid #d9534f;
	outline-offset: 5px;
}

@media (max-width: 782px) {
	.ctv-form-grid {
		grid-template-columns: 1fr;
	}
	.ctv-col-12,
	.ctv-col-8,
	.ctv-col-6,
	.ctv-col-4,
	.ctv-col-3 {
		grid-column: 1 / -1;
	}
	.ctv-compound-grid {
		grid-template-columns: 1fr;
	}
	.ctv-compound-full {
		grid-column: auto;
	}
	.ctv-step-actions {
		flex-wrap: wrap;
	}
}
