/* ======================================================================
   Section Starts Here: ArdentFocus Password Generator Styles (scoped)
   ====================================================================== */

/*
Update Summary (UI fixes requested):
- Make Copy + Refresh buttons the same height as the password field.
- Reduce oversized typography and make labels/titles uniform.
- Keep styles fully scoped under .afpg to avoid theme conflicts.
*/

.afpg {
  --afpg-purple: #663366;
  --afpg-magenta: #cc3366;
  --afpg-bg: #ffffff;
  --afpg-text: #1f2328;
  --afpg-muted: #5b6775;
  --afpg-border: #e6e8eb;
  --afpg-shadow: 0 10px 22px rgba(0,0,0,0.08);
  --afpg-radius: 10px;
  --afpg-focus: rgba(204, 51, 102, 0.25);
  --afpg-ok: #2d6a4f;
  --afpg-warn: #b45309;
  --afpg-bad: #b91c1c;

  /* Update: Normalize base typography so headings/labels are uniform. */
  --afpg-font-base: 14px;
  --afpg-font-small: 13px;
  --afpg-font-title: 16px;

  /* Update: Single source of truth for input/button height. */
  --afpg-field-height: 48px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--afpg-text);
  font-size: var(--afpg-font-base);
  line-height: 1.45;
}

.afpg__card {
  background: var(--afpg-bg);
  border: 1px solid var(--afpg-border);
  border-radius: var(--afpg-radius);
  box-shadow: var(--afpg-shadow);
  overflow: hidden;
  max-width: 780px;
}

.afpg__header {
  background: var(--afpg-purple);
  padding: 18px 18px 16px;
}

.afpg__title {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}

.afpg__subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,0.88);
  font-size: var(--afpg-font-small);
  line-height: 1.4;
}

.afpg__body {
  padding: 18px;
}

.afpg__label {
  display: block;
  font-weight: 600;
  font-size: var(--afpg-font-small);
  margin-bottom: 8px;
}

.afpg__output-row {
  margin-bottom: 14px;
}

.afpg__output-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

/* Update: Force the password input to a consistent height. */
.afpg__output {
  flex: 1;
  height: var(--afpg-field-height);
  border: 1px solid var(--afpg-border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  outline: none;
  background: #fff;
}

.afpg__output:focus {
  border-color: var(--afpg-magenta);
  box-shadow: 0 0 0 4px var(--afpg-focus);
}

.afpg__output-actions {
  display: flex;
  gap: 10px;
}

/* Update: Copy button now matches input height and is less visually oversized. */
.afpg__btn {
  height: var(--afpg-field-height);
  border: 1px solid var(--afpg-magenta);
  background: var(--afpg-magenta);
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  font-size: var(--afpg-font-small);
  cursor: pointer;

  /* Update: prevent giant "copy" button; keep it proportional. */
  min-width: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.afpg__btn:hover { filter: brightness(0.95); }

.afpg__btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--afpg-focus);
}

.afpg__btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Update: Refresh icon button now matches input height and is a fixed square. */
.afpg__icon-btn {
  height: var(--afpg-field-height);
  width: var(--afpg-field-height);
  border: 1px solid var(--afpg-border);
  background: #fff;
  color: var(--afpg-purple);
  border-radius: 8px;
  padding: 0;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.afpg__icon-btn:hover { background: #fafafa; }

.afpg__icon-btn:focus {
  outline: none;
  border-color: var(--afpg-magenta);
  box-shadow: 0 0 0 4px var(--afpg-focus);
}

.afpg__helper {
  margin-top: 8px;
  font-size: var(--afpg-font-small);
  color: var(--afpg-muted);
  min-height: 18px;
}

.afpg__helper--ok { color: var(--afpg-ok); }
.afpg__helper--bad { color: var(--afpg-bad); }

.afpg__meter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 18px;
}

.afpg__meter {
  flex: 1;
  height: 10px;
  background: #f1f2f4;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--afpg-border);
}

.afpg__meter-fill {
  height: 100%;
  width: 0%;
  background: var(--afpg-bad);
  transition: width 160ms ease, background-color 160ms ease;
}

.afpg__meter-label {
  min-width: 72px;
  font-weight: 700;
  font-size: var(--afpg-font-small);
  color: var(--afpg-muted);
  text-align: right;
}

.afpg__controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.afpg__control {
  border: 1px solid var(--afpg-border);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.afpg__control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

/* Update: Uniform control titles (no oversized headings). */
.afpg__control-title {
  font-weight: 700;
  font-size: var(--afpg-font-base);
}

/* Update: Right-side value text standardized to small/muted. */
.afpg__control-value {
  color: var(--afpg-muted);
  font-size: var(--afpg-font-small);
}

.afpg__slider-wrap {
  display: grid;
  gap: 6px;
}

/* Update: Let browser render native range, just color it to match brand. */
.afpg__slider {
  width: 100%;
  accent-color: var(--afpg-purple);
}

.afpg__slider-scale {
  display: flex;
  justify-content: space-between;
  color: var(--afpg-muted);
  font-size: 12px;
}

.afpg__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.afpg__check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: var(--afpg-font-base);
  color: var(--afpg-text);
}

.afpg__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--afpg-purple);
}

.afpg__check--wide {
  grid-column: 1 / -1;
}

.afpg__warning {
  margin-top: 10px;
  font-size: var(--afpg-font-small);
  color: var(--afpg-bad);
  min-height: 18px;
}

@media (min-width: 720px) {
  .afpg__controls {
    grid-template-columns: 1fr 1fr;
  }
}

/* ======================================================================
   Section Ends Here: ArdentFocus Password Generator Styles (scoped)
   ====================================================================== */
