.pcf-form-wrap,
.pcf-area {
	--pcf-accent: #00838a;
	--pcf-accent-dark: #00666c;
	--pcf-border: #dcdfe3;
	--pcf-muted: #6b7280;
	--pcf-bg-soft: #f6f8f9;
	--pcf-danger: #b4232a;
	max-width: 960px;
	margin: 0 auto;
}

.pcf-form-wrap { max-width: 560px; }

.pcf-form-title {
	margin: 0 0 1.25rem;
	text-align: center;
	letter-spacing: .08em;
	text-transform: uppercase;
	font-size: 1.05rem;
}

.pcf-field { margin-bottom: 1rem; }

.pcf-field label,
.pcf-field .pcf-label {
	display: block;
	margin-bottom: .35rem;
	font-size: .9rem;
	font-weight: 600;
}

/* Etichetta nascosta alla vista ma leggibile dai lettori di schermo. */
.pcf-field .pcf-label--hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pcf-field input[type="text"],
.pcf-field input[type="email"],
.pcf-field input[type="tel"],
.pcf-field input[type="url"],
.pcf-field input[type="date"],
.pcf-field input[type="number"],
.pcf-field input[type="file"],
.pcf-field select,
.pcf-field textarea {
	width: 100%;
	padding: .75rem .9rem;
	border: 1px solid var(--pcf-border);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	box-sizing: border-box;
}

.pcf-field input:focus-visible,
.pcf-field select:focus-visible,
.pcf-field textarea:focus-visible,
.pcf-btn:focus-visible,
.pcf-slot:focus-visible {
	outline: 2px solid var(--pcf-accent);
	outline-offset: 2px;
}

.pcf-req { color: var(--pcf-danger); }

.pcf-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

.pcf-option {
	display: flex;
	align-items: flex-start;
	gap: .45rem;
	font-weight: 400 !important;
	margin-bottom: 0 !important;
}

.pcf-field--privacy { margin: 1.25rem 0; font-size: .9rem; }

.pcf-hp { position: absolute; left: -9999px; }

.pcf-btn {
	display: inline-block;
	padding: .8rem 1.6rem;
	border: 0;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	letter-spacing: .04em;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease;
}

.pcf-btn--primary { background: var(--pcf-accent, #00838a) !important; color: #fff !important; border: 0 !important; }
.pcf-btn--primary:hover { background: var(--pcf-accent-dark, #00666c) !important; color: #fff !important; }
.pcf-btn--ghost { background: transparent !important; border: 1px solid var(--pcf-accent, #00838a) !important; color: var(--pcf-accent, #00838a) !important; }
.pcf-btn--ghost:hover { background: var(--pcf-accent, #00838a) !important; color: #fff !important; }
.pcf-btn--danger { background: transparent !important; color: var(--pcf-danger, #b4232a) !important; border: 1px solid var(--pcf-danger, #b4232a) !important; padding: .45rem .9rem; font-size: .85rem; }
.pcf-btn--danger:hover { background: var(--pcf-danger, #b4232a) !important; color: #fff !important; }
.pcf-btn[disabled] { opacity: .55; cursor: not-allowed; }

.pcf-form .pcf-btn--primary { width: 100%; }

.pcf-notice {
	padding: .9rem 1.1rem;
	border-radius: 4px;
	margin-bottom: 1.25rem;
	font-size: .92rem;
}

.pcf-notice--ok { background: #e6f4ea; border-left: 3px solid #1e7a3c; }
.pcf-notice--error { background: #fdecea; border-left: 3px solid var(--pcf-danger); }
.pcf-notice ul { margin: 0; padding-left: 1.1rem; }

/* Area riservata ------------------------------------------------------ */

.pcf-area__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.pcf-area__head h2 { margin: 0; }
.pcf-muted { color: var(--pcf-muted); margin: .25rem 0 0; font-size: .9rem; }

.pcf-card {
	border: 1px solid var(--pcf-border);
	border-radius: 6px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	background: #fff;
}

.pcf-card h3 { margin-top: 0; }

.pcf-card__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 0; }
.pcf-card__actions .pcf-btn { padding: .55rem 1rem; font-size: .85rem; }

.pcf-empty { color: var(--pcf-muted); }

.pcf-msg {
	display: none;
	padding: .9rem 1.1rem;
	border-radius: 4px;
	margin-bottom: 1.25rem;
}

.pcf-msg.is-visible { display: block; }
.pcf-msg--ok { background: #e6f4ea; border-left: 3px solid #1e7a3c; }
.pcf-msg--error { background: #fdecea; border-left: 3px solid var(--pcf-danger); }

.pcf-table { width: 100%; border-collapse: collapse; }
.pcf-table th, .pcf-table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--pcf-border); }
.pcf-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pcf-muted); }

.pcf-exhibitors { list-style: none; margin: 0; padding: 0; }

.pcf-exhibitor {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1rem 0;
	border-bottom: 1px solid var(--pcf-border);
}

.pcf-exhibitor:last-child { border-bottom: 0; }
.pcf-exhibitor__meta { color: var(--pcf-muted); font-size: .88rem; margin-top: .2rem; }
.pcf-exhibitor__meta span:not(:last-child)::after { content: " · "; }

.pcf-badge {
	font-size: .8rem;
	padding: .35rem .7rem;
	border-radius: 999px;
	background: var(--pcf-bg-soft);
	color: var(--pcf-muted);
}

.pcf-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; }
.pcf-data dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pcf-muted); }
.pcf-data dd { margin: .2rem 0 0; }

/* Popup --------------------------------------------------------------- */

.pcf-modal {
	/* Ridichiara le variabili: il popup vive fuori da .pcf-area nel DOM. */
	--pcf-accent: #00838a;
	--pcf-accent-dark: #00666c;
	--pcf-border: #dcdfe3;
	--pcf-muted: #6b7280;
	--pcf-ink: #1f2a2e;
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 1rem;
}
.pcf-modal[hidden] { display: none; }
.pcf-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 26, .55); }

.pcf-modal__box {
	position: relative;
	background: #fff;
	border-radius: 12px;
	width: min(640px, 100%);
	max-height: 88vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	color: var(--pcf-ink);
}

.pcf-modal__head {
	background: var(--pcf-accent);
	color: #fff;
	padding: 1.1rem 1.4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.pcf-modal__head h3 { margin: 0; color: #fff; font-size: 1.2rem; line-height: 1.3; }

.pcf-modal__close {
	flex: 0 0 auto;
	width: 34px; height: 34px;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .18) !important;
	color: #fff !important;
	font-size: 1.3rem; line-height: 1;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background-color .15s ease;
	padding: 0 !important;
}
.pcf-modal__close:hover { background: rgba(255, 255, 255, .32) !important; }

.pcf-modal__scroll { padding: 1.4rem; overflow-y: auto; }

.pcf-modal__info { margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--pcf-border); }
.pcf-modal__info p { margin: .15rem 0; font-size: .9rem; color: var(--pcf-muted); }
.pcf-modal__info a { color: var(--pcf-accent); }

.pcf-modal__hint { margin: 0 0 1rem; font-size: .9rem; color: var(--pcf-muted); }

.pcf-day + .pcf-day { margin-top: 1.4rem; }
.pcf-day h4 {
	margin: 0 0 .7rem; font-size: .8rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; color: var(--pcf-accent);
}

.pcf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }

.pcf-slot {
	padding: .7rem .5rem;
	border: 1px solid var(--pcf-accent) !important;
	border-radius: 6px;
	background: #fff !important;
	color: var(--pcf-accent) !important;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .12s ease;
	text-align: center;
}
.pcf-slot:hover, .pcf-slot:focus-visible {
	background: var(--pcf-accent) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

/* Pannello di conferma dentro il popup */
.pcf-confirm { text-align: center; padding: .5rem 0; }
.pcf-confirm__q { font-size: 1.05rem; margin: 0 0 1.2rem; }
.pcf-confirm__slot {
	display: inline-block; margin: 0 0 1.4rem;
	padding: .8rem 1.2rem; border-radius: 8px;
	background: #eef6f6; color: var(--pcf-accent-dark);
	font-weight: 700; font-size: 1.05rem;
}
.pcf-confirm__actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.pcf-confirm__actions .pcf-btn { min-width: 130px; }
.pcf-btn--confirm { background: var(--pcf-accent) !important; color: #fff !important; border: 0 !important; }
.pcf-btn--confirm:hover { background: var(--pcf-accent-dark) !important; }
.pcf-btn--back {
	background: #fff !important; color: var(--pcf-muted) !important;
	border: 1px solid var(--pcf-border) !important;
}

body.pcf-modal-open { overflow: hidden; }

@media (max-width: 600px) {
	.pcf-table thead { display: none; }
	.pcf-table tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--pcf-border); }
	.pcf-table td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem 0; }
	.pcf-table td::before { content: attr(data-label); font-weight: 600; font-size: .8rem; color: var(--pcf-muted); }
	.pcf-exhibitor { align-items: flex-start; flex-direction: column; }

	/* Popup a tutto schermo su mobile, slot più grandi da toccare */
	.pcf-modal { padding: 0; align-items: stretch; }
	.pcf-modal__box { width: 100%; max-height: 100%; border-radius: 0; }
	.pcf-modal__scroll { padding: 1.1rem; }
	.pcf-slots { grid-template-columns: repeat(auto-fill, minmax(46%, 1fr)); }
	.pcf-slot { padding: .85rem .5rem; font-size: .95rem; }
	.pcf-confirm__actions .pcf-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.pcf-btn, .pcf-slot { transition: none; }
	.pcf-slot:hover, .pcf-slot:focus-visible { transform: none; }
}

/* ---------------------------------------------------------------------
 * Blindatura colori: impedisce al tema di colorare pulsanti e link
 * del plugin con il proprio accento. Tutto entro i contenitori PCF.
 * ------------------------------------------------------------------ */

.pcf-form-wrap,
.pcf-area,
.pcf-modal {
	--pcf-accent: #00838a;
	--pcf-accent-dark: #00666c;
	--pcf-danger: #b4232a;
}

/* Link generici dentro le aree del plugin: colore del brand, mai quello del tema. */
.pcf-form-wrap a:not(.pcf-btn),
.pcf-area a:not(.pcf-btn),
.pcf-modal a:not(.pcf-btn),
.pcf-lost a {
	color: var(--pcf-accent) !important;
	text-decoration: none;
}
.pcf-form-wrap a:not(.pcf-btn):hover,
.pcf-area a:not(.pcf-btn):hover,
.pcf-modal a:not(.pcf-btn):hover,
.pcf-lost a:hover {
	color: var(--pcf-accent-dark) !important;
	text-decoration: underline;
}

/* Form di login nativo di WordPress reso dallo shortcode [pcf_login]. */
.pcf-form-wrap--login #loginform,
.pcf-form-wrap--login .login {
	max-width: 460px;
	margin: 0 auto;
}
.pcf-form-wrap--login #loginform label {
	display: block;
	margin-bottom: .35rem;
	font-weight: 600;
	font-size: .9rem;
}
.pcf-form-wrap--login #loginform input[type="text"],
.pcf-form-wrap--login #loginform input[type="password"] {
	width: 100%;
	padding: .75rem .9rem;
	border: 1px solid var(--pcf-border);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	box-sizing: border-box;
	margin-bottom: 1rem;
}

/* Il pulsante "Accedi": forza teal comunque sia stilizzato dal tema. */
.pcf-form-wrap--login #wp-submit,
.pcf-form-wrap--login input[type="submit"],
.pcf-form-wrap--login button[type="submit"] {
	background: var(--pcf-accent) !important;
	background-image: none !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 4px !important;
	padding: .8rem 1.6rem !important;
	font-weight: 600 !important;
	letter-spacing: .04em;
	text-shadow: none !important;
	box-shadow: none !important;
	cursor: pointer;
	width: 100%;
}
.pcf-form-wrap--login #wp-submit:hover,
.pcf-form-wrap--login input[type="submit"]:hover,
.pcf-form-wrap--login button[type="submit"]:hover {
	background: var(--pcf-accent-dark) !important;
	color: #fff !important;
}

.pcf-form-wrap--login .login-remember label {
	font-weight: 400;
	font-size: .9rem;
}
.pcf-lost { margin-top: 1rem; text-align: center; font-size: .9rem; }

/* Il campo email del checkbox privacy e il link privacy restano nel brand. */
.pcf-field--privacy a { color: var(--pcf-accent) !important; }
