/**
 * Participants Form Shortcode Styles.
 *
 * @package Affinite\CoursesForWooCommerce
 */

.course-participants-form-shortcode {
	margin: 20px 0;
}

.course-participants-form-shortcode .course-term-selection {
	margin-bottom: 20px;
}

.course-participants-form-shortcode .course-term-selection label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.course-participants-form-shortcode .course-term-selection select {
	width: 100%;
	max-width: 400px;
	padding: 8px;
}

.participants-form-container {
	margin-top: 20px;
}

.participants-list {
	margin-bottom: 20px;
}

.participant-row {
	margin-bottom: 60px;
	padding: 0;
	background: transparent;
}

.participant-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.field-group {
	display: flex;
	flex-direction: column;
}

.field-group label {
	margin-bottom: 5px;
	font-weight: 500;
}

.field-group .required {
	color: #d63638;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"] {
	width: 100%;
	padding: 8px 16px;
	border: 1px solid #000000;
	border-radius: 50px;
	color:#000000;
	font-family: "Open Sans";
	font-size: 22px;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
}

.field-group input[type="text"].field-error,
.field-group input[type="email"].field-error,
.field-group input[type="tel"].field-error {
	border-color: #d63638;
	border-width: 2px;
	background-color: #fff5f5;
}

.field-group-actions {
	grid-column: 1 / -1;
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
}

.field-group-actions .remove-participant {
	color: #d63638;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-size: 14px;
}

.field-group-actions .remove-participant:hover {
	text-decoration: underline;
}

.add-participant-btn {
	margin-top: 10px;
	border-radius: 50px;
    background: #FFDBDB;
    font-size: 18px;
    line-height: 18px;
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: 50px;
    padding-right: 50px;
    color: #000000;
    text-decoration: none;
    width: fit-content;
	border:none;
	cursor: pointer;
}

.form-actions {
	margin-top: 40px!important;
	width:100%;
	display:flex;
	justify-content: center;
}
.form-actions .confirm-and-add-to-cart{
	border-radius: 50px;
    background: #FFDBDB;
    font-size: 25px;
    line-height: 25px;
    padding-top: 26px;
    padding-bottom: 26px;
    padding-left: 50px;
    padding-right: 50px;
    color: #000000;
    text-decoration: none;
    width: fit-content;
	border:none;
	cursor: pointer;
}

.form-error {
	color: #d63638;
	margin-top: 10px;
	padding: 10px;
	background: #ffeaea;
	border: 1px solid #d63638;
	border-radius: 4px;
}

#participants-loading-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
}

#participants-loading-popup > div {
	background: white;
	padding: 30px;
	border-radius: 5px;
	text-align: center;
	min-width: 200px;
}

/* Hide popup from frontend-participants.js if shortcode form exists */
#participant-edit-popup[data-disabled-by-shortcode="true"],
#participant-edit-popup[data-disabled="true"] {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Hide popup if shortcode form exists on page */
.course-participants-form-shortcode ~ #participant-edit-popup,
body:has(.course-participants-form-shortcode) #participant-edit-popup {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Responsive */
@media (max-width: 768px) {
	.participant-fields {
		grid-template-columns: 1fr;
	}
}

