/* ============================================
   パスワード生成器
   ============================================ */

/* --- Length Control --- */
.pwGen__lengthControl {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwGen__slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.pwGen__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #059669;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pwGen__slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pwGen__slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  background: #047857;
}

.pwGen__slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #059669;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.pwGen__lengthInput {
  width: 72px !important;
  text-align: center;
  padding: 8px 4px;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pwGen__lengthUnit {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
}

/* --- Option Group --- */
.pwGen__optionGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwGen__option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: #374151;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.pwGen__option:hover {
  background-color: #f9fafb;
}

.pwGen__optionCheck {
  width: 18px;
  height: 18px;
  accent-color: #059669;
  cursor: pointer;
  flex-shrink: 0;
}

.pwGen__optionLabel {
  line-height: 1.4;
}

/* --- Count Select --- */
.pwGen__countSelect {
  width: auto !important;
  max-width: 160px;
}

/* --- Generate Button --- */
.pwGen__generateBtn {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.0625rem;
  margin-top: 4px;
}

/* --- Error --- */
.pwGen__error {
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 12px;
}

/* --- Result Area --- */
.pwGen__resultList {
  margin-top: 24px;
}

.pwGen__resultItem {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pwGen__resultItem:hover {
  border-color: #a7f3d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pwGen__resultItem:last-child {
  margin-bottom: 0;
}

.pwGen__resultPassword {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwGen__resultCode {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #1e293b;
  word-break: break-all;
  padding: 8px 12px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  user-select: all;
}

.pwGen__copyBtn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- Strength Meter --- */
.pwGen__strengthWrap {
  margin-top: 14px;
}

.pwGen__strengthLabel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 6px;
}

.pwGen__strengthEntropy {
  font-variant-numeric: tabular-nums;
}

.pwGen__strengthText_level_veryWeak {
  color: #dc2626;
}

.pwGen__strengthText_level_weak {
  color: #ea580c;
}

.pwGen__strengthText_level_fair {
  color: #ca8a04;
}

.pwGen__strengthText_level_strong {
  color: #16a34a;
}

.pwGen__strengthText_level_veryStrong {
  color: #059669;
}

.pwGen__meterTrack {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.pwGen__meterBar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background-color 0.4s ease;
}

.pwGen__meterBar_level_veryWeak {
  background-color: #dc2626;
}

.pwGen__meterBar_level_weak {
  background-color: #ea580c;
}

.pwGen__meterBar_level_fair {
  background-color: #ca8a04;
}

.pwGen__meterBar_level_strong {
  background-color: #16a34a;
}

.pwGen__meterBar_level_veryStrong {
  background: linear-gradient(90deg, #059669, #0d9488);
}

/* --- Copy All Button --- */
.pwGen__copyAllBtn {
  margin-top: 16px;
}

/* --- Responsive (Tablet) --- */
@media (min-width: 640px) {
  .pwGen__optionGroup {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .pwGen__generateBtn {
    width: auto;
  }

  .pwGen__resultCode {
    font-size: 1.125rem;
  }
}

/* --- Responsive (Desktop) --- */
@media (min-width: 960px) {
  .pwGen__resultCode {
    font-size: 1.1875rem;
    letter-spacing: 0.02em;
  }
}
