/* Aptora Equipment Decoder widget styles (scoped under .aed-widget). */
.aed-widget { --aed-accent: #0f3d6e; max-width: 520px; margin: 0 auto; }
.aed-widget * { box-sizing: border-box; }

.aed-card {
    border: 1px solid var(--aed-border, #e2e8f0);
    border-radius: var(--aed-radius, 14px);
    padding: 22px 22px 14px;
    background: var(--aed-surface, #fff);
    box-shadow: 0 6px 24px rgba(15, 23, 42, .08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--aed-text, #1e293b);
}

.aed-title { margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; color: var(--aed-heading, var(--aed-accent)); line-height: 1.2; }
.aed-sub { margin: 0 0 14px; color: var(--aed-muted, #64748b); font-size: .92rem; }

.aed-form { display: flex; flex-direction: column; gap: 10px; }
.aed-label { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; color: #475569; gap: 4px; }
.aed-input {
    width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px;
    font-size: .95rem; font-family: inherit; color: #1e293b; background: #fff;
}
.aed-input:focus { outline: none; border-color: var(--aed-accent); box-shadow: 0 0 0 3px rgba(15, 61, 110, .12); }

.aed-btn {
    width: 100%; padding: 12px 16px; border: 0; border-radius: 9px; cursor: pointer;
    background: var(--aed-accent); color: var(--aed-button-text, #fff); font-size: 1rem; font-weight: 700;
    font-family: inherit; transition: filter .15s ease;
}
.aed-btn:hover { filter: brightness(1.08); }
.aed-btn:disabled { opacity: .6; cursor: default; }

.aed-hint { font-size: .76rem; color: #94a3b8; margin-top: 2px; }

.aed-result { margin-top: 16px; }
.aed-msg { padding: 10px 0; color: #475569; font-size: .92rem; }
.aed-err { color: #b91c1c; }

.aed-banner { border-radius: 10px; padding: 11px 14px; font-size: .9rem; margin-bottom: 12px; line-height: 1.4; }
.aed-banner-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.aed-banner-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* Wow 1: System Health meter */
.aed-health {
    display: flex; gap: 14px; align-items: center; margin: 2px 0 14px; padding: 14px 16px;
    border: 1px solid var(--aed-border, #e2e8f0); border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.aed-gauge { flex: 0 0 148px; width: 148px; }
.aed-gauge svg { width: 100%; height: auto; display: block; }
.aed-gauge-track { fill: none; stroke: #e9eef5; stroke-width: 13; stroke-linecap: round; }
.aed-gauge-val { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.22,1,.36,1); }
.aed-gauge-num { fill: var(--aed-text, #1e293b); font: 800 30px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; text-anchor: middle; }
.aed-gauge-cap { fill: var(--aed-muted, #64748b); font: 700 9px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; text-anchor: middle; letter-spacing: .12em; }
.aed-health-body { flex: 1 1 auto; min-width: 0; }
.aed-health-verdict { font-size: 1.05rem; font-weight: 800; line-height: 1.15; }
.aed-hv-ok { color: #15803d; }
.aed-hv-watch { color: #b45309; }
.aed-hv-soon { color: #c2410c; }
.aed-hv-replace { color: #b91c1c; }
.aed-health-sub { font-size: .86rem; color: var(--aed-text, #1e293b); margin-top: 4px; line-height: 1.4; }
.aed-health-warranty { font-size: .78rem; color: var(--aed-muted, #64748b); margin-top: 7px; }
@media (max-width: 420px) {
    .aed-health { flex-direction: column; text-align: center; }
    .aed-gauge { flex-basis: auto; width: 170px; }
}

/* Wow 2: Upgrade Savings estimator */
.aed-savings { margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; background: #f0f9ff; border: 1px solid #bae6fd; }
.aed-savings-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #0369a1; margin-bottom: 8px; }
.aed-savings-row { display: flex; gap: 18px; flex-wrap: wrap; }
.aed-savings-fig { flex: 1 1 130px; }
.aed-savings-amt { font-size: 1.5rem; font-weight: 800; color: #0369a1; line-height: 1.05; }
.aed-savings-lbl { font-size: .76rem; color: #0c4a6e; margin-top: 3px; }
.aed-savings-rebate { margin-top: 11px; font-size: .82rem; color: #075985; background: #e0f2fe; border-radius: 8px; padding: 8px 11px; line-height: 1.4; }
.aed-savings-note { margin-top: 9px; font-size: .7rem; color: #64748b; line-height: 1.35; }

.aed-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.aed-table th, .aed-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.aed-table th { color: var(--aed-muted, #64748b); font-weight: 600; width: 45%; }
.aed-table td { color: var(--aed-text, #1e293b); font-weight: 600; }

.aed-lead { margin-top: 18px; border-top: 2px solid var(--aed-border, #f1f5f9); padding-top: 16px; }
.aed-lead-head { font-size: 1.05rem; font-weight: 800; color: var(--aed-heading, var(--aed-accent)); }
.aed-lead-co { font-size: .85rem; color: var(--aed-muted, #64748b); margin: 2px 0 12px; }
.aed-lead-form { display: flex; flex-direction: column; gap: 9px; position: relative; }
.aed-ts { margin: 2px 0; }
.aed-l-status { font-size: .82rem; min-height: 1em; }

/* Lead-form fields (v0.3.0) */
.aed-field { display: flex; flex-direction: column; gap: 5px; }
.aed-flabel { font-size: .8rem; font-weight: 600; color: #475569; }
select.aed-input {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer;
}
.aed-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.aed-seg-btn {
    flex: 1 1 auto; min-width: 90px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 9px;
    background: #fff; color: #334155; font-size: .9rem; font-weight: 600; font-family: inherit; cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.aed-seg-btn:hover { border-color: var(--aed-accent); }
.aed-seg-btn.active {
    background: var(--aed-accent); border-color: var(--aed-accent); color: var(--aed-button-text, #fff);
}

.aed-thanks {
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
    border-radius: 10px; padding: 16px; font-size: .95rem; text-align: center; font-weight: 600;
}

.aed-attrib { margin-top: 14px; text-align: center; font-size: .76rem; color: #94a3b8; }
.aed-attrib a { color: #64748b; font-weight: 700; text-decoration: none; }
.aed-attrib a:hover { text-decoration: underline; }
