/**
 * Pixel Koolitused — Registration form styles.
 */

/* Seat availability badge */
.pixel-seats-badge {
	background: #eaf6f1;
	color: #1e6a3a;
	border-left: 3px solid #2bbfa0;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 16px;
	border-radius: 3px;
}
.pixel-seats-badge--loading {
	background: #f3f3f3;
	color: #666;
	border-left-color: #999;
	font-style: italic;
	font-weight: 400;
}
.pixel-seats-badge--error,
.pixel-form-message[data-type="error"] {
	background: #f8e0e2;
	color: #842029;
	border-left-color: #d63638;
}

.pixel-form-message {
	padding: 10px 14px;
	margin-bottom: 14px;
	border-left: 3px solid #2271b1;
	background: #f0f6fc;
	border-radius: 3px;
	font-size: 14px;
}

/* Participant repeater host */
.pixel-osalejad-host {
	margin: 20px 0 0;
}

.pixel-osalejad-counter {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #666;
	margin-bottom: 10px;
}

/* Participant row (fieldset) — wraps Elementor-styled fields.
   Field-level styling (input padding, label size, etc.) intentionally removed:
   the JS now uses Elementor's native classes (elementor-field, elementor-field-label,
   elementor-col-NN) so the active theme styles each input identically to participant #0. */
.pixel-osaleja-row {
	border-radius: 4px;
	padding: 14px 14px 4px;
	margin-bottom: 12px;
	position: relative;
}

.pixel-osaleja-row__title {
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #444;
	padding: 0 6px;
	margin-bottom: 8px;
	width: 100%;
}

.pixel-osaleja-row__remove {
	position: absolute;
	top: 8px;
	right: 8px;
	background: transparent;
	border: 1px solid #d63638;
	color: #d63638;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 3px;
	cursor: pointer;
	line-height: 1.4;
	z-index: 1;
}
.pixel-osaleja-row__remove:hover {
	background: #d63638;
	color: #fff;
}

/* Make the fieldset behave like Elementor's normal form-fields-wrapper.
   Without flex, the `elementor-col-25` / `elementor-col-33` width classes
   on each field have no effect because <fieldset> defaults to display:block. */
.pixel-osaleja-row.elementor-form-fields-wrapper {
	display: flex;
	flex-wrap: wrap;
	min-width: 0;
}

/* Elementor's column-width and field rules normally target direct children
   of .elementor-form-fields-wrapper. Since our fields are nested inside our
   <fieldset>, those rules don't reach them — we have to repeat the essentials
   so inputs fill their column the way native fields do. */
.pixel-osaleja-row > .elementor-column {
	box-sizing: border-box;
	padding-right: 10px;
	padding-bottom: 10px;
}
.pixel-osaleja-row > .elementor-col-25 {
	flex: 0 0 25%;
	max-width: 25%;
}
.pixel-osaleja-row > .elementor-col-33 {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
}
.pixel-osaleja-row > .elementor-col-50 {
	flex: 0 0 50%;
	max-width: 50%;
}
.pixel-osaleja-row > .elementor-col-100 {
	flex: 0 0 100%;
	max-width: 100%;
}

/* Force inputs inside our fieldset to fill their column,
   matching how Elementor styles its native form fields. */
.pixel-osaleja-row .elementor-field,
.pixel-osaleja-row input.elementor-field-textual {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	flex-basis: 100%;
}

/* Labels: ensure single-line display when there's enough room */
.pixel-osaleja-row .elementor-field-label {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Responsive: collapse to single column on narrow viewports */
@media (max-width: 600px) {
	.pixel-osaleja-row > .elementor-col-25,
	.pixel-osaleja-row > .elementor-col-33,
	.pixel-osaleja-row > .elementor-col-50 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* Add participant button */
.pixel-add-osaleja-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px;
	background: transparent;
	border: 1px dashed #2bbfa0;
	color: #2bbfa0;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	margin: 12px 0 18px;
	transition: background 0.15s ease;
}
.pixel-add-osaleja-btn:hover {
	background: rgba(43, 191, 160, 0.08);
}

.pixel-plus-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #2bbfa0;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.pixel-add-osaleja-btn--disabled,
.pixel-add-osaleja-btn:disabled {
	border-color: #ccc;
	color: #999;
	cursor: not-allowed;
	background: transparent;
}
.pixel-add-osaleja-btn--disabled .pixel-plus-icon,
.pixel-add-osaleja-btn:disabled .pixel-plus-icon {
	background: #ccc;
}
.pixel-add-osaleja-btn--disabled:hover,
.pixel-add-osaleja-btn:disabled:hover {
	background: transparent;
}

.pixel-submit-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Disabled trigger buttons (course full or registration closed) — applied
   by JS via the /availability endpoint on page load. */
.pixel-register-trigger--disabled,
.pixel-register-trigger--disabled .elementor-button {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}
.pixel-register-trigger--disabled a {
	pointer-events: none;
	cursor: not-allowed;
	text-decoration: none;
}
