/* /var/www/html/assets/css/password.css
   비밀번호 생성기 전용 스타일. style.css 다크 테마 위에 얹으며 공용 토큰(.btn 등)을 재사용한다. */

.pw-tool {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 8px 0 34px;
}

.pw-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

/* 결과 출력 + 복사 */
.pw-output-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.pw-output {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  overflow-x: auto;
  white-space: nowrap;
}

.pw-output:focus { outline: none; border-color: rgba(255, 255, 255, 0.5); }

/* 강도 표시 바 */
.pw-strength {
  height: 8px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.pw-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.2s ease;
}

.pw-strength-bar.weak   { background: #e57373; }
.pw-strength-bar.medium { background: #f0c674; }
.pw-strength-bar.strong { background: #8fe0a8; }
.pw-strength-bar.vstrong { background: #6fcf97; }

.pw-strength-label {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: rgba(245, 245, 242, 0.66);
}

/* 길이 슬라이더 */
.pw-len-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.pw-len-row > label { font-size: 0.92rem; font-weight: 700; color: rgba(245, 245, 242, 0.82); }

.pw-range {
  flex: 1;
  min-width: 0;
  accent-color: #f5f5f2;
  cursor: pointer;
}

.pw-len-val {
  min-width: 2.4em;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 옵션 칩(체크박스) */
.pw-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pw-check { position: relative; display: inline-flex; }

.pw-check input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pw-check > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 245, 242, 0.82);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pw-check > span::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 245, 242, 0.4);
  background: transparent center / 11px 11px no-repeat;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pw-check input:hover:not(:checked) + span { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

.pw-check input:checked + span {
  background: #f5f5f2;
  border-color: #f5f5f2;
  color: #141414;
}

.pw-check input:checked + span::before {
  border-color: #141414;
  background-color: #141414;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.pw-check input:focus-visible + span { outline: 2px solid #8ab4ff; outline-offset: 2px; }

.pw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.pw-note {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: rgba(245, 245, 242, 0.6);
}
.pw-note.is-ok { color: #8fe0a8; }
.pw-note.is-error { color: #f0a3a3; }

/* 안내 영역 */
.pw-guide {
  margin: 34px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.pw-guide h2 { margin: 0 0 14px; font-size: 1.3rem; }
.pw-guide h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.pw-guide p, .pw-guide li { color: rgba(245, 245, 242, 0.72); line-height: 1.7; }
.pw-guide ul, .pw-guide ol { margin: 0; padding-left: 20px; }
.pw-guide li + li { margin-top: 6px; }
.pw-guide p { margin: 0 0 8px; }

@media (max-width: 560px) {
  .pw-card { padding: 18px 16px; }
  .pw-output { font-size: 1rem; }
}
