/* Domain WHOIS & History Intelligence Scoped Styles */

:root {
  --dwhi-primary: #0284c7;
  --dwhi-primary-hover: #0369a1;
  --dwhi-bg: #f8fafc;
  --dwhi-card-bg: #ffffff;
  --dwhi-border: #e2e8f0;
  --dwhi-text: #0f172a;
  --dwhi-muted: #64748b;
  --dwhi-code-bg: #0f172a;
  --dwhi-code-text: #e2e8f0;
  --dwhi-pass-bg: #dcfce7;
  --dwhi-pass-text: #15803d;
  --dwhi-warn-bg: #fef3c7;
  --dwhi-warn-text: #92400e;
  --dwhi-danger-bg: #fee2e2;
  --dwhi-danger-text: #b91c1c;
}

body {
  margin: 0;
  line-height: 1.5;
}

.dwhi-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Hero */
.dwhi-hero-section {
  text-align: center;
  margin-bottom: 2rem;
}

.dwhi-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--dwhi-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.dwhi-subtitle {
  font-size: 1.05rem;
  color: var(--dwhi-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Container */
.dwhi-container {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Search Card */
.dwhi-search-card {
  margin-bottom: 1.5rem;
}

.dwhi-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--dwhi-text);
}

.dwhi-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.dwhi-input-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.dwhi-input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--dwhi-muted);
  font-size: 1rem;
  pointer-events: none;
}

.dwhi-text-input {
  width: 100%;
  padding: 0.75rem 0.85rem 0.75rem 2.4rem;
  font-size: 0.95rem;
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 8px;
  color: var(--dwhi-text);
  box-sizing: border-box;
  min-height: 44px;
}

.dwhi-text-input:focus {
  outline: none;
  border-color: var(--dwhi-primary);
}

.dwhi-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;
}

.dwhi-btn-primary {
  background-color: var(--dwhi-primary);
  color: #ffffff;
}

.dwhi-btn-primary:hover {
  background-color: var(--dwhi-primary-hover);
}

.dwhi-btn-secondary {
  background-color: var(--dwhi-bg);
  border-color: var(--dwhi-border);
  color: var(--dwhi-text);
}

.dwhi-btn-secondary:hover {
  border-color: var(--dwhi-primary);
  color: var(--dwhi-primary);
}

.dwhi-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.dwhi-tag-label {
  color: var(--dwhi-muted);
}

.dwhi-sample-btn {
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: var(--dwhi-primary);
  cursor: pointer;
  min-height: 32px;
}

.dwhi-sample-btn:hover {
  border-color: var(--dwhi-primary);
}

/* Tabs */
.dwhi-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--dwhi-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.dwhi-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dwhi-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;
}

.dwhi-tab-btn:hover {
  color: var(--dwhi-text);
}

.dwhi-tab-btn.dwhi-tab-active {
  color: var(--dwhi-primary);
  border-bottom-color: var(--dwhi-primary);
}

.dwhi-tab-panel {
  display: none;
}

.dwhi-tab-panel.dwhi-panel-active {
  display: block;
}

/* Metric Card */
.dwhi-metric-card {
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.dwhi-domain-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dwhi-domain-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: var(--dwhi-text);
}

.dwhi-domain-sub {
  font-size: 0.85rem;
  color: var(--dwhi-muted);
}

.dwhi-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.dwhi-badge-active {
  background: var(--dwhi-pass-bg);
  color: var(--dwhi-pass-text);
}

.dwhi-badge-warn {
  background: var(--dwhi-warn-bg);
  color: var(--dwhi-warn-text);
}

.dwhi-badge-danger {
  background: var(--dwhi-danger-bg);
  color: var(--dwhi-danger-text);
}

.dwhi-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dwhi-metric-box {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.dwhi-metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dwhi-text);
}

.dwhi-days-safe {
  color: #15803d;
}

.dwhi-days-warn {
  color: #b45309;
}

.dwhi-days-danger {
  color: #b91c1c;
}

.dwhi-metric-title {
  font-size: 0.75rem;
  color: var(--dwhi-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* Lifecycle Progress */
.dwhi-lifecycle-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dwhi-lifecycle-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--dwhi-muted);
}

.dwhi-lifecycle-state {
  font-weight: 600;
  color: var(--dwhi-primary);
}

.dwhi-progress-track {
  width: 100%;
  height: 8px;
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 4px;
  overflow: hidden;
}

.dwhi-progress-bar {
  height: 100%;
  width: 82%;
  background: var(--dwhi-primary);
  border-radius: 4px;
}

/* Details Grid */
.dwhi-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.dwhi-info-card {
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.dwhi-card-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--dwhi-text);
}

.dwhi-sub-heading {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  color: var(--dwhi-text);
}

.dwhi-key-value-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.85rem;
}

.dwhi-kv-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--dwhi-border);
  padding-bottom: 0.4rem;
  gap: 0.5rem;
}

.dwhi-kv-key {
  color: var(--dwhi-muted);
  font-weight: 600;
}

.dwhi-kv-val {
  color: var(--dwhi-text);
  text-align: right;
  word-break: break-word;
}

.dwhi-ns-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dwhi-ns-item {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.825rem;
  background: var(--dwhi-card-bg);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--dwhi-border);
  color: var(--dwhi-text);
}

.dwhi-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dwhi-status-tag {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--dwhi-muted);
  font-family: ui-monospace, monospace;
}

/* Timeline */
.dwhi-history-card, .dwhi-security-card, .dwhi-raw-card {
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.dwhi-panel-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dwhi-text);
  margin: 0 0 0.35rem;
}

.dwhi-panel-intro {
  font-size: 0.9rem;
  color: var(--dwhi-muted);
  margin: 0 0 1.25rem;
}

.dwhi-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--dwhi-border);
  margin-left: 0.5rem;
}

.dwhi-timeline-item {
  position: relative;
}

.dwhi-timeline-dot {
  position: absolute;
  left: -1.95rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dwhi-primary);
  border: 2px solid var(--dwhi-card-bg);
}

.dwhi-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dwhi-timeline-date {
  font-size: 0.8rem;
  color: var(--dwhi-primary);
  font-weight: 600;
}

.dwhi-timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dwhi-text);
  margin: 0;
}

.dwhi-timeline-desc {
  font-size: 0.85rem;
  color: var(--dwhi-muted);
  margin: 0;
}

/* Security Grid */
.dwhi-security-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dwhi-sec-item {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 8px;
  padding: 1rem;
}

.dwhi-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dwhi-sec-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dwhi-text);
}

.dwhi-sec-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.dwhi-badge-pass {
  background: var(--dwhi-pass-bg);
  color: var(--dwhi-pass-text);
}

.dwhi-badge-fail {
  background: var(--dwhi-danger-bg);
  color: var(--dwhi-danger-text);
}

.dwhi-sec-desc {
  font-size: 0.85rem;
  color: var(--dwhi-muted);
  margin: 0 0 0.5rem;
}

.dwhi-sec-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8rem;
  background: var(--dwhi-bg);
  border: 1px solid var(--dwhi-border);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  color: var(--dwhi-text);
  word-break: break-all;
}

/* Raw WHOIS & RDAP */
.dwhi-raw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dwhi-raw-toggle-group {
  display: flex;
  gap: 0.5rem;
}

.dwhi-raw-btn {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--dwhi-muted);
  cursor: pointer;
  min-height: 36px;
}

.dwhi-raw-btn.dwhi-raw-btn-active {
  background: var(--dwhi-primary);
  color: #ffffff;
  border-color: var(--dwhi-primary);
}

.dwhi-raw-code {
  background: var(--dwhi-code-bg);
  color: var(--dwhi-code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.825rem;
  line-height: 1.5;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toolbar */
.dwhi-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dwhi-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.dwhi-toolbar-left {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dwhi-toolbar-right {
  display: flex;
  align-items: center;
}

.dwhi-privacy-badge {
  font-size: 0.8rem;
  color: var(--dwhi-muted);
}

/* Toast */
.dwhi-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;
}

.dwhi-toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* Ad Slot Container (Strict min-height: 280px) */
.dwhi-ad-container {
  min-height: 280px;
  background: var(--dwhi-bg);
  border: 1px dashed var(--dwhi-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  color: var(--dwhi-muted);
  font-size: 0.85rem;
}

/* Related Tools */
.dwhi-related-section {
  margin: 2.5rem 0;
}

.dwhi-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dwhi-text);
}

.dwhi-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.dwhi-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem;
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--dwhi-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dwhi-related-card:hover {
  border-color: var(--dwhi-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dwhi-related-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dwhi-primary);
}

.dwhi-related-desc {
  font-size: 0.825rem;
  line-height: 1.4;
  color: var(--dwhi-muted);
}

/* Guide & FAQ */
.dwhi-guide-section, .dwhi-faq-section, .dwhi-disclaimer {
  margin: 2.5rem 0;
}

.dwhi-guide-section h2, .dwhi-faq-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--dwhi-text);
}

.dwhi-guide-section h3, .dwhi-faq-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--dwhi-text);
}

.dwhi-guide-section p, .dwhi-guide-section ol, .dwhi-faq-section p {
  color: var(--dwhi-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.dwhi-guide-section ol {
  padding-left: 1.25rem;
}

.dwhi-guide-section li {
  margin-bottom: 0.5rem;
}

.dwhi-faq-item {
  border-bottom: 1px solid var(--dwhi-border);
  padding: 1rem 0;
}

.dwhi-disclaimer {
  background: var(--dwhi-card-bg);
  border: 1px solid var(--dwhi-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--dwhi-muted);
}
/* 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"] {
  --dwhi-primary: #81bcda;
  --dwhi-primary-hover: #69aed4;
  --dwhi-bg: var(--tf-surface);
  --dwhi-card-bg: var(--tf-surface);
  --dwhi-border: var(--tf-surface);
  --dwhi-text: var(--tf-ink);
  --dwhi-muted: var(--tf-ink-faint);
  --dwhi-code-bg: var(--tf-ink);
  --dwhi-code-text: var(--tf-surface);
  --dwhi-pass-bg: var(--tf-surface);
  --dwhi-pass-text: #5ed089;
  --dwhi-warn-bg: var(--tf-surface);
  --dwhi-warn-text: #d38f66;
  --dwhi-danger-bg: var(--tf-surface);
  --dwhi-danger-text: #da8181;
}
