/* ── Nalu B2B – Stili form di registrazione e My Account ─────────────── */

/* ── Pannello professionista ─────────────────────────────────────────── */

#nalu-b2b-professional-fields {
	margin-top: 1rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
}

#nalu-b2b-professional-fields.nalu-b2b-visible {
	animation: naluFadeIn 0.2s ease;
}

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

/* ── Widget P.IVA combinato ──────────────────────────────────────────── */

.nalu-b2b-piva-field-wrapper {
	position: relative;
}

.nalu-b2b-piva-field-wrapper label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

/* Contenitore del gruppo (bordo esterno unico) */
.nalu-b2b-vat-input-group {
	display: flex;
	align-items: stretch;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	overflow: visible; /* il dropdown deve uscire fuori */
	transition: border-color 0.15s, box-shadow 0.15s;
}

.nalu-b2b-vat-input-group:focus-within {
	border-color: #96588a;
	box-shadow: 0 0 0 1px #96588a40;
}

/* ── Picker paese ────────────────────────────────────────────────────── */

.nalu-b2b-country-picker {
	position: relative;
	flex-shrink: 0;
}

.nalu-b2b-country-trigger {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 0 10px 0 12px;
	height: 100%;
	min-height: 42px;
	background: #f4f4f4;
	border: none;
	border-right: 1px solid #ccc;
	border-radius: 3px 0 0 3px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
	transition: background 0.12s;
}

.nalu-b2b-country-trigger:hover,
.nalu-b2b-country-trigger:focus-visible {
	background: #ebebeb;
	outline: none;
}

.nalu-b2b-trigger-flag {
	font-size: 20px;
	line-height: 1;
}

.nalu-b2b-trigger-code {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.03em;
}

.nalu-b2b-trigger-arrow {
	opacity: 0.45;
	transition: transform 0.15s;
	flex-shrink: 0;
}

.nalu-b2b-country-trigger[aria-expanded="true"] .nalu-b2b-trigger-arrow {
	transform: rotate( 180deg );
}

/* ── Dropdown ────────────────────────────────────────────────────────── */

.nalu-b2b-country-dropdown {
	position: absolute;
	top: calc( 100% + 3px );
	left: 0;
	z-index: 99999;
	width: 240px;
	max-height: 290px;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.13 );
}

.nalu-b2b-country-dropdown[hidden] {
	display: none;
}

.nalu-b2b-country-search-wrap {
	padding: 8px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.nalu-b2b-country-search {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 9px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	background: #f9f9f9;
}

.nalu-b2b-country-search:focus {
	outline: none;
	border-color: #96588a;
	background: #fff;
}

.nalu-b2b-country-list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	overflow-y: auto;
	flex: 1;
	scroll-behavior: smooth;
}

.nalu-b2b-country-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	cursor: pointer;
	font-size: 13px;
	color: #333;
	transition: background 0.08s;
}

.nalu-b2b-country-list li:hover {
	background: #f3f0f6;
}

.nalu-b2b-country-list li.nalu-b2b-selected {
	background: #ede8f3;
	font-weight: 700;
}

.nalu-b2b-country-list li[hidden] {
	display: none;
}

.nalu-b2b-li-flag {
	font-size: 19px;
	line-height: 1;
	flex-shrink: 0;
}

.nalu-b2b-li-code {
	font-weight: 700;
	font-size: 12px;
	min-width: 28px;
	color: #666;
}

.nalu-b2b-li-label {
	flex: 1;
	color: #444;
	font-size: 13px;
}

/* ── Campo numero ────────────────────────────────────────────────────── */

.nalu-b2b-piva-number {
	flex: 1;
	min-width: 0;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 10px 12px;
	font-size: 14px;
	font-family: monospace;
	letter-spacing: 0.05em;
	border-radius: 0 3px 3px 0;
	background: transparent;
}

/* ── Hint / counter ──────────────────────────────────────────────────── */

.nalu-b2b-piva-hint {
	display: block;
	font-size: 12px;
	margin-top: 5px;
	min-height: 1.4em;
	color: #888;
	transition: color 0.15s;
}

.nalu-b2b-piva-hint--ok  { color: #28a745; }
.nalu-b2b-piva-hint--err { color: #dc3545; }

/* ── Badge stato (My Account + admin) ───────────────────────────────── */

.nalu-b2b-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.75rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
}

.nalu-b2b-status-badge--approved { background: #d4edda; color: #155724; }
.nalu-b2b-status-badge--pending  { background: #fff3cd; color: #856404; }
.nalu-b2b-status-badge--none     { background: #f8d7da; color: #721c24; }

/* ── Scheda dati azienda (My Account) ───────────────────────────────── */

.nalu-b2b-account-card {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 1.25rem 1.5rem;
	margin-top: 1.25rem;
	background: #fff;
}

.nalu-b2b-account-card__row {
	display: flex;
	gap: 0.5rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.nalu-b2b-account-card__row:last-child { border-bottom: none; }

.nalu-b2b-account-card__label {
	flex: 0 0 160px;
	font-weight: 600;
	color: #555;
	font-size: 0.875rem;
}

.nalu-b2b-account-card__value { flex: 1; color: #222; }

/* ── Avviso utente in attesa ─────────────────────────────────────────── */

.nalu-b2b-pending-notice {
	padding: 1rem 1.25rem;
	border-left: 4px solid #ffc107;
	background: #fffbf0;
	border-radius: 0 4px 4px 0;
	margin-top: 1rem;
	font-size: 0.9rem;
	color: #555;
}

/* ── Admin badges (ridondante con inline style ma più specifico) ──────── */
.nalu-b2b-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

.nalu-b2b-badge--approved { background: #d4edda; color: #155724; }
.nalu-b2b-badge--pending  { background: #fff3cd; color: #856404; }
