/* Yago Brain · stile Windows 11 / Fluent dentro l'admin di WordPress */
.yago, .yago-mb {
	--y-accent: #005fb8;
	--y-accent-2: #0078d4;
	--y-bg: #f3f3f3;
	--y-card: #ffffffcc;
	--y-line: #e5e5e5;
	--y-text: #1b1b1b;
	--y-muted: #5f5f5f;
	--y-ok: #0f7b0f;
	--y-warn: #b35c00;
	--y-bad: #c42b1c;
	--y-info: #005fb8;
	--y-r: 8px;
	font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
	color: var(--y-text);
}
.yago { max-width: 1180px; margin: 20px 20px 0 2px; }
#wpcontent:has(.yago) { background: linear-gradient(135deg, #eef3fa 0%, #f3f3f3 45%, #f6f1f8 100%); }

.yago-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.yago-head h1 { font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: 28px; font-weight: 600; margin: 0; padding: 0; line-height: 1.2; }
.yago-sub { margin: 2px 0 0; color: var(--y-muted); font-size: 14px; }
.yago-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 700 22px "Segoe UI Variable Display", sans-serif; color: #fff;
	background: linear-gradient(135deg, #0078d4, #8a3ffc); box-shadow: 0 4px 14px #0078d455; }

.yago-card { background: var(--y-card); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4);
	border: 1px solid #ffffffb3; outline: 1px solid var(--y-line); border-radius: var(--y-r); padding: 22px 24px; margin-bottom: 16px;
	box-shadow: 0 2px 6px #0000000a, 0 8px 24px #0000000a; }
.yago-card h2 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.yago-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.yago-grid > .yago-card { margin-bottom: 0; }
.yago-grid + .yago-card { margin-top: 16px; }
@media (max-width: 960px) { .yago-grid { grid-template-columns: 1fr; } }

.yago-muted { color: var(--y-muted); }
.yago-empty { padding: 28px; text-align: center; color: var(--y-muted); background: #fafafa; border-radius: var(--y-r); border: 1px dashed #d6d6d6; }
.yago-banner { background: #e8f1fb; border: 1px solid #b9d5f3; border-radius: var(--y-r); padding: 12px 16px; margin-bottom: 16px; }
.yago-banner.ok { background: #dff6dd; border-color: #a6d8a2; }
.yago-tip { background: #fff8e6; border: 1px solid #f3dca2; border-radius: var(--y-r); padding: 12px 16px; margin: 14px 0; }
.yago-credit { text-align: center; color: var(--y-muted); font-size: 12px; margin: 24px 0; }
.yago-credit a { color: var(--y-accent); text-decoration: none; font-weight: 600; }

/* Pulsanti */
.yago-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.yago-actions.sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, #f3f3f3 40%); }
.yago-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 16px; border-radius: 4px; border: 1px solid #d1d1d1; border-bottom-color: #bdbdbd;
	background: #fbfbfb; color: var(--y-text); font: 400 14px "Segoe UI Variable Text", "Segoe UI", sans-serif; cursor: pointer; text-decoration: none; transition: background .12s, transform .08s; }
.yago-btn:hover { background: #f5f5f5; color: var(--y-text); }
.yago-btn:active { transform: translateY(1px); background: #f0f0f0; }
.yago-btn:focus-visible { outline: 2px solid var(--y-text); outline-offset: 2px; }
.yago-btn.primary { background: var(--y-accent); border-color: #00539f; border-bottom-color: #003e7a; color: #fff; }
.yago-btn.primary:hover { background: #1a6fc0; color: #fff; }
.yago-btn.ghost { background: transparent; border-color: transparent; color: var(--y-accent); }
.yago-btn.small { min-height: 28px; padding: 3px 12px; font-size: 13px; }
.yago-btn:disabled { opacity: .55; cursor: default; }
.yago-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: yago-spin .7s linear infinite; }
@keyframes yago-spin { to { transform: rotate(360deg); } }

/* Punteggio */
.yago-score-card { display: flex; align-items: center; gap: 24px; }
.yago-ring { position: relative; width: 132px; height: 132px; flex: none; }
.yago-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.yago-ring circle { fill: none; stroke-width: 10; }
.yago-ring .bg { stroke: #e9e9e9; }
.yago-ring .fg { stroke: var(--y-accent); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1), stroke .4s; }
.yago-ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.yago-ring-num span { font: 600 38px/1 "Segoe UI Variable Display", sans-serif; }
.yago-ring-num small { color: var(--y-muted); }
.yago-mini-score { margin: 12px 0; font-size: 15px; }

.yago-list-ok { list-style: none; margin: 0; padding: 0; }
.yago-list-ok li { padding: 5px 0 5px 28px; position: relative; }
.yago-list-ok li::before { content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--y-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.yago-list-ok li.off { color: var(--y-muted); }
.yago-list-ok li.off::before { background: #c8c8c8; }

/* Schede dei controlli */
.yago-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--y-line); padding-bottom: 8px; }
.yago-tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 4px; cursor: pointer; font: 14px "Segoe UI", sans-serif; color: var(--y-muted); position: relative; }
.yago-tabs button:hover { background: #0000000a; }
.yago-tabs button.on { color: var(--y-text); font-weight: 600; }
.yago-tabs button.on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -9px; height: 3px; border-radius: 2px; background: var(--y-accent); }
.yago-tabs span { background: #0000000f; border-radius: 10px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

.yago-check-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: start; padding: 14px; border-radius: var(--y-r); border: 1px solid var(--y-line); background: #fff; margin-bottom: 8px; }
.yago-check-row h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.yago-check-row h3 small { font-weight: 400; color: var(--y-muted); font-size: 12px; margin-left: 6px; }
.yago-check-row p { margin: 0; color: #3b3b3b; }
.yago-sev { font-size: 12px; font-weight: 600; text-align: center; border-radius: 4px; padding: 3px 0; }
.sev-critical { border-left: 4px solid var(--y-bad); } .sev-critical .yago-sev { background: #fde7e9; color: var(--y-bad); }
.sev-warning { border-left: 4px solid var(--y-warn); } .sev-warning .yago-sev { background: #fff4ce; color: var(--y-warn); }
.sev-info { border-left: 4px solid var(--y-info); } .sev-info .yago-sev { background: #e8f1fb; color: var(--y-info); }
.sev-ok { border-left: 4px solid var(--y-ok); } .sev-ok .yago-sev { background: #dff6dd; color: var(--y-ok); }
.yago-items { margin: 8px 0 0 18px; list-style: disc; columns: 2; font-size: 13px; }
.yago-guide { margin-top: 8px; }
.yago-guide summary { cursor: pointer; color: var(--y-accent); font-weight: 600; }
.yago-guide div { margin-top: 6px; padding: 10px 12px; background: #f7f7f7; border-radius: 6px; line-height: 1.6; }
@media (max-width: 700px) { .yago-check-row { grid-template-columns: 1fr; } .yago-items { columns: 1; } }

/* Guida */
.yago-stepper { display: flex; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; flex-wrap: wrap; }
.yago-stepper li { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--y-r); background: #ffffff99; border: 1px solid var(--y-line); cursor: pointer; font-size: 13px; color: var(--y-muted); margin: 0; }
.yago-stepper li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e6e6e6; font-weight: 600; flex: none; }
.yago-stepper li.on { background: #fff; color: var(--y-text); font-weight: 600; box-shadow: 0 2px 8px #0000000f; }
.yago-stepper li.on span { background: var(--y-accent); color: #fff; }
.yago-stepper li.done span { background: var(--y-ok); color: #fff; }
.yago-step[hidden] { display: none; }
.yago-howto { margin: 12px 0 12px 20px; line-height: 1.7; }
.yago-howto li { margin-bottom: 8px; }
.yago-howto code, .yago-copy code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; }
.yago-copy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; background: #f7f9fc; border: 1px solid #dbe6f3; border-radius: var(--y-r); margin: 12px 0; }
.yago-copy code { font-size: 14px; background: transparent; }
.yago-inline { display: flex; gap: 8px; margin-top: 6px; }
.yago-inline input { flex: 1; }
.yago-details { margin-top: 16px; border: 1px solid var(--y-line); border-radius: var(--y-r); padding: 10px 14px; background: #fff; }
.yago-details summary { cursor: pointer; font-weight: 600; }

/* Moduli */
.yago-form label, .yago-mb label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 0; }
.yago-form input[type=text], .yago-form input[type=url], .yago-form input[type=email], .yago-form input[type=tel], .yago-form input[type=number], .yago-form select, .yago-form textarea,
.yago-inline input, .yago-mb input[type=text], .yago-mb textarea, .yago-ed input[type=text], .yago-ed textarea, .yago-toolbar input[type=search] {
	display: block; width: 100%; margin-top: 4px; padding: 6px 10px; border: 1px solid #d1d1d1; border-bottom: 1px solid #8a8a8a; border-radius: 4px; background: #fff; font: 400 14px "Segoe UI", sans-serif; box-shadow: none; }
.yago-form input:focus, .yago-form textarea:focus, .yago-form select:focus, .yago-mb input:focus, .yago-mb textarea:focus, .yago-ed input:focus, .yago-ed textarea:focus, .yago-inline input:focus {
	border-bottom: 2px solid var(--y-accent); outline: none; box-shadow: none; }
.yago-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yago-row.three { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 700px) { .yago-row, .yago-row.three { grid-template-columns: 1fr; } }
.yago-check { font-weight: 400 !important; display: flex !important; align-items: center; gap: 8px; }
.yago-check.big { font-size: 15px; margin-top: 16px !important; padding: 12px; background: #dff6dd; border-radius: var(--y-r); }

.yago-switch { display: flex !important; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-weight: 400 !important; cursor: pointer; }
.yago-switch input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yago-switch small { display: block; color: var(--y-muted); margin-top: 2px; }
.yago-toggle { flex: none; width: 40px; height: 20px; border-radius: 10px; border: 1px solid #8a8a8a; position: relative; margin-top: 1px; transition: background .15s; }
.yago-toggle::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #5f5f5f; top: 3px; left: 4px; transition: left .15s; }
.yago-switch input:checked + .yago-toggle { background: var(--y-accent); border-color: var(--y-accent); }
.yago-switch input:checked + .yago-toggle::after { left: 23px; background: #fff; }
.yago-switch input:focus-visible + .yago-toggle { outline: 2px solid var(--y-text); outline-offset: 2px; }

.yago-count, .yago-len { font-weight: 400; color: var(--y-muted); font-size: 12px; float: right; }
.yago-count.good, .yago-len.good { color: var(--y-ok); }
.yago-count.warn, .yago-count.bad, .yago-len.bad { color: var(--y-warn); }

/* Pulizia */
.yago-clean-row { display: grid !important; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.yago-clean-row small { display: block; color: var(--y-muted); }
.yago-clean-row em { font-style: normal; font-weight: 600; text-align: right; max-width: 220px; font-size: 13px; }
.yago-clean-row.zero { opacity: .55; }
.yago-progress { position: relative; height: 22px; background: #e9e9e9; border-radius: 11px; overflow: hidden; margin: 12px 0; }
.yago-progress div { height: 100%; width: 0; background: linear-gradient(90deg, #0078d4, #8a3ffc); transition: width .4s; }
.yago-progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; }

/* Editor in blocco */
.yago-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.yago-toolbar input[type=search] { width: 220px; margin: 0; }
.yago-seg { display: inline-flex; background: #ececec; border-radius: 6px; padding: 2px; }
.yago-seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 4px; cursor: pointer; font: 14px "Segoe UI", sans-serif; }
.yago-seg button.on { background: #fff; box-shadow: 0 1px 3px #0000001f; font-weight: 600; }
.yago-ed-row { display: grid; grid-template-columns: 1.1fr 1.4fr 2fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.yago-ed-row label { margin: 0; font-size: 12px; font-weight: 600; }
.yago-ed-name { font-weight: 600; padding-top: 20px; }
.yago-ed-name a { text-decoration: none; }
.yago-ed-edit { font-weight: 400; font-size: 12px; color: var(--y-muted); }
.yago-ed-row .yago-check { padding-top: 24px; }
@media (max-width: 1000px) { .yago-ed-row { grid-template-columns: 1fr; } .yago-ed-name, .yago-ed-row .yago-check { padding-top: 0; } }
.yago-pager { display: flex; gap: 4px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.yago-pager button { min-width: 32px; height: 32px; border: 1px solid #d1d1d1; background: #fff; border-radius: 4px; cursor: pointer; }
.yago-pager button.on { background: var(--y-accent); color: #fff; border-color: var(--y-accent); }
.yago-pager .yago-muted { margin-left: 8px; }

/* Riquadro nella modifica di pagina/prodotto */
.yago-mb-help { color: var(--y-muted); margin-top: 0; }
.yago-serp { padding: 14px 16px; border: 1px solid #e3e3e3; border-radius: var(--y-r); background: #fff; margin-bottom: 8px; font-family: Arial, sans-serif; max-width: 640px; }
.yago-serp-url { color: #202124; font-size: 13px; }
.yago-serp-title { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yago-serp-desc { color: #4d5156; font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Notifiche */
.yago-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100000; max-width: 420px; padding: 14px 18px; border-radius: var(--y-r); background: #ffffffee; backdrop-filter: blur(20px);
	border: 1px solid var(--y-line); border-left: 4px solid var(--y-ok); box-shadow: 0 8px 32px #00000029; font: 14px "Segoe UI", sans-serif; transform: translateY(20px); opacity: 0; transition: .25s; }
.yago-toast.bad { border-left-color: var(--y-bad); }
.yago-toast.show { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) { .yago *, .yago-toast { transition: none !important; animation: none !important; } }
