/* Text & File Encryptor — a form: Mode | Input, the text pane or a summary
   uploader (after="summary"), the Passphrase card with its strength meter and
   the Encrypt tray, then the output card. The layout is
   styles/components/form.css; the text pane is styles/components/editor.css;
   only the passphrase field, the meter and the output block are the page's
   own. */

.fe-title-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5e5ce6, #0a84ff);
}

/* ── Passphrase row: the field takes the line, "Show" + toggle trail it ───── */
.fe-pass-input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Qualified with the element: the shared form rule input[type="password"] /
   [type="text"] (common.css) is (0,1,1) and would otherwise win over a bare
   class, silently dropping the mono face and the inset background below. */
input.fe-pass-input {
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--duration-snap) var(--ease-standard);
}
input.fe-pass-input:focus { border-color: var(--accent); }
input.fe-pass-input::placeholder { color: var(--text-placeholder); }

.fe-show {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}
.fe-show__label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Strength meter ─────────────────────────────────────────────────────────── */
.fe-strength__bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-fill);
  overflow: hidden;
}

/* At rest (no passphrase typed) the meter is just a neutral hint — no track. */
.fe-strength.is-empty .fe-strength__bar { display: none; }

.fe-strength__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--text-muted);
  transition:
    width var(--duration-snap) var(--ease-standard),
    background var(--duration-snap) var(--ease-standard);
}
.fe-strength__fill[data-level="weak"] { background: var(--danger); }
.fe-strength__fill[data-level="ok"] { background: var(--warning); }
.fe-strength__fill[data-level="good"] { background: var(--accent); }
.fe-strength__fill[data-level="strong"] { background: var(--success); }

.fe-strength__label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Text in: the textarea is the card's whole row ─────────────────────────── */
textarea.fe-textarea {
  min-height: 150px;
}

/* ── Output ─────────────────────────────────────────────────────────────────── */
.fe-meta {
  align-self: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.fe-output {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  word-break: break-all;
  white-space: pre-wrap;
  min-height: 90px;
  max-height: 320px;
  overflow: auto;
  font-weight: 500;
  user-select: all;
}

.fe-busy {
  font-size: 13px;
  color: var(--text-muted);
}

.fe-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
