/* Password Generator — site-specific styles (loaded after base.css) */

:root {
  --brand: #7c3aed;
  --brand-dark: #5b21b6;
  --brand-soft: #ede9fe;
  --accent: #22d3ee;
}

/* ---------------- mode tabs ---------------- */

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line, #e2e8f0);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover {
  background: var(--brand-soft);
}

.tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------------- output ---------------- */

.output-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: var(--radius, 0.75rem);
  padding: 1rem;
  margin-bottom: 1rem;
}

.output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.05rem, 1rem + 1.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  word-break: break-all;
  min-height: 1.6em;
}

.output-actions .btn {
  flex: 1;
}

/* ---------------- strength meter ---------------- */

.meter-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.meter {
  display: flex;
  flex: 1;
  gap: 0.3rem;
}

.meter-seg {
  height: 0.5rem;
  flex: 1;
  border-radius: 999px;
  background: var(--line, #e2e8f0);
  transition: background 0.2s ease;
}

.meter-seg.on[data-level="1"] { background: #ef4444; }
.meter-seg.on[data-level="2"] { background: #f97316; }
.meter-seg.on[data-level="3"] { background: #22c55e; }
.meter-seg.on[data-level="4"] { background: #16a34a; }

.meter-label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 5.5rem;
  text-align: right;
}

/* ---------------- mode panels ---------------- */

.mode-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mode-panel[hidden] {
  display: none;
}

.value-label {
  font-weight: 700;
  color: var(--brand-dark);
}

.checks {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand);
}

.form-error {
  color: #b91c1c;
  font-size: 0.9rem;
  margin: 0;
}

/* ---------------- strength list ---------------- */

.strength-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .output-panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .output {
    flex: 1;
  }

  .output-actions {
    flex-direction: column;
    min-width: 10rem;
  }
}
