/*
Theme Name: Academy Influencee
Description: Tema figlio di Twenty Twenty-Five con l'identità di Influencee per la sua academy. Vale solo per questa academy: il plugin Academy E-learning resta neutro.
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: academy-influencee
*/

/* ---------- Variabili del plugin Academy E-learning ---------- */
.ael {
	--ael-accent: #E6007E;
	--ael-accent-contrast: #ffffff;
	--ael-text: #0A0A0A;
	--ael-muted: #6B6B6B;
	--ael-border: #E4E4E4;
	--ael-surface: #ffffff;
	--ael-surface-alt: #F6F6F6;
	--ael-radius: 20px;
	--ael-gap: 28px;
	font-family: var(--wp--preset--font-family--manrope), sans-serif;
}

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; font-weight: 800; }
.ai-accent { color: #E6007E; }
.ai-on-dark .ai-accent { color: #C7F000; }

/* Pillola-etichetta sopra i titoli */
.ai-pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 14px; border-radius: 999px;
	background: #FDE6F1; color: #0A0A0A;
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	margin: 0 0 16px;
}
.ai-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E6007E; }
.ai-on-dark .ai-pill { background: #1f1f1f; color: #fff; }
.ai-on-dark .ai-pill::before { background: #C7F000; }

/* Le fasce della home si toccano, senza strisce bianche tra una e l'altra */
.wp-block-post-content > *, main > * { margin-block-start: 0; }
.ai-footer { margin-block-start: 0; }

/* ---------- Intestazione ---------- */
.ai-header { border-bottom: 1px solid #E4E4E4; background: #fff; }
.ai-header .wp-block-image img { height: 28px; width: auto; display: block; }
.ai-header .wp-block-navigation a { font-weight: 600; text-decoration: none; }
.ai-header .wp-block-navigation a:hover { color: #E6007E; }

/* ---------- Pulsanti (blocchi e plugin) ---------- */
.wp-block-button__link,
.ael-button {
	border-radius: 999px !important;
	font-weight: 700;
	text-decoration: none;
}
.ael-button--primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: #E6007E; border-color: #E6007E; color: #fff;
}
.ael-button--primary:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #A3005E; border-color: #A3005E; color: #fff; }
.ael-button:not(.ael-button--primary) { background: transparent; color: #0A0A0A; border-color: #0A0A0A; }
.ael-button:not(.ael-button--primary):hover { background: #0A0A0A; color: #fff; }

/* ---------- Catalogo e schede corso ---------- */
.ael-card {
	border: 1px solid #E4E4E4; border-radius: 20px; overflow: hidden;
	background: #fff; transition: transform .15s ease, box-shadow .15s ease;
}
.ael-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(10,10,10,.08); }
.ael-card-title a { color: #0A0A0A; text-decoration: none; }
.ael-card-price { font-weight: 800; }
.ael-card-cats a, .ael-badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	background: #FDE6F1; color: #0A0A0A; font-size: 12px; font-weight: 700; text-decoration: none;
}
.ael-badge { background: #C7F000; }
.ael-card-placeholder { background: linear-gradient(135deg, #E6007E 0%, #0A0A0A 100%); }
.ael-filters select, .ael-filters input, .ael-login input[type="text"], .ael-login input[type="password"], .ael-login input[type="email"] {
	border: 1px solid #E4E4E4; border-radius: 999px; padding: 10px 16px; background: #fff;
}

/* ---------- Corso e lezione ---------- */
.ael-progress { background: #E4E4E4; border-radius: 999px; overflow: hidden; }
.ael-progress-bar { background: #E6007E; }
.ael-module { border: 1px solid #E4E4E4; border-radius: 20px; background: #F6F6F6; }
.ael-lesson-item.ael-done { color: #6B6B6B; }
.ael-video { border-radius: 20px; overflow: hidden; background: #0A0A0A; }
.ael-teacher-box, .ael-login-box { border: 1px solid #E4E4E4; border-radius: 20px; background: #F6F6F6; }

/* ---------- Home ---------- */
.ai-hero { background: #fff; }
.ai-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; }
.ai-dark { background: #0A0A0A; color: #fff; }
.ai-dark h2, .ai-dark h3 { color: #fff; }
.ai-card { background: #F6F6F6; border-radius: 20px; padding: 28px; }
.ai-card--ink { background: #0A0A0A; color: #fff; }
.ai-card--ink h3 { color: #fff; }

/* ---------- Piè di pagina ---------- */
.ai-footer { background: #0A0A0A; color: #9A9A9A; }
.ai-footer a { color: #fff; text-decoration: none; }
.ai-footer a:hover { color: #C7F000; }
.ai-footer .wp-block-image img { height: 26px; width: auto; }

/* ---------- Home: parte grafica della hero ---------- */
.ai-visual { position: relative; height: 460px; max-width: 420px; margin-inline: auto; }
.ai-phone { position: absolute; border-radius: 32px; }
.ai-phone--back { width: 200px; height: 356px; right: 0; top: 70px; background: #F6F6F6; border: 1px solid #E4E4E4; transform: rotate(7deg); }
.ai-phone--front {
	width: 210px; height: 374px; left: 20px; top: 20px;
	background: linear-gradient(160deg, #E6007E 0%, #A3005E 45%, #0A0A0A 100%);
	display: flex; align-items: center; justify-content: center; box-shadow: 0 24px 50px rgba(10,10,10,.18);
	transform: rotate(-5deg);
}
.ai-phone--front img { width: 96px; height: 96px; }
.ai-play { position: absolute; bottom: 28px; left: 50%; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; background: #fff; }
.ai-play::after { content: ""; position: absolute; left: 18px; top: 14px; border-left: 14px solid #0A0A0A; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.ai-chip {
	position: absolute; padding: 9px 16px; border-radius: 999px; background: #fff; color: #0A0A0A;
	font-size: 13px; font-weight: 700; box-shadow: 0 10px 28px rgba(10,10,10,.12); border: 1px solid #E4E4E4;
}
.ai-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E6007E; margin-right: 8px; }
.ai-chip--1 { left: -6px; top: 0; }
.ai-chip--2 { right: -6px; top: 205px; background: #0A0A0A; color: #fff; border-color: #0A0A0A; }
.ai-chip--2::before { background: #C7F000; }
.ai-chip--3 { left: 30px; bottom: 10px; }

/* Schede numerate */
.ai-num { font-size: 14px; font-weight: 800; letter-spacing: .1em; color: #E6007E; margin: 0 0 40px; }
.ai-card--ink .ai-num { color: #C7F000; }
.ai-card h3 { margin-top: 0; }

/* Righe numerate su nero con "+" verde acido */
.ai-rows { list-style: none; margin: 40px 0 0; padding: 0; }
.ai-rows li { display: flex; align-items: center; gap: 24px; padding: 26px 0; border-top: 1px solid #2a2a2a; }
.ai-rows li:last-child { border-bottom: 1px solid #2a2a2a; }
.ai-rows-n { color: #9A9A9A; font-weight: 700; font-size: 14px; min-width: 52px; }
.ai-rows-t { flex: 1; font-size: clamp(1.1rem, 2.6vw, 1.7rem); font-weight: 700; }
.ai-plus { width: 40px; height: 40px; border-radius: 50%; background: #C7F000; color: #0A0A0A; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; line-height: 1; }

/* Riquadro finale */
.ai-cta { background: #F6F6F6; padding: clamp(32px, 6vw, 64px); }

@media (max-width: 781px) {
	.ai-visual { height: 400px; transform: scale(.92); }
	.ai-hero { padding-top: 40px !important; }
}

/* Chi ha già fatto l'accesso non vede "Accedi" */
body.logged-in .ai-header-cta { display: none; }
.ai-header-cta .wp-block-button__link { color: #0A0A0A; border: 1.5px solid #0A0A0A; background: transparent; padding: 8px 20px; }
.ai-header-cta .wp-block-button__link:hover { background: #0A0A0A; color: #C7F000; }

/* ---------- Verde acido: accenti dell'academy ---------- */
/* Numeri del docente: schede nere con il numero in verde acido */
.ael-stats li { background: #0A0A0A; border-color: #0A0A0A; color: #fff; }
.ael-stats .ael-stat-num { color: #C7F000; }
.ael-stats .ael-stat-label { color: #9A9A9A; }

/* Canali */
.ael-channel { background: #F6F6F6; border-color: #E4E4E4; transition: border-color .15s ease; }
.ael-channel:hover { border-color: #0A0A0A; }
.ael-channel-platform {
	align-self: flex-start; padding: 3px 10px; border-radius: 999px;
	background: #0A0A0A; color: #C7F000; letter-spacing: .08em;
}
.ael-channel-handle { color: #0A0A0A; text-decoration: none; }
.ael-channel-handle:hover { color: #E6007E; }
.ael-stats-date { font-style: italic; }

/* Prezzo e badge */
.ael-card-price, .ael-price {
	display: inline-block; padding: 4px 14px; border-radius: 999px;
	background: #0A0A0A; color: #C7F000; font-weight: 800;
}
.ael-price { font-size: 1.6em; padding: 6px 18px; }
.ael-badge { background: #C7F000; color: #0A0A0A; }
.ael-done { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #C7F000; color: #0A0A0A; font-size: 12px; font-weight: 700; }
.ael-lock { filter: grayscale(1); }

/* Programma e riquadri laterali */
.ael-side { border-color: #0A0A0A; border-width: 1.5px; }
.ael-lesson-item.is-current > a, .ael-lesson-item.is-current { font-weight: 800; }
.ael-lesson-item.is-current::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #C7F000; box-shadow: 0 0 0 2px #0A0A0A; }
.ael-progress-bar { background: linear-gradient(90deg, #E6007E, #C7F000); }
.ael-section > h2 { display: inline-block; background: linear-gradient(transparent 62%, #C7F000 62%); padding: 0 6px; margin-left: -6px; }
.ael-filters .ael-button, .ael-filters button { background: #0A0A0A; color: #C7F000; border-color: #0A0A0A; }

/* Scheda docente: foto in verticale e riquadro */
.ael-teacher-photo img { border-radius: 24px; }
.ael-teacher-info .ael-teacher-tagline { font-weight: 700; color: #0A0A0A; font-size: 1.35em; letter-spacing: -.01em; }
.ael-teacher-box { background: #0A0A0A; color: #fff; border: 0; border-radius: 20px; padding: 22px; }
.ael-teacher-box h2 { color: #C7F000; }
.ael-teacher-box a { color: #fff; }
.ael-teacher-box-tagline, .ael-teacher-box-bio { color: #C9C9C9; }
.ael-teacher-box .ael-stats li { background: #1b1b1b; }
.ael-teacher-box .ael-teacher-box-links a { color: #C7F000; }
.ael-teacher-info .ael-teacher-box-links a { color: #E6007E; text-decoration: none; font-weight: 700; }

/* Formato verticale: copertina e foto */
body.ael-format-portrait .ai-course-hero .wp-block-post-featured-image,
body.ael-format-portrait .ai-course-hero .ai-cover-fallback { aspect-ratio: 4 / 5 !important; max-width: 340px; margin-inline: auto; }
body.ael-format-portrait .ai-course-hero .wp-block-post-featured-image img { aspect-ratio: 4 / 5 !important; }

/* ---------- Scheda corso: copertina ---------- */
.ai-course-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; margin: 0; }
.ai-course-hero .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.ai-cover-fallback {
	aspect-ratio: 16 / 9; border-radius: 20px; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #E6007E 0%, #A3005E 45%, #0A0A0A 100%);
}
.ai-cover-fallback img { width: 110px; height: 110px; }
.ael-course .ael-meta { margin-top: 8px; }
.ael-description, .ael-section { max-width: 760px; }
.ael-checklist li::marker { color: #E6007E; }

/* ========== Intestazione (come influencee.it: logo, menu, pulsanti a destra) ========== */
.ai-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #E4E4E4; }
.ai-header-bar { gap: 24px; }
.ai-brand { gap: 10px !important; align-items: center; }
.ai-brand .wp-block-image { margin: 0; }
.ai-brand .wp-block-image img { height: 26px; width: auto; display: block; }
.ai-pill--small { margin: 0; padding: 3px 10px; font-size: 10.5px; background: #0A0A0A; color: #C7F000; }
.ai-pill--small::before { background: #C7F000; width: 6px; height: 6px; }
.ai-nav a { font-weight: 600; font-size: 15px; text-decoration: none; color: #0A0A0A; }
.ai-nav a:hover { color: #E6007E; }
.ai-actions { gap: 10px !important; align-items: center; }
.ai-actions .wp-block-buttons { margin: 0; }
.ai-actions .wp-block-button__link { padding: 9px 20px; font-size: 14px; }
.ai-actions .is-style-outline .wp-block-button__link { color: #0A0A0A; border: 1.5px solid #0A0A0A; background: transparent; }
.ai-actions .is-style-outline .wp-block-button__link:hover { background: #0A0A0A; color: #C7F000; }
.ai-btn-in { display: none; }
body.logged-in .ai-btn-in { display: flex; }
body.logged-in .ai-btn-out { display: none; }
.ai-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #0A0A0A; text-decoration: none; }
.ai-cart:hover { background: #F6F6F6; }
.ai-cart-count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #C7F000; color: #0A0A0A; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.ai-actions p { margin: 0; }

/* Etichetta "Completata": solo sulle lezioni completate (la regola del plugin la nasconde) */
.ael-lesson-item:not(.is-done) .ael-done { display: none; }

/* ========== Pagine WooCommerce: account, ordini, carrello, pagamento ========== */
.woocommerce, .woocommerce-page { font-family: var(--wp--preset--font-family--manrope), sans-serif; }
.wp-block-post-title { font-weight: 800; letter-spacing: -.02em; }
.woocommerce a { color: #E6007E; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, #place_order {
	background: #E6007E; color: #fff; border: 0; border-radius: 999px; padding: 12px 26px; font-weight: 700; font-size: 15px; line-height: 1.2; transition: background .15s ease;
}
.woocommerce .button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover, #place_order:hover { background: #A3005E; color: #fff; }
.woocommerce a.button.wc-backward { background: #0A0A0A; color: #C7F000; }
.woocommerce a.button.wc-backward:hover { background: #E6007E; color: #fff; }
.woocommerce a.remove { color: #0A0A0A !important; background: #F6F6F6; border-radius: 50%; }
.woocommerce a.remove:hover { background: #0A0A0A; color: #C7F000 !important; }

/* Avvisi */
.woocommerce-info, .woocommerce-message, .woocommerce-error {
	border: 1px solid #E4E4E4; border-left: 6px solid #E6007E; border-radius: 16px; background: #F6F6F6; color: #0A0A0A; padding: 16px 20px 16px 52px;
}
.woocommerce-message { border-left-color: #C7F000; }
.woocommerce-error { border-left-color: #0A0A0A; }
.woocommerce-info::before, .woocommerce-message::before, .woocommerce-error::before { color: #0A0A0A; }

/* Campi dei moduli */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container--default .select2-selection--single {
	border: 1px solid #E4E4E4; border-radius: 14px; padding: 12px 16px; background: #fff; min-height: 46px; font-size: 15px;
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: #0A0A0A; outline: none; box-shadow: 0 0 0 3px #C7F000; }
.woocommerce form .form-row label { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.woocommerce form fieldset { border: 1px solid #E4E4E4; border-radius: 16px; padding: 16px 20px; }
.woocommerce-form-login, .woocommerce-form-register, .woocommerce form.checkout_coupon {
	border: 1px solid #E4E4E4; border-radius: 20px; background: #F6F6F6; padding: 24px;
}

/* Tabelle (carrello, ordini, riepilogo) */
.woocommerce table.shop_table { border: 1px solid #E4E4E4; border-radius: 20px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: #fff; }
.woocommerce table.shop_table th { background: #0A0A0A; color: #fff; font-weight: 700; padding: 14px 16px; border: 0; }
.woocommerce table.shop_table td { padding: 16px; border-top: 1px solid #E4E4E4; }
.woocommerce table.shop_table tr:first-child td { border-top: 0; }
.woocommerce table.shop_table .product-name a { color: #0A0A0A; font-weight: 700; text-decoration: none; }
.woocommerce-cart table.cart img { width: 64px; border-radius: 12px; }
.woocommerce-cart table.cart td.actions .coupon .input-text { border: 1px solid #E4E4E4; border-radius: 999px; padding: 10px 16px; width: 150px; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals { background: #0A0A0A; color: #fff; border-radius: 20px; padding: 24px; }
.woocommerce .cart_totals h2 { color: #C7F000; margin-top: 0; font-size: 1.3em; }
.woocommerce .cart_totals table.shop_table { background: transparent; border: 0; }
.woocommerce .cart_totals table.shop_table th, .woocommerce .cart_totals table.shop_table td { background: transparent; color: #fff; border-top: 1px solid #2a2a2a; padding: 12px 0; }
.woocommerce .cart_totals .order-total .amount { color: #C7F000; font-weight: 800; font-size: 1.3em; }
.woocommerce .cart_totals .button, .woocommerce .cart_totals a.checkout-button { width: 100%; text-align: center; }
.woocommerce .cart-empty { text-align: center; padding: 56px 20px; font-size: 1.2em; font-weight: 700; }

/* Pagamento */
.woocommerce-checkout h3 { font-weight: 800; letter-spacing: -.01em; }
.woocommerce-checkout #order_review { border: 1px solid #E4E4E4; border-radius: 20px; background: #F6F6F6; padding: 24px; }
.woocommerce-checkout #order_review table.shop_table { border: 0; background: transparent; }
.woocommerce-checkout #order_review table.shop_table th { background: transparent; color: #0A0A0A; border-top: 1px solid #E4E4E4; }
.woocommerce-checkout #payment { background: transparent; border-radius: 16px; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid #E4E4E4; }
.woocommerce-checkout #payment div.payment_box { background: #fff; border-radius: 14px; color: #0A0A0A; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
#place_order { width: 100%; padding: 16px; font-size: 16px; }

/* Il mio account */
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 12px; background: #F6F6F6; border: 1px solid #E4E4E4; border-radius: 20px; }
.woocommerce-MyAccount-navigation li { margin: 0; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; border-radius: 999px; color: #0A0A0A; text-decoration: none; font-weight: 600; }
.woocommerce-MyAccount-navigation li a:hover { background: #fff; }
.woocommerce-MyAccount-navigation li.is-active a { background: #0A0A0A; color: #C7F000; }
.woocommerce-MyAccount-content { border: 1px solid #E4E4E4; border-radius: 20px; padding: 28px; background: #fff; }
.woocommerce-order-received .woocommerce-order { border: 1px solid #E4E4E4; border-radius: 20px; padding: 28px; background: #F6F6F6; }
.woocommerce-thankyou-order-received { font-size: 1.3em; font-weight: 800; }
@media (max-width: 781px) {
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: 1fr; }
	.ai-actions .ai-btn-out:last-of-type { display: none; }
}

/* Pulsanti diversi per chi ha fatto l'accesso e chi no (specificità alta: i blocchi hanno display proprio) */
.ai-actions .wp-block-buttons.ai-btn-in { display: none; }
body.logged-in .ai-actions .wp-block-buttons.ai-btn-in { display: flex; }
body.logged-in .ai-actions .wp-block-buttons.ai-btn-out { display: none; }
@media (max-width: 781px) { .ai-actions .wp-block-buttons.ai-btn-out:last-of-type { display: none; } }

/* Titolo delle pagine allineato al contenuto */
main.wp-block-group > .wp-block-post-title { max-width: none; margin-left: 0; margin-right: 0; margin-bottom: 24px; font-size: clamp(2rem, 4.6vw, 3.2rem); }
main.wp-block-group > .wp-block-post-content { max-width: none; }

/* Account: gli elementi di pulizia dei float di WooCommerce non devono occupare una colonna della griglia */
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation)::before,
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation)::after { display: none; }
.woocommerce-MyAccount-navigation li a, .woocommerce-MyAccount-navigation li.is-active a { text-decoration: none; }

/* Totale carrello: il pulsante resta dentro il riquadro */
.woocommerce .cart_totals .wc-proceed-to-checkout { padding: 8px 0 0; }
.woocommerce .cart_totals .button, .woocommerce .cart_totals a.checkout-button,
.woocommerce-page .cart_totals a.checkout-button { box-sizing: border-box; display: block; width: 100%; margin: 0; text-align: center; }
.woocommerce *, .woocommerce-page * { box-sizing: border-box; }

/* Menu utente */
.ai-user-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #0A0A0A; text-decoration: none; }
.ai-user-link:hover { background: #F6F6F6; color: #E6007E; }
.ai-user { position: relative; }
.ai-user summary { list-style: none; cursor: pointer; display: flex; }
.ai-user summary::-webkit-details-marker { display: none; }
.ai-user-initial { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #0A0A0A; color: #C7F000; font-weight: 800; font-size: 16px; }
.ai-user[open] .ai-user-initial, .ai-user summary:hover .ai-user-initial { background: #E6007E; color: #fff; }
.ai-user-menu { position: absolute; right: 0; top: 52px; min-width: 220px; padding: 10px; background: #fff; border: 1px solid #E4E4E4; border-radius: 20px; box-shadow: 0 16px 40px rgba(10,10,10,.12); z-index: 60; }
.ai-user-name { margin: 6px 12px 8px; font-weight: 800; font-size: 14px; }
.ai-user-menu ul { list-style: none; margin: 0; padding: 0; }
.ai-user-menu a { display: block; padding: 10px 14px; border-radius: 999px; color: #0A0A0A; text-decoration: none; font-weight: 600; font-size: 14px; }
.ai-user-menu a:hover { background: #0A0A0A; color: #C7F000; }

/* Nella home il pulsante "Accedi" non serve a chi ha già fatto l'accesso */

/* Foto profilo nel menu utente e nell'area account */
.ai-user-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px #0A0A0A; }
.ai-user[open] .ai-user-photo, .ai-user summary:hover .ai-user-photo { box-shadow: 0 0 0 2px #E6007E; }
.ael-avatar-box { background: #F6F6F6; border-radius: 20px; }
.ael-avatar-title { font-weight: 800; }
.ael-avatar-preview img { box-shadow: 0 0 0 3px #0A0A0A, 0 0 0 6px #C7F000; }
.ael-avatar-form input[type="file"] { max-width: 100%; font-size: 14px; }
.ael-avatar-buttons .ael-button { border-radius: 999px; font-weight: 700; }
.ael-avatar-buttons .ael-button:not(.ael-button--primary) { background: transparent; color: #0A0A0A; border: 1.5px solid #0A0A0A; }

/* Chi ha già un account non vede i pulsanti "Iscriviti" */
body.logged-in .ai-signup { display: none; }

/* Pagine Accedi e Iscriviti */
.ael-login-box { border-radius: 24px; }
.ael-register-box, .ael-login-box { background: #F6F6F6; border: 1px solid #E4E4E4; padding: clamp(20px, 4vw, 36px); }
.ael-field input[type="text"], .ael-field input[type="email"], .ael-field input[type="password"] { border-radius: 14px; background: #fff; }
.ael-field input:focus { border-color: #0A0A0A; outline: none; box-shadow: 0 0 0 3px #C7F000; }
.ael-register-form .ael-button--primary { width: 100%; text-align: center; padding: 14px; font-size: 16px; }
.ael-login-register { margin-top: 16px; font-weight: 600; }
.ael-error { border-radius: 14px; }

/* Intestazione: nessun testo a capo, e più compatta sugli schermi stretti */
.ai-actions .wp-block-button__link, .ai-nav a { white-space: nowrap; }
.ai-nav .wp-block-navigation__container { flex-wrap: nowrap; gap: 20px; }
.ai-actions { flex-shrink: 0; }
@media (max-width: 1060px) {
	.ai-header-bar { gap: 12px; }
	.ai-nav .wp-block-navigation__container { gap: 14px; }
	.ai-nav a { font-size: 14px; }
	.ai-actions .wp-block-button__link { padding: 8px 14px; font-size: 13px; }
	.ai-pill--small { display: none; }
}

/* Telefono: il logo non si schiaccia mai, e "Accedi" lascia posto (l'icona del profilo porta comunque all'accesso) */
.ai-brand { flex-shrink: 0; }
.ai-brand .wp-block-image img { min-width: 120px; }
@media (max-width: 560px) {
	.ai-actions .wp-block-buttons.ai-btn-out:first-of-type { display: none; }
	.ai-header-bar { gap: 8px; }
	.ai-actions { gap: 4px !important; }
	.ai-brand .wp-block-image img { min-width: 104px; height: 22px; }
}
@media (max-width: 560px) {
	.ai-brand .wp-block-image img { min-width: 0; height: 16px; }
	.ai-cart, .ai-user-link { width: 34px; height: 34px; }
	.ai-actions .wp-block-button__link { padding: 7px 12px; font-size: 12px; }
	.ai-header .wp-block-navigation__responsive-container-open { padding: 0; }
}

/* Da telefono: carrello, profilo e pulsanti stanno nel menu a tre righe; nella barra restano logo e menu */
.ai-nav .ai-m-only { display: none; }
@media (max-width: 600px) {
	.ai-actions { display: none !important; }
	.ai-nav .ai-m-only { display: flex; }
	.ai-nav .ai-m-in { display: none; }
	body.logged-in .ai-nav .ai-m-in { display: flex; }
	body.logged-in .ai-nav .ai-m-out { display: none; }
	.ai-nav .ai-m-out:last-child a { background: var(--wp--preset--color--accent-1, #E6007E); color: #fff; padding: 10px 22px; border-radius: 999px; }
	.ai-brand .wp-block-image img { height: 22px; }
	.ai-header-bar { gap: 12px; }
}

/* Il filtro di sfocatura dell'intestazione impediva al menu a tutto schermo di aprirsi bene: sfondo pieno */
.ai-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }

/* Menu da telefono: regole più precise, perché WordPress dà già un suo display alle voci del menu */
.ai-nav .wp-block-navigation-item.ai-m-only { display: none; }
@media (max-width: 600px) {
	.ai-nav .wp-block-navigation-item.ai-m-only { display: flex; }
	.ai-nav .wp-block-navigation-item.ai-m-in { display: none; }
	body.logged-in .ai-nav .wp-block-navigation-item.ai-m-in { display: flex; }
	body.logged-in .ai-nav .wp-block-navigation-item.ai-m-out { display: none; }
	.ai-nav .wp-block-navigation-item.ai-m-cta { display: flex; margin-top: 10px; padding: 0; }
	body.logged-in .ai-nav .wp-block-navigation-item.ai-m-cta { display: none; }
	.ai-nav .ai-m-cta a { background: #E6007E; color: #fff !important; padding: 12px 32px; border-radius: 999px; font-weight: 800; }
}

/* Menu da telefono: priorità alle nostre regole sulle voci (WordPress ne ha di molto precise) */
@media (max-width: 600px) {
	html body .ai-header .ai-nav .wp-block-navigation__container .wp-block-navigation-item.ai-m-in { display: none; }
	html body.logged-in .ai-header .ai-nav .wp-block-navigation__container .wp-block-navigation-item.ai-m-in { display: flex; }
	html body.logged-in .ai-header .ai-nav .wp-block-navigation__container .wp-block-navigation-item.ai-m-out { display: none; }
	html body .ai-header .ai-nav .wp-block-navigation__container .wp-block-navigation-item.ai-m-cta { background: #E6007E !important; border-radius: 999px; padding: 12px 34px !important; margin-top: 10px; }
	html body .ai-header .ai-nav .ai-m-cta a { background: transparent !important; padding: 0 !important; color: #fff !important; font-weight: 800; }
}


/* ---------- Ordine ricevuto ---------- */
.ai-order .wc-block-order-confirmation-status { background: #F6F6F6; border: 1px solid #E4E4E4; border-radius: 20px; padding: 28px 32px; margin-bottom: 24px; }
.ai-order .wc-block-order-confirmation-status p { font-size: 17px; line-height: 1.6; margin: 0 0 8px; }
.ai-order .wc-block-order-confirmation-status p:first-child { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.ai-order .wc-block-order-confirmation-status a { color: #E6007E; font-weight: 700; }
.ai-order .wc-block-order-confirmation-summary { border: 1px solid #E4E4E4; border-radius: 20px; padding: 20px 28px; margin-bottom: 24px; }
.ai-order h2 { font-size: 22px; font-weight: 800; }
.ai-order > p, .ai-order .wp-block-woocommerce-order-confirmation-additional-information { font-size: 17px; line-height: 1.6; }
