/* Standalone stylesheet for embeddable widgets (/embed/*).
   Deliberately NOT new.css — a widget loaded in someone else's page must stay
   small and must not depend on the site shell. Keep this file self-contained. */

:root {
    --um-bg: #0a1f24;
    --um-bg-elev: #144046;
    --um-accent: #7adfd0;
    --um-accent-ink: #0a1f24;
    --um-text: #ffffff;
    --um-muted: #a8c5c8;
    --um-border: rgba(122, 223, 208, 0.22);
    --um-good: #5cd99c;
    --um-warn: #ffd966;
    --um-bad: #ff8a96;
    /* Password-strength ramp, weakest to strongest. Kept as tokens so the
       light theme can darken them — the dark-theme mint fails contrast on
       white. */
    --um-s1: #ff8a96;
    --um-s2: #fd7e14;
    --um-s3: #ffd966;
    --um-s4: #5cd99c;
    --um-s5: #7adfd0;
    --um-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.um-theme-light {
    --um-bg: #ffffff;
    --um-bg-elev: #f2f7f8;
    --um-accent: #0f7d6c;
    --um-accent-ink: #ffffff;
    --um-text: #0a1f24;
    --um-muted: #547176;
    --um-border: rgba(10, 31, 36, 0.14);
    --um-good: #1c8a52;
    --um-warn: #8a6a00;
    --um-bad: #c02a3a;
    --um-s1: #c02a3a;
    --um-s2: #a34f00;
    --um-s3: #7a5c00;
    --um-s4: #1c8a52;
    --um-s5: #0f7d6c;
}

* { box-sizing: border-box; }

/* The widgets toggle visibility with el.hidden. Rows that carry an explicit
   display (.um-row is flex) would otherwise ignore the attribute and render
   empty. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: transparent;
}

body {
    font-family: var(--um-font);
    color: var(--um-text);
    font-size: 15px;
    line-height: 1.5;
}

.um-widget {
    background: var(--um-bg);
    border: 1px solid var(--um-border);
    border-radius: 12px;
    padding: 18px;
    max-width: 560px;
    margin: 0 auto;
}

.um-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.um-widget__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--um-text);
}

.um-widget__body { min-height: 64px; }

.um-status {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}
.um-status--good { background: rgba(40, 167, 69, 0.15); color: var(--um-good); }
.um-status--warn { background: rgba(255, 193, 7, 0.15); color: var(--um-warn); }
.um-status--bad  { background: rgba(220, 53, 69, 0.15); color: var(--um-bad); }

.um-center { text-align: center; }
.um-muted { color: var(--um-muted); }
.um-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.um-small { font-size: 0.85rem; }

.um-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--um-border);
}
.um-row:last-child { border-bottom: 0; }
.um-row__label { color: var(--um-muted); font-size: 0.9rem; }
.um-row__value { font-weight: 600; text-align: right; word-break: break-all; }

.um-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 10px; }
.um-table th { text-align: left; padding: 6px; color: var(--um-muted); font-weight: 600; border-bottom: 1px solid var(--um-border); }
.um-table td { padding: 6px; border-bottom: 1px solid var(--um-border); }
.um-table tr.um-leak { background: rgba(220, 53, 69, 0.08); }

.um-btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: var(--um-accent);
    color: var(--um-accent-ink);
    text-decoration: none;
}
.um-btn--ghost {
    background: transparent;
    color: var(--um-text);
    border: 1px solid var(--um-border);
}
.um-btn--block { display: block; width: 100%; text-align: center; }
.um-btn:focus-visible { outline: 2px solid var(--um-accent); outline-offset: 2px; }

.um-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.um-field {
    width: 100%;
    padding: 12px 76px 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--um-border);
    background: var(--um-bg-elev);
    color: var(--um-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 600;
}

.um-inputwrap { position: relative; }
.um-inputwrap .um-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 0 14px;
    font-size: 0.85rem;
}

.um-bar { height: 6px; background: var(--um-bg-elev); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.um-bar__fill { height: 100%; width: 0; border-radius: 3px; transition: width .3s, background .3s; }

.um-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; font-size: 0.9rem; }
.um-opts label { cursor: pointer; }

.um-range { width: 100%; accent-color: var(--um-accent); }

.um-credit {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--um-border);
    font-size: 0.8rem;
    color: var(--um-muted);
    text-align: center;
}
.um-credit a { color: var(--um-accent); text-decoration: none; font-weight: 600; }
.um-credit a:hover { text-decoration: underline; }

@media (max-width: 420px) {
    .um-widget { padding: 14px; border-radius: 10px; }
    .um-opts { grid-template-columns: 1fr; }
}
