/* ---- PA registration modal (standalone block) ---- */
body.theoasso-pa-modal-open{
	overflow: hidden;
}

.theoasso-pa-modal{
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.theoasso-pa-modal[hidden]{
	display: none;
}

.theoasso-pa-modal__overlay{
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.theoasso-pa-modal__dialog{
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: var(--wp--preset--color--main-bg, #fff);
	color: var(--wp--preset--color--contrast, #111);
	border-radius: 16px;
	padding: 2.5rem 2rem 2rem;
	text-align: left;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.theoasso-pa-modal__close{
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 4px 8px;
}

.theoasso-pa-modal__title{
	margin: 0 0 0.75rem;
	font-family: var(--wp--preset--font-family--google-sans-flex);
	font-size: 1.5rem;
	line-height: 1.2;
}

.theoasso-pa-modal__intro{
	margin: 0 0 1.5rem;
	opacity: 0.8;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Primary button inside the modal */
.theoasso-pa-modal__btn{
	display: inline-flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	padding: 0.9rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--blue, #2563eb);
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.theoasso-pa-modal__btn:hover{
	opacity: 0.9;
	text-decoration: none;
}

/* Accordion (who is concerned by the PA) */
.theoasso-pa-modal__accordion{
	margin-bottom: 1.75rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	overflow: hidden;
}

.theoasso-pa-accordion__item{
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.theoasso-pa-accordion__item:first-child{
	border-top: 0;
}

.theoasso-pa-accordion__summary{
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 1rem 1.1rem;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
}

.theoasso-pa-accordion__summary::-webkit-details-marker{
	display: none;
}

.theoasso-pa-accordion__summary::after{
	content: "\276F";
	flex: 0 0 auto;
	font-size: 0.95rem;
	opacity: 0.6;
	transform: rotate(90deg);
	transition: transform 160ms ease;
}

.theoasso-pa-accordion__item[open] .theoasso-pa-accordion__summary::after{
	transform: rotate(-90deg);
}

.theoasso-pa-accordion__answer{
	padding: 0 1.1rem 1.1rem;
	font-size: 0.92rem;
	line-height: 1.55;
	opacity: 0.85;
}

.theoasso-pa-accordion__answer p{
	margin: 0 0 0.6rem;
}

.theoasso-pa-accordion__answer p:last-child{
	margin-bottom: 0;
}

.theoasso-pa-modal__actions{
	display: flex;
	justify-content: center;
}

.theoasso-pa-modal__actions .theoasso-pa-modal__next{
	width: 100%;
}

.theoasso-pa-modal__back{
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: 0;
	padding: 0.3rem 0;
	margin-bottom: 1.25rem;
	cursor: pointer;
	color: inherit;
	opacity: 0.65;
	font-size: 0.9rem;
	font-weight: 500;
	transition: opacity 0.15s ease, gap 0.15s ease;
}

.theoasso-pa-modal__back:hover{
	opacity: 1;
	gap: 0.6rem;
}

/* Form step header */
.theoasso-pa-modal__header{
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.theoasso-pa-modal__header .theoasso-pa-modal__title{
	margin-bottom: 0.5rem;
}

.theoasso-pa-modal__header .theoasso-pa-modal__intro{
	margin: 0;
}

.theoasso-pa-modal__step--form{
	animation: theoasso-pa-fade 0.25s ease;
}

@keyframes theoasso-pa-fade{
	from{ opacity: 0; transform: translateY(6px); }
	to{ opacity: 1; transform: translateY(0); }
}

.theoasso-pa-modal__missing{
	font-size: 0.9rem;
	opacity: 0.7;
}

/* ---- Polished Contact Form 7 styling inside the modal ---- */
.theoasso-pa-modal__form .wpcf7{
	margin: 0;
}

.theoasso-pa-modal__form .wpcf7-form > p{
	margin: 0 0 1rem;
}

.theoasso-pa-modal__form label{
	display: block;
	margin-bottom: 1rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.theoasso-pa-modal__form label > .wpcf7-form-control-wrap,
.theoasso-pa-modal__form label > input,
.theoasso-pa-modal__form label > select,
.theoasso-pa-modal__form label > textarea{
	display: block;
	margin-top: 0.35rem;
	font-weight: 400;
}

/* Optional 2-column row: wrap two <label> in <div class="pa-row"> in CF7 */
.theoasso-pa-modal__form .pa-row{
	display: flex;
	gap: 1rem;
}

.theoasso-pa-modal__form .pa-row > label{
	flex: 1 1 0;
	min-width: 0;
}

.theoasso-pa-modal__form input[type="text"],
.theoasso-pa-modal__form input[type="email"],
.theoasso-pa-modal__form input[type="tel"],
.theoasso-pa-modal__form input[type="url"],
.theoasso-pa-modal__form input[type="number"],
.theoasso-pa-modal__form select,
.theoasso-pa-modal__form textarea{
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	background: #fff;
	color: var(--wp--preset--color--contrast, #111);
	font-size: 0.95rem;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theoasso-pa-modal__form input:focus,
.theoasso-pa-modal__form select:focus,
.theoasso-pa-modal__form textarea:focus{
	outline: none;
	border-color: var(--wp--preset--color--blue, #2563eb);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.theoasso-pa-modal__form textarea{
	min-height: 110px;
	resize: vertical;
}

.theoasso-pa-modal__form .wpcf7-submit{
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.9rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--blue, #2563eb);
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.theoasso-pa-modal__form .wpcf7-submit:hover{
	opacity: 0.9;
}

.theoasso-pa-modal__form .wpcf7-spinner{
	margin: 0.5rem auto 0;
}

.theoasso-pa-modal__form .wpcf7-not-valid-tip{
	color: #d63638;
	font-size: 0.8rem;
	margin-top: 0.25rem;
}

.theoasso-pa-modal__form .wpcf7-response-output{
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	font-size: 0.9rem;
}

@media (max-width: 600px){
	.theoasso-pa-modal__dialog{
		padding: 2.25rem 1.25rem 1.5rem;
	}
}

@media (max-width: 480px){
	.theoasso-pa-modal__form .pa-row{
		flex-direction: column;
		gap: 0;
	}
}

@media (prefers-reduced-motion: reduce){
	.theoasso-pa-accordion__summary::after,
	.theoasso-pa-modal__step--form{
		transition: none;
		animation: none;
	}
}
