/* Have I Been Pwned? Breach Checker Scoped Styles */

:root {
  --hibp-primary: #0284c7;
  --hibp-primary-hover: #0369a1;
  --hibp-bg: #f8fafc;
  --hibp-card-bg: #ffffff;
  --hibp-border: #e2e8f0;
  --hibp-text: #0f172a;
  --hibp-muted: #64748b;
  --hibp-danger-bg: #fef2f2;
  --hibp-danger-border: #fecaca;
  --hibp-danger-text: #b91c1c;
  --hibp-warning-bg: #fffbeb;
  --hibp-warning-border: #fde68a;
  --hibp-warning-text: #b45309;
  --hibp-success-bg: #f0fdf4;
  --hibp-success-border: #bbf7d0;
  --hibp-success-text: #15803d;
}

body {
  margin: 0;
  line-height: 1.5;
}

.hibp-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Hero */
.hibp-hero-section {
  text-align: center;
  margin-bottom: 2rem;
}

.hibp-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--hibp-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.hibp-subtitle {
  font-size: 1.05rem;
  color: var(--hibp-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Tabs */
.hibp-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--hibp-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.hibp-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hibp-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  min-height: 44px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.hibp-tab-btn:hover {
  color: var(--hibp-text);
}

.hibp-tab-btn.hibp-tab-active {
  color: var(--hibp-primary);
  border-bottom-color: var(--hibp-primary);
}

.hibp-tab-panel {
  display: none;
}

.hibp-tab-panel.hibp-panel-active {
  display: block;
}

/* Cards & Forms */
.hibp-container {
  background: var(--hibp-card-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.hibp-form-card {
  margin-bottom: 1.5rem;
}

.hibp-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--hibp-text);
}

.hibp-help-note {
  font-size: 0.8rem;
  color: var(--hibp-muted);
  margin: 0 0 0.75rem;
}

.hibp-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.hibp-input-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.hibp-input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--hibp-muted);
  font-size: 1rem;
  pointer-events: none;
}

.hibp-text-input {
  width: 100%;
  padding: 0.75rem 0.85rem 0.75rem 2.4rem;
  font-size: 0.95rem;
  background: var(--hibp-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  color: var(--hibp-text);
  box-sizing: border-box;
  min-height: 44px;
}

.hibp-text-input:focus {
  outline: none;
  border-color: var(--hibp-primary);
}

.hibp-select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  background: var(--hibp-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  color: var(--hibp-text);
  min-height: 44px;
  box-sizing: border-box;
}

.hibp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background-color 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.hibp-btn-primary {
  background-color: var(--hibp-primary);
  color: #ffffff;
}

.hibp-btn-primary:hover {
  background-color: var(--hibp-primary-hover);
}

.hibp-btn-secondary {
  background-color: var(--hibp-bg);
  border-color: var(--hibp-border);
  color: var(--hibp-text);
}

.hibp-btn-secondary:hover {
  border-color: var(--hibp-primary);
  color: var(--hibp-primary);
}

.hibp-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.hibp-tag-label {
  color: var(--hibp-muted);
}

.hibp-sample-btn, .hibp-sample-pwd {
  background: var(--hibp-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: var(--hibp-primary);
  cursor: pointer;
  min-height: 32px;
}

.hibp-sample-btn:hover, .hibp-sample-pwd:hover {
  border-color: var(--hibp-primary);
}

/* Status Cards */
.hibp-status-card {
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.hibp-status-warning {
  background: var(--hibp-warning-bg);
  border: 1px solid var(--hibp-warning-border);
}

.hibp-status-danger {
  background: var(--hibp-danger-bg);
  border: 1px solid var(--hibp-danger-border);
}

.hibp-status-success {
  background: var(--hibp-success-bg);
  border: 1px solid var(--hibp-success-border);
}

.hibp-status-badge-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hibp-status-indicator {
  font-size: 1.75rem;
  line-height: 1;
}

.hibp-status-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--hibp-text);
}

.hibp-status-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--hibp-muted);
}

.hibp-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hibp-border);
}

.hibp-metric-item {
  display: flex;
  flex-direction: column;
}

.hibp-metric-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hibp-text);
}

.hibp-metric-label {
  font-size: 0.75rem;
  color: var(--hibp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Incidents List */
.hibp-incidents-section {
  margin-bottom: 1.5rem;
}

.hibp-section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--hibp-text);
}

.hibp-incidents-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hibp-incident-card {
  background: var(--hibp-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  padding: 1rem;
}

.hibp-incident-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.45rem;
}

.hibp-incident-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: var(--hibp-text);
}

.hibp-incident-meta {
  font-size: 0.8rem;
  color: var(--hibp-muted);
}

.hibp-pill-danger {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.hibp-pill-warning {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.hibp-pill-safe {
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.hibp-incident-desc {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--hibp-text);
}

.hibp-data-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hibp-data-tag {
  background: var(--hibp-card-bg);
  border: 1px solid var(--hibp-border);
  color: var(--hibp-muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* Checklist */
.hibp-checklist-card {
  background: var(--hibp-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  padding: 1.15rem;
}

.hibp-checklist-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--hibp-text);
}

.hibp-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hibp-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--hibp-text);
}

.hibp-checkbox {
  margin-top: 0.15rem;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
}

/* Password Hash Elements */
.hibp-hash-details {
  background: var(--hibp-card-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.hibp-hash-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.hibp-hash-row:last-child {
  margin-bottom: 0;
}

.hibp-hash-label {
  color: var(--hibp-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.hibp-hash-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--hibp-primary);
}

.hibp-hash-prefix {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  background: var(--hibp-warning-bg);
  color: var(--hibp-warning-text);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.hibp-hash-suffix {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.75rem;
  color: var(--hibp-muted);
}

/* Directory */
.hibp-filter-card {
  margin-bottom: 1.25rem;
}

.hibp-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hibp-filter-group {
  display: flex;
  flex-direction: column;
}

.hibp-directory-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Toolbar */
.hibp-actions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hibp-border);
}

.hibp-toolbar-left {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hibp-privacy-tag {
  font-size: 0.8rem;
  color: var(--hibp-muted);
  font-weight: 500;
}

/* Toast */
.hibp-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
}

.hibp-toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* Ad Slot Container (Strict min-height: 280px) */
.hibp-ad-container {
  min-height: 280px;
  background: var(--hibp-bg);
  border: 1px dashed var(--hibp-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  color: var(--hibp-muted);
  font-size: 0.85rem;
}

/* Related Tools */
.hibp-related-section {
  margin: 2.5rem 0;
}

.hibp-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--hibp-text);
}

.hibp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.hibp-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem;
  background: var(--hibp-card-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--hibp-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hibp-related-card:hover {
  border-color: var(--hibp-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hibp-related-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hibp-primary);
}

.hibp-related-desc {
  font-size: 0.825rem;
  line-height: 1.4;
  color: var(--hibp-muted);
}

/* Guide & FAQ */
.hibp-guide-section, .hibp-faq-section, .hibp-disclaimer {
  margin: 2.5rem 0;
}

.hibp-guide-section h2, .hibp-faq-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--hibp-text);
}

.hibp-guide-section h3, .hibp-faq-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--hibp-text);
}

.hibp-guide-section p, .hibp-guide-section ol, .hibp-faq-section p {
  color: var(--hibp-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.hibp-guide-section ol {
  padding-left: 1.25rem;
}

.hibp-guide-section li {
  margin-bottom: 0.5rem;
}

.hibp-faq-item {
  border-bottom: 1px solid var(--hibp-border);
  padding: 1rem 0;
}

.hibp-disclaimer {
  background: var(--hibp-card-bg);
  border: 1px solid var(--hibp-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--hibp-muted);
}

.hibp-results-area {
  display: block;
}

.hibp-toolbar-right {
  display: flex;
  align-items: center;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --hibp-primary: #81bcda;
  --hibp-primary-hover: #69aed4;
  --hibp-bg: var(--tf-surface);
  --hibp-card-bg: var(--tf-surface);
  --hibp-border: var(--tf-surface);
  --hibp-text: var(--tf-ink);
  --hibp-muted: var(--tf-ink-faint);
  --hibp-danger-bg: var(--tf-surface);
  --hibp-danger-border: var(--tf-surface);
  --hibp-danger-text: #da8181;
  --hibp-warning-bg: var(--tf-surface);
  --hibp-warning-border: #dac881;
  --hibp-warning-text: #d9a57d;
  --hibp-success-bg: var(--tf-surface);
  --hibp-success-border: #81daa0;
  --hibp-success-text: #5ed089;
}
