/* Alter Ego — Acquista (pagina pubblica, indipendente dal tema) */
.ae-shop { --sh-ink: #1a1d29; --sh-muted: #5b6070; --sh-line: #e2e5ee; --sh-bg: #f6f7fb; --sh-acc: #4f46e5; --sh-night: #0b0f2a; --sh-ok: #16a34a; --sh-err: #dc2626;
	max-width: 1100px; margin: 0 auto; padding: 28px 16px 56px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--sh-ink); line-height: 1.5; }
.ae-shop * { box-sizing: border-box; }
.ae-shop h1, .ae-shop h2, .ae-shop h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
.ae-shop-head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-bottom: 26px; }
.ae-shop-logo { height: 46px; width: auto; background: #fff; padding: 8px 12px; border-radius: 12px; box-sizing: content-box; border: 1px solid var(--sh-line); }
.ae-shop-kicker { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--sh-acc); margin-bottom: 4px; }
.ae-shop-head h1 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; }
.ae-shop-head p { margin: 6px 0 0; color: var(--sh-muted); max-width: 720px; }

.ae-shop-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.ae-shop-form { display: flex; flex-direction: column; gap: 18px; }
.ae-shop-card { background: #fff; border: 1px solid var(--sh-line); border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(16,20,40,.05), 0 10px 30px -18px rgba(16,20,40,.25); }
.ae-shop-card h2 { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ae-shop-card h2 span { width: 26px; height: 26px; border-radius: 50%; background: var(--sh-night); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.ae-shop-seg { display: inline-flex; border: 1px solid var(--sh-line); border-radius: 999px; padding: 3px; margin-bottom: 16px; background: var(--sh-bg); }
.ae-shop-seg label { cursor: pointer; }
.ae-shop-seg input { position: absolute; opacity: 0; }
.ae-shop-seg span { display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--sh-muted); }
.ae-shop-seg input:checked + span { background: #fff; color: var(--sh-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ae-shop-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ae-shop-row--addr { grid-template-columns: 2.2fr .8fr 1.4fr .6fr; }
.ae-shop-field { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--sh-muted); margin-bottom: 4px; }
.ae-shop-field input, .ae-shop-field textarea { font: inherit; font-weight: 400; font-size: .95rem; color: var(--sh-ink); padding: 10px 12px; border: 1px solid #cdd3e2; border-radius: 10px; background: #fbfbfe; width: 100%; }
.ae-shop-field input:focus, .ae-shop-field textarea:focus { outline: none; border-color: var(--sh-acc); box-shadow: 0 0 0 4px rgba(79,70,229,.14); background: #fff; }
.ae-shop-field em { font-style: normal; font-size: .75rem; color: var(--sh-err); min-height: 0; }
.ae-shop-field.is-invalid input, .ae-shop-field.is-invalid textarea { border-color: var(--sh-err); }
.ae-shop.is-privato .is-azienda { display: none; }
.ae-shop .is-privato { display: none; }
.ae-shop.is-privato .is-privato { display: inline; }
.ae-shop-hp { position: absolute; left: -9999px; }

.ae-shop-pay { display: grid; gap: 10px; margin-bottom: 14px; }
.ae-shop-payopt { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--sh-line); border-radius: 14px; cursor: pointer; }
.ae-shop-payopt:has(input:checked) { border-color: var(--sh-acc); background: rgba(79,70,229,.06); }
.ae-shop-payopt.is-off { opacity: .55; cursor: not-allowed; }
.ae-shop-payopt input { width: 18px; height: 18px; accent-color: var(--sh-acc); }
.ae-shop-payico { font-size: 1.4rem; }
.ae-shop-paytxt b { display: block; font-size: .95rem; }
.ae-shop-paytxt small { color: var(--sh-muted); font-size: .8rem; }
.ae-shop-accept { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .85rem; color: var(--sh-muted); margin-bottom: 14px; }
.ae-shop-accept input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sh-acc); }
.ae-shop-accept em { grid-column: 2; font-style: normal; color: var(--sh-err); font-size: .75rem; }
.ae-shop-accept.is-invalid span { color: var(--sh-err); }
.ae-shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 22px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--sh-acc), #3730a3); color: #fff; font: inherit; font-weight: 800; font-size: 1.02rem; cursor: pointer; text-decoration: none; box-shadow: 0 10px 24px -12px rgba(79,70,229,.7); }
.ae-shop-btn:hover { filter: brightness(1.06); }
.ae-shop-btn[disabled] { opacity: .6; cursor: wait; }
.ae-shop-btn--sm { width: auto; padding: 8px 14px; font-size: .82rem; border-radius: 9px; box-shadow: none; }
.ae-shop-btn--ghost { background: #fff; color: var(--sh-ink); border: 1px solid var(--sh-line); }
.ae-shop-fine { font-size: .78rem; color: var(--sh-muted); margin: 12px 0 0; }
.ae-shop-notice { padding: 10px 14px; border-radius: 10px; background: var(--sh-bg); font-size: .88rem; margin-bottom: 12px; }
.ae-shop-notice.is-error { background: rgba(220,38,38,.08); color: var(--sh-err); }

.ae-shop-summary { position: sticky; top: 20px; }
.ae-shop-card--dark { background: radial-gradient(120% 100% at 100% 0%, #312e81 0%, var(--sh-night) 60%); color: #fff; border-color: transparent; }
.ae-shop-card--dark .ae-shop-kicker { color: #a5b4fc; }
.ae-shop-card--dark h3 { font-size: 1.05rem; margin: 0 0 8px; }
.ae-shop-price { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 6px 0 14px; }
.ae-shop-price small { font-size: .9rem; font-weight: 600; opacity: .8; margin-left: 6px; }
.ae-shop-tot { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ae-shop-tot td { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
.ae-shop-tot td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ae-shop-tot .is-total td { font-weight: 800; font-size: 1.05rem; border-top-width: 2px; }
.ae-shop-incl { margin: 14px 0 0; padding: 0; list-style: none; font-size: .84rem; opacity: .92; }
.ae-shop-incl li { padding: 3px 0 3px 20px; position: relative; }
.ae-shop-incl li::before { content: '✓'; position: absolute; left: 0; color: #67e8f9; font-weight: 800; }

.ae-shop-res { text-align: center; padding: 34px 28px; margin-bottom: 22px; }
.ae-shop-res-ico { font-size: 2.4rem; margin-bottom: 8px; }
.ae-shop-res h2 { font-size: 1.4rem; margin-bottom: 8px; justify-content: center; }
.ae-shop-res p { color: var(--sh-muted); max-width: 620px; margin: 0 auto 10px; }
.ae-shop-bank { margin: 18px auto 0; border-collapse: collapse; text-align: left; max-width: 620px; width: 100%; font-size: .95rem; }
.ae-shop-bank th { padding: 9px 10px; width: 130px; color: var(--sh-muted); font-weight: 600; border-top: 1px solid var(--sh-line); }
.ae-shop-bank td { padding: 9px 10px; border-top: 1px solid var(--sh-line); }
.ae-shop-bank code { font-size: 1rem; background: var(--sh-bg); padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.ae-shop-copy { font: inherit; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--sh-line); background: #fff; cursor: pointer; margin-left: 6px; color: var(--sh-acc); }

.ae-shop-admin { margin-top: 36px; }
.ae-shop-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ae-shop-admin-head h2 { margin: 0; }
.ae-shop-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; margin-right: 8px; }
.ae-shop-tag.is-warn { background: rgba(217,119,6,.12); color: #b45309; }
.ae-shop-tablewrap { overflow-x: auto; }
.ae-shop-orders { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ae-shop-orders th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sh-muted); padding: 8px 10px; border-bottom: 1px solid var(--sh-line); }
.ae-shop-orders td { padding: 10px; border-bottom: 1px solid var(--sh-line); vertical-align: top; }
.ae-shop-orders small { display: block; color: var(--sh-muted); font-size: .76rem; }
.ae-shop-orders tr.is-pagato td:first-child { border-left: 3px solid var(--sh-ok); }
.ae-shop-orders tr.is-in_attesa td:first-child { border-left: 3px solid #f59e0b; }
.ae-shop-orders tr.is-annullato td { opacity: .55; }
.ae-shop-orders select { font: inherit; font-size: .84rem; padding: 6px 8px; border: 1px solid #cdd3e2; border-radius: 8px; }
.ae-shop-td-act { white-space: nowrap; }

@media (max-width: 860px) {
	.ae-shop-grid { grid-template-columns: 1fr; }
	.ae-shop-summary { position: static; order: -1; }
	.ae-shop-row--addr { grid-template-columns: 1fr 1fr; }
	.ae-shop-head { grid-template-columns: 1fr; }
}

/* --- Quantità delle licenze --- */
.ae-shop-lead { margin: 0 0 14px; color: #5b6172; font-size: 14px; line-height: 1.5; }
.ae-shop-qta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ae-shop-step { width: 42px; height: 42px; border-radius: 12px; border: 1px solid #dfe3ee; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: #1e1b4b; transition: background .15s, border-color .15s; }
.ae-shop-step:hover { background: #f3f4fb; border-color: #c7ccdf; }
.ae-shop-qta input { width: 88px; height: 42px; text-align: center; font-size: 20px; font-weight: 700; border: 1px solid #dfe3ee; border-radius: 12px; color: #0b0f2a; -moz-appearance: textfield; }
.ae-shop-qta input::-webkit-outer-spin-button, .ae-shop-qta input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ae-shop-qta-note { font-size: 13px; color: #4f46e5; font-weight: 600; flex: 1 1 180px; }

/* --- Riepilogo --- */
.ae-shop-tot td small { display: block; font-weight: 400; opacity: .7; font-size: 12px; }
.ae-shop-tot tr.is-sub td { border-top: 1px solid rgba(255,255,255,.18); padding-top: 8px; }
.ae-shop-tot--light { width: 100%; margin: 14px 0 0; color: #1a1d29; }
.ae-shop-tot--light td { padding: 5px 0; font-size: 14px; }
.ae-shop-tot--light td:last-child { text-align: right; white-space: nowrap; }
.ae-shop-tot--light tr.is-sub td { border-top: 1px solid #e6e9f2; }
.ae-shop-tot--light tr.is-total td { border-top: 2px solid #0b0f2a; font-weight: 800; font-size: 16px; padding-top: 8px; }
.ae-shop-tag.is-ok { background: #dcfce7; color: #166534; }

/* --- Pulsantino «copia negli appunti» sui campi del modulo --- */
.ae-shop-field.ae-has-copy > span { display: inline-flex; align-items: center; gap: 6px; }
.ae-shop .ae-copy-field {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px;
	background: transparent; color: #8a90a3; cursor: pointer; opacity: 0;
	transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.ae-shop-field:hover .ae-copy-field,
.ae-shop-field:focus-within .ae-copy-field { opacity: 1; }
.ae-shop .ae-copy-field:hover { background: #eef1f7; color: #4f46e5; }
.ae-shop .ae-copy-field.is-done { opacity: 1; color: #16a34a; background: rgba(22,163,74,.12); }
@media (hover: none) { .ae-shop .ae-copy-field { opacity: .55; } }

/* Gli importi del riepilogo non vanno mai a capo fra il simbolo e la cifra. */
.ae-shop-tot td:last-child, .ae-shop-tot--light td:last-child { white-space: nowrap; }
.ae-shop-tot tr.is-total td { font-size: 17px; }

/* La riga scontata si riconosce a colpo d'occhio. */
.ae-shop-tot tr.is-sconto td small b { color: #a5f3fc; font-weight: 700; }
.ae-shop-tot td small { line-height: 1.4; }
