/* ==========================================================================
   Personal Cybersecurity — interactive styles
   Password Lab (pc-password-lab.js) + Passkey Demo (pc-passkey-demo.js)
   ========================================================================== */

.pc-lab {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .pc-lab {
    grid-template-columns: 1fr 1fr;
  }
}

.pc-lab__panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pc-lab__panel h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--course-accent-dark, #1557b0);
}

.pc-lab__note {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.pc-lab__row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pc-lab__row input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.pc-lab__row input:focus {
  outline: none;
  border-color: var(--course-accent, #1a73e8);
  box-shadow: 0 0 0 3px var(--course-accent-light, #e8f0fe);
}

.pc-lab__reveal {
  flex: 0 0 auto;
  padding: 0 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.pc-lab__reveal:hover {
  background: #f3f4f6;
}

.pc-lab__meter {
  height: 10px;
  border-radius: 5px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.pc-lab__meter-fill {
  height: 100%;
  width: 0;
  border-radius: 5px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pc-lab__meter-fill.is-weak { background: #d93025; }
.pc-lab__meter-fill.is-fair { background: #f9ab00; }
.pc-lab__meter-fill.is-strong { background: #188038; }

.pc-lab__stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 3.5rem;
}

.pc-lab__stat {
  font-size: 0.9rem;
  color: #374151;
}

.pc-lab__hint {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
}

.pc-lab__check {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--course-accent, #1a73e8);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pc-lab__check:hover {
  background: var(--course-accent-dark, #1557b0);
}

.pc-lab__result {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  background: #f9fafb;
  color: #374151;
}

.pc-lab__result:empty {
  display: none;
}

.pc-lab__result strong {
  display: block;
  margin-bottom: 0.15rem;
}

.pc-lab__result.is-pwned {
  background: #fce8e6;
  color: #a50e0e;
}

.pc-lab__result.is-clean {
  background: #e6f4ea;
  color: #137333;
}

/* --------------------------------------------------------------------------
   Passkey Demo (pc-passkey-demo.js)
   -------------------------------------------------------------------------- */

.pc-passkey {
  margin: 2rem 0;
}

.pc-passkey__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pc-passkey__actions .pc-lab__check {
  display: inline-block;
  width: auto;
}

.pc-passkey__log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pc-passkey__log li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid var(--course-accent, #1a73e8);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pc-passkey__log li.is-err {
  border-left-color: #f9ab00;
}

.pc-passkey__log li strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #111827;
}
