/* ═══════════════════════════════════════════════
   Password Generator Tool — Styles
   ═══════════════════════════════════════════════ */

.pg-tool-body {
  padding: 28px;
}

/* Password Output */
.pg-output-wrap {
  position: relative;
  margin-bottom: 20px;
}

.pg-output {
  width: 100%;
  padding: 20px 70px 20px 20px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--yellow);
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.5;
  min-height: 72px;
  display: flex;
  align-items: center;
  transition: border-color 0.15s;
  user-select: all;
}

.pg-output:hover {
  border-color: var(--yellow);
}

.pg-output-copy {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #161616;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.12s;
}

.pg-output-copy:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.pg-output-copy.ok {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

/* Strength Meter */
.pg-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #0a0a0a;
  border: 1px solid var(--border);
}

.pg-strength-bar-wrap {
  flex: 1;
  height: 4px;
  background: #1a1a1a;
  overflow: hidden;
}

.pg-strength-bar {
  height: 100%;
  width: 0%;
  transition:
    width 0.3s,
    background 0.3s;
  background: #ff3b3b;
}

.pg-strength-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 90px;
  text-align: right;
}

/* Options */
.pg-field-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-length-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pg-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #1a1a1a;
  outline: none;
  border-radius: 0;
}

.pg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--yellow);
  border: none;
  cursor: pointer;
}

.pg-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--yellow);
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.pg-length-val {
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  min-width: 48px;
  text-align: center;
  line-height: 1;
}

.pg-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.pg-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.12s;
  cursor: pointer;
  user-select: none;
}

.pg-option:nth-child(even) {
  border-right: none;
}
.pg-option:nth-last-child(-n + 2) {
  border-bottom: none;
}
.pg-option:hover {
  background: #0f0f0f;
}

.pg-option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  background: #0a0a0a;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.12s,
    background 0.12s;
}

.pg-option input[type="checkbox"]:checked {
  background: var(--yellow);
  border-color: var(--yellow);
}

.pg-option input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--ink, #0c0c0c);
}

.pg-option-label {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--white);
}

.pg-option-hint {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-left: auto;
}

/* Actions */
.pg-action-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 4px;
  flex-wrap: wrap;
}

.pg-btn-generate {
  height: 48px;
  padding: 0 32px;
  background: var(--yellow);
  color: var(--ink, #0c0c0c);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 10px;
  transition:
    background 0.15s,
    color 0.15s;
  cursor: pointer;
}

.pg-btn-generate:hover {
  background: transparent;
  color: var(--yellow);
}

.pg-btn-copy {
  height: 48px;
  padding: 0 24px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border: 2px solid var(--border);
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color 0.15s,
    color 0.15s;
  cursor: pointer;
}

.pg-btn-copy:hover {
  border-color: var(--white);
  color: var(--white);
}
.pg-btn-copy.ok {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

.pg-safe-note {
  margin-left: 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-safe-note .lock {
  color: var(--green, #00c875);
}

/* History */
.pg-history {
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.pg-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
}

.pg-history-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pg-history-clear {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  transition: all 0.12s;
}

.pg-history-clear:hover {
  border-color: #ff3b3b;
  color: #ff3b3b;
}

.pg-history-list {
  display: flex;
  flex-direction: column;
}

.pg-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.pg-history-item:last-child {
  border-bottom: none;
}
.pg-history-item:hover {
  background: #0f0f0f;
}

.pg-history-pw {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--white);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.pg-history-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  flex-shrink: 0;
}

.pg-history-copy {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}

.pg-history-copy:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.pg-history-copy.ok {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

.pg-history-empty {
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

/* Content Sections — reuse JWT pattern */
.pg-content-section {
  border-bottom: 1px solid var(--border);
}

.pg-cs-header {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}

.pg-cs-header-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-cs-header-title {
  font-family: var(--cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.pg-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.pg-step:hover {
  background: #0d0d0d;
}
.pg-step:last-child {
  border-bottom: none;
}

.pg-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 0 20px;
  border-right: 1px solid var(--border);
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  letter-spacing: -0.04em;
  transition: color 0.15s;
}

.pg-step:hover .pg-step-num {
  color: var(--yellow);
}
.pg-step-content {
  padding: 20px 24px;
}

.pg-step-title {
  font-family: var(--cond);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 6px;
}

.pg-step-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

.pg-code {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: #161616;
  border: 1px solid var(--border);
  padding: 1px 6px;
  color: var(--yellow);
}

/* FAQ */
.pg-faq-item {
  border-bottom: 1px solid var(--border);
}
.pg-faq-item:last-child {
  border-bottom: none;
}

.pg-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  transition:
    background 0.12s,
    color 0.12s;
  background: none;
  border: none;
  cursor: pointer;
}

.pg-faq-q:hover {
  background: #0d0d0d;
  color: var(--yellow);
}

.pg-faq-icon {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition:
    transform 0.2s,
    color 0.12s;
}

.pg-faq-q[aria-expanded="true"] {
  background: #0d0d0d;
  color: var(--yellow);
}
.pg-faq-q[aria-expanded="true"] .pg-faq-icon {
  transform: rotate(45deg);
  color: var(--yellow);
}

.pg-faq-a {
  display: none;
  padding: 0 28px 20px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  background: #0a0a0a;
}

.pg-faq-a.open {
  display: block;
}

.pg-faq-a code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--yellow);
  background: #161616;
  border: 1px solid var(--border);
  padding: 1px 5px;
}

/* Responsive */
@media (max-width: 1024px) {
  .pg-page-body {
    grid-template-columns: 1fr;
  }
  .pg-col-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: none;
  }
}

@media (max-width: 768px) {
  .pg-page-header {
    grid-template-columns: 1fr;
  }
  .pg-ph-right {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
  }
  .pg-ph-stat {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .pg-ph-stat:last-child {
    border-right: none;
  }
  .pg-ph-left {
    padding: 28px 20px;
  }
  .pg-tool-body {
    padding: 18px;
  }
  .pg-col-side {
    grid-template-columns: 1fr;
  }
  .pg-options-grid {
    grid-template-columns: 1fr;
  }
  .pg-option {
    border-right: none !important;
  }
}

@media (max-width: 560px) {
  .pg-ph-title {
    font-size: 2.8rem;
  }
  .pg-action-row {
    gap: 0;
  }
  .pg-btn-copy {
    margin-left: 0;
    margin-top: 8px;
  }
  .pg-safe-note {
    display: none;
  }
}
