/* ==========================================================
   AI Output Validator — all selectors scoped to .aov-
   ========================================================== */

.aov-shell { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Recipe banner ───────────────────────────────────────── */
.aov-recipe-banner {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 1rem;
    background: rgba(99, 91, 255, 0.08); border: 1px solid rgba(99, 91, 255, 0.22);
    border-radius: var(--np-radius-sm, 6px); font-size: 0.84rem; color: var(--np-text-secondary); line-height: 1.4;
}
.aov-recipe-icon { color: var(--np-accent-light, #818cf8); font-size: 0.8rem; flex-shrink: 0; }
.aov-recipe-text { flex: 1; }
.aov-recipe-text strong { color: var(--np-text-primary); font-weight: 600; }
.aov-recipe-dismiss {
    display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0;
    background: none; border: none; color: var(--np-text-muted); font-size: 1.1rem; cursor: pointer; padding: 0; line-height: 1;
}
.aov-recipe-dismiss:hover { color: var(--np-text-primary); }

/* ── Hero ────────────────────────────────────────────────── */
.aov-hero {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.75rem;
    background: radial-gradient(ellipse at top left, rgba(99,102,241,0.09) 0%, transparent 60%), var(--np-bg-card);
    border: 1px solid var(--np-border); border-radius: var(--np-radius-lg, 14px);
}
.aov-hero-text { display: flex; flex-direction: column; gap: 0.6rem; max-width: 680px; }
.aov-eyebrow { color: var(--np-accent-light, #818cf8); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.aov-title { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.02em; color: var(--np-text-primary); margin: 0; }
.aov-subtitle { color: var(--np-text-secondary); font-size: 0.9375rem; line-height: 1.65; margin: 0; }
.aov-hero-actions { flex-shrink: 0; padding-top: 0.2rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.aov-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    min-height: 44px; padding: 0 1.1rem; border-radius: 9px;
    font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.1s;
    text-decoration: none; white-space: nowrap; border: 1px solid transparent; outline: none;
}
.aov-btn:focus-visible { outline: 2px solid var(--np-accent, #6366f1); outline-offset: 2px; }
.aov-btn--primary {
    width: 100%; min-height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--np-accent, #6366f1), #4338ca);
    color: #fff; font-size: 0.9375rem; font-weight: 700;
    box-shadow: 0 8px 24px rgba(99,102,241,0.28);
}
.aov-btn--primary:hover  { background: linear-gradient(135deg, var(--np-accent-light, #818cf8), var(--np-accent, #6366f1)); }
.aov-btn--primary:active { transform: scale(0.99); }
.aov-btn--ghost { background: transparent; color: var(--np-text-secondary); border-color: rgba(255,255,255,0.1); }
.aov-btn--ghost:hover { background: rgba(255,255,255,0.05); color: var(--np-text-primary); border-color: rgba(255,255,255,0.18); }
.aov-btn--ghost:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }
.aov-btn--clear { margin-left: auto; }

/* ── Preset bar ──────────────────────────────────────────── */
.aov-preset-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
    padding: 0.85rem 1.1rem; background: var(--np-bg-card); border: 1px solid var(--np-border); border-radius: var(--np-radius-lg, 14px);
}
.aov-preset-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--np-text-muted); flex-shrink: 0; margin-right: 0.25rem; }
.aov-preset-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.aov-preset-pill {
    height: 30px; padding: 0 0.75rem; font: inherit; font-size: 0.78rem; font-weight: 500; color: var(--np-text-secondary);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 100px; cursor: pointer;
    transition: background 0.13s, border-color 0.13s, color 0.13s; white-space: nowrap; outline: none;
}
.aov-preset-pill:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: var(--np-text-primary); }
.aov-preset-pill:focus-visible { outline: 2px solid var(--np-accent, #6366f1); outline-offset: 2px; }
.aov-preset-pill.is-active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.4); color: var(--np-accent-light, #818cf8); font-weight: 600; }

/* ── Workspace / input card ──────────────────────────────── */
.aov-workspace { display: flex; flex-direction: column; gap: 1.25rem; }
.aov-input-card {
    display: flex; flex-direction: column; gap: 1.25rem; padding: 1.75rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 50%), var(--np-bg-card);
    border: 1px solid rgba(255,255,255,0.11); border-radius: var(--np-radius-lg, 14px);
}

.aov-field-group { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.aov-label { font-size: 0.8125rem; font-weight: 600; color: #a8b9cc; }
.aov-optional { font-weight: 400; color: var(--np-text-muted); }
.aov-required-mark { color: var(--np-error, #f87171); margin-left: 0.2rem; }
.aov-field-hint { font-size: 0.78rem; color: var(--np-text-muted); line-height: 1.5; margin: 0; }

.aov-textarea {
    width: 100%; background: var(--np-bg-input); border: 1px solid rgba(255,255,255,0.13); border-radius: 10px;
    color: var(--np-text-primary); font: inherit; font-size: 0.875rem; padding: 0.75rem 0.9rem; resize: vertical; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s; box-shadow: inset 0 1px 4px rgba(0,0,0,0.32);
    line-height: 1.65; min-height: 80px; max-height: 420px;
}
.aov-textarea--small { min-height: 56px; }
.aov-mono { font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace; font-size: 0.82rem; }
.aov-textarea::placeholder { color: var(--np-text-muted); font-size: 0.84rem; }
.aov-textarea:hover:not(:focus) { border-color: rgba(255,255,255,0.22); }
.aov-textarea:focus { border-color: var(--np-border-focus, rgba(99,102,241,0.5)); box-shadow: 0 0 0 3px rgba(99,102,241,0.14), inset 0 1px 4px rgba(0,0,0,0.28); }

.aov-error-box { padding: 0.65rem 0.85rem; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.22); border-radius: 8px; font-size: 0.8125rem; color: #fca5a5; line-height: 1.5; }
.aov-error-box p { margin: 0; }
.aov-error-box[hidden] { display: none; }

.aov-options-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }

/* ── Custom selects ──────────────────────────────────────── */
.aov-native-select { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0,0,0,0); opacity: 0; pointer-events: none; }
.aov-custom-select { position: relative; width: 100%; }
.aov-select-trigger {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 42px;
    border: 1px solid rgba(255,255,255,0.13); border-radius: 10px; background: var(--np-bg-input); color: var(--np-text-primary);
    cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1; padding: 0.5rem 0.75rem; text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s; outline: none; box-shadow: inset 0 1px 4px rgba(0,0,0,0.28);
}
.aov-select-trigger:hover, .aov-select-trigger:focus-visible, .aov-custom-select.is-open .aov-select-trigger {
    border-color: var(--np-border-focus, rgba(99,102,241,0.5)); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); outline: none;
}
.aov-select-chevron { color: var(--np-text-muted); font-size: 0.75rem; line-height: 1; flex-shrink: 0; transition: transform 0.15s; }
.aov-custom-select.is-open .aov-select-chevron { transform: rotate(180deg); }
.aov-select-menu {
    position: absolute; z-index: 40; top: calc(100% + 0.4rem); left: 0; right: 0; display: none; overflow: hidden;
    border: 1px solid rgba(129,140,248,0.26); border-radius: 10px;
    background: linear-gradient(180deg, rgba(23,25,36,0.99), rgba(11,12,18,0.99)); box-shadow: 0 16px 40px rgba(0,0,0,0.36); padding: 0.3rem;
}
.aov-custom-select.is-open .aov-select-menu { display: grid; }
.aov-select-menu button {
    display: flex; align-items: center; justify-content: space-between; min-height: 36px; width: 100%; border: 0; border-radius: 8px;
    background: transparent; color: var(--np-text-secondary); cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 500;
    padding: 0.5rem 0.75rem; text-align: left;
}
.aov-select-menu button::after { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 999px; background: transparent; flex-shrink: 0; }
.aov-select-menu button:hover, .aov-select-menu button:focus-visible { background: rgba(99,102,241,0.14); color: var(--np-text-primary); outline: none; }
.aov-select-menu button[aria-selected="true"] { background: rgba(99,102,241,0.22); color: var(--np-accent-light, #818cf8); }
.aov-select-menu button[aria-selected="true"]::after { background: var(--np-accent-light, #818cf8); }

/* ── Validate row (full-width CTA) ───────────────────────── */
.aov-generate-row { padding-top: 0.75rem; border-top: 1px solid var(--np-border); }

/* ── Output / verdict ────────────────────────────────────── */
.aov-output-section { display: flex; flex-direction: column; gap: 1.25rem; }
.aov-output-section[hidden] { display: none !important; }

.aov-output-card { background: var(--np-bg-card); border: 1px solid var(--np-border); border-radius: var(--np-radius-lg, 14px); overflow: hidden; }
.aov-output-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--np-border); }
.aov-output-title { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--np-text-secondary); }
.aov-score-wrap { display: flex; align-items: center; gap: 0.6rem; }
.aov-score-num { font-size: 1.15rem; font-weight: 800; color: var(--np-text-primary); font-variant-numeric: tabular-nums; }
.aov-verdict {
    display: inline-flex; align-items: center; height: 26px; padding: 0 0.7rem; border-radius: 100px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
}
.aov-verdict--pass    { background: rgba(74,222,128,0.14); color: #4ade80; border: 1px solid rgba(74,222,128,0.35); }
.aov-verdict--warning { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.35); }
.aov-verdict--fail    { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.35); }

.aov-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1.1rem 1.5rem 0.4rem; }
.aov-stat {
    flex: 1 1 100px; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 0.7rem 0.9rem;
}
.aov-stat-num { font-size: 1rem; font-weight: 800; color: var(--np-accent-light, #818cf8); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aov-stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--np-text-muted); }

/* ── Issues list ─────────────────────────────────────────── */
.aov-issues { list-style: none; margin: 0; padding: 0.6rem 1.5rem 0.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.aov-issue {
    display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0.8rem;
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    font-size: 0.82rem; line-height: 1.55; color: var(--np-text-secondary);
}
.aov-issue-sev {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 20px; border-radius: 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; margin-top: 0.1rem;
}
.aov-issue--fail .aov-issue-sev { background: rgba(248,113,113,0.14); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.aov-issue--warn .aov-issue-sev { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.aov-issue--pass .aov-issue-sev { background: rgba(74,222,128,0.14); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.aov-issue-msg { flex: 1; min-width: 0; color: var(--np-text-primary); }
.aov-issue-fix { color: var(--np-text-muted); }

/* ── Repair block ────────────────────────────────────────── */
.aov-repair-block { margin: 0.6rem 1.5rem 0.4rem; border: 1px dashed rgba(99,102,241,0.35); border-radius: 10px; overflow: hidden; }
.aov-repair-block[hidden] { display: none; }
.aov-repair-head { padding: 0.6rem 1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--np-accent-light, #818cf8); background: rgba(99,102,241,0.07); border-bottom: 1px dashed rgba(99,102,241,0.3); }
.aov-repair-head .aov-optional { text-transform: none; letter-spacing: 0; font-weight: 400; }

.aov-pre {
    margin: 0; padding: 1rem 1.1rem; font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;
    font-size: 0.82rem; line-height: 1.7; color: var(--np-text-primary); white-space: pre-wrap; word-break: break-word;
    max-height: 420px; overflow: auto; background: var(--np-bg-input);
}

.aov-output-actions { border-top: 1px solid var(--np-border); padding: 0.85rem 1.25rem; margin-top: 0.8rem; }
.aov-action-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Status */
.aov-status { min-height: 1.25rem; font-size: 0.8125rem; color: var(--np-text-secondary); text-align: right; padding: 0 0.25rem; transition: opacity 0.2s; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 820px) {
    .aov-options-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .aov-hero { flex-direction: column; gap: 1rem; }
    .aov-hero-actions { padding-top: 0; }
    .aov-input-card, .aov-output-card { border-radius: 10px; }
    .aov-stats { padding-left: 1rem; padding-right: 1rem; }
    .aov-issues { padding-left: 1rem; padding-right: 1rem; }
    .aov-repair-block { margin-left: 1rem; margin-right: 1rem; }
    .aov-stat { flex-basis: 90px; }
}
