/* Password Generator Tool - clean UI */
.pgt-wrap{
  --pgt-primary: #DC2626;
  --pgt-primary-soft: #FECACA;
  --pgt-surface-soft: #FDE6E7;
  --pgt-text: #0f172a;
  --pgt-muted: rgba(15, 23, 42, 0.70);
}

.pgt-wrap { margin: 18px auto; padding: 0 12px; box-sizing: border-box; }
.pgt-wrap * { box-sizing: border-box; }

.pgt-wrap .pgt-card{
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: var(--pgt-text);
}

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

.pgt-wrap .pgt-title{
  margin: 0 0 6px 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.pgt-wrap .pgt-sub{
  margin: 0;
  font-size: 13px;
  color: var(--pgt-muted);
  line-height: 1.5;
}

.pgt-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: var(--pgt-surface-soft);
  color: var(--pgt-primary);
  user-select:none;
}

.pgt-form{ margin: 0; }
.pgt-row{ margin: 14px 0; }
.pgt-wrap .pgt-label{ display:block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }

.pgt-hint{
  margin: 8px 0 0 0;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.65);
}

.pgt-length{ display:flex; align-items:center; gap: 12px; }
/* Force stable layout across themes */
.pgt-length .pgt-range{ flex: 1 1 auto; min-width: 0; width: auto; }
.pgt-length .pgt-number{ flex: 0 0 88px; width: 88px; max-width: 88px; }
.pgt-wrap .pgt-range{
.pgt-number{
  padding: 10px 10px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #fff;
  color: var(--pgt-text);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  outline: none;
  box-shadow: none;
}
.pgt-number:focus{
  border-color: var(--pgt-primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
.pgt-number::-webkit-outer-spin-button,
.pgt-number::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.pgt-number{ -moz-appearance: textfield; }

  width: 100%;
  accent-color: var(--pgt-primary);
  --pgt-range-pct: 0%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--pgt-primary) 0%,
    var(--pgt-primary) var(--pgt-range-pct),
    var(--pgt-primary-soft) var(--pgt-range-pct),
    var(--pgt-primary-soft) 100%
  );
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.pgt-range::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pgt-primary);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.10);
  cursor: pointer;
}
.pgt-range::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pgt-primary);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.10);
  cursor: pointer;
}
.pgt-range::-moz-range-track{
  height: 8px;
  border-radius: 999px;
  background: transparent;
}
.pgt-number{
  width: 92px;
  padding: 10px 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  outline: none;
}
.pgt-number:focus{
  border-color: rgba(220, 38, 38, 0.70);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.pgt-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pgt-wrap .pgt-check{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 1);
  cursor: pointer;
  user-select:none;
}

.pgt-check input{
  width: 16px;
  height: 16px;
  accent-color: var(--pgt-primary);
}

.pgt-check span{
  font-size: 13px;
  color: rgba(15, 23, 42, 0.85);
}

.pgt-alert{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.06);
  color: rgba(153, 27, 27, 1);
  font-size: 13px;
}

.pgt-actions{
  display:flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pgt-wrap .pgt-btn{
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.pgt-btn:active{ transform: translateY(1px); }
.pgt-btn:disabled{ opacity: .55; cursor: not-allowed; }

.pgt-wrap .pgt-btn-primary{
  background: var(--pgt-primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.22);
}
.pgt-btn-primary:hover{ background: #b91c1c; }

.pgt-wrap .pgt-btn-ghost{
  background: #fff;
  border-color: rgba(15, 23, 42, 0.15);
  color: rgba(15, 23, 42, 0.85);
}
.pgt-btn-ghost:hover{ background: rgba(2, 6, 23, 0.03); }

.pgt-wrap .pgt-btn-secondary{
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.20);
  color: var(--pgt-primary);
}
.pgt-btn-secondary:hover{ background: rgba(220, 38, 38, 0.16); }

.pgt-output{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pgt-copywrap{
  display:flex;
  align-items:center;
  gap: 10px;
}

.pgt-password{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-size: 14px;
  background: rgba(248, 250, 252, 1);
  outline:none;
}
.pgt-password:focus{ border-color: rgba(220, 38, 38, 0.70); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }

.pgt-strength{ margin-top: 12px; }
.pgt-strength-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pgt-strength-label{ font-size: 13px; font-weight: 600; }
.pgt-strength-value{ font-size: 13px; font-weight: 700; }

.pgt-meter{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow:hidden;
}
.pgt-meter-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--pgt-primary);
  transition: width .2s ease;
}

.pgt-foot{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
}
.pgt-foot-note{
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

@media (max-width: 520px){
  .pgt-card{ padding: 14px; }
  .pgt-grid{ grid-template-columns: 1fr; }
  .pgt-copywrap{ flex-direction: column; align-items: stretch; }
  .pgt-number{ width: 100%; }
}


/* --- Theme isolation hardening (prevents global theme styles from changing layout) --- */
.pgt-wrap{ isolation: isolate; }
.pgt-wrap :where(input, button, select, textarea){
  font-family: inherit !important;
  font-size: inherit;
  line-height: 1.2;
}

/* Length row: keep slider long and number box small like the original design */
.pgt-wrap .pgt-length{ display:flex; align-items:center; gap: 12px; }
.pgt-wrap .pgt-range{ flex: 1 1 auto; width: 100% !important; }
.pgt-wrap .pgt-number{
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  text-align: center;
}

/* Buttons: avoid theme button resets */
.pgt-wrap .pgt-btn{
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  background: #fff !important;
  color: var(--pgt-text) !important;
  text-decoration: none !important;
}
.pgt-wrap .pgt-btn-primary{
  background: var(--pgt-primary) !important;
  border-color: var(--pgt-primary) !important;
  color: #fff !important;
}
.pgt-wrap .pgt-btn-primary:hover{ filter: brightness(0.98); }
.pgt-wrap .pgt-btn-secondary{ background: #fff !important; }

/* Inputs: prevent theme width:100% and heavy padding */
.pgt-wrap input[type="number"],
.pgt-wrap input[type="text"]{
  width: auto;
}

/* Theme override protection */
.pgt-wrap .pgt-length .pgt-number{ width: 88px !important; max-width: 88px !important; }
.pgt-wrap .pgt-length .pgt-range{ width: auto !important; }
.pgt-wrap .pgt-btn-primary{ background: var(--pgt-primary) !important; color: #fff !important; }
