/* ── FortiWatch page styles ─────────────────────────────────────────── */

/* Hero / search section */
.fb-hero {
  padding: 140px 0 48px;  /* 140px = navbar height (~80px) + breathing room */
  text-align: center;
}
.fb-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--heading-color, #fff);
}
.fb-hero h1 .fb-accent-cyan  { color: rgb(10, 213, 255); }
.fb-hero h1 .fb-accent-red   { color: rgb(199, 59, 53); }
.fb-hero-sub {
  font-size: 1.05rem;
  color: var(--body-color, rgba(255,255,255,0.65));
  margin-bottom: 16px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Attribution badges */
.fb-attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
/* Attribution source badges */
.fb-badge-green  { background: #22c55e; }
.fb-badge-yellow { background: #eab308; }
.fb-badge-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}

/* Search bar */
.fb-search-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.fb-search-wrap .fb-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(10,213,255,0.7);
  pointer-events: none;
}
#fb-search {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border-radius: 14px;
  border: 1.5px solid rgba(10,213,255,0.25);
  background: rgba(255,255,255,0.04);
  color: var(--heading-color, #fff);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
}
#fb-search::placeholder { color: rgba(255,255,255,0.3); }
#fb-search:focus {
  border-color: rgba(10,213,255,0.6);
  box-shadow: 0 0 0 3px rgba(10,213,255,0.1);
}
[data-bs-theme=light] #fb-search {
  background: rgba(0,0,0,0.04);
  color: #1a1a1a;
  border-color: rgba(0,0,0,0.15);
}
[data-bs-theme=light] #fb-search::placeholder { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] .fb-search-wrap .fb-search-icon { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] #fb-search:focus {
  border-color: #0099cc;
  box-shadow: 0 0 0 3px rgba(0,153,204,0.12);
}

/* Stats bar */
.fb-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 32px 0 48px;
}
.fb-stat {
  text-align: center;
}
.fb-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: rgb(10,213,255);
}
.fb-stat-value.red  { color: rgb(199,59,53); }
.fb-stat-value.cyan { color: rgb(10,213,255); }
.fb-stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
[data-bs-theme=light] .fb-stat-label { color: rgba(0,0,0,0.45); }

/* Charts section */
.fb-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .fb-charts { grid-template-columns: 1fr; }
}
.fb-chart-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 24px;
}
[data-bs-theme=light] .fb-chart-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.fb-chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}
[data-bs-theme=light] .fb-chart-title { color: rgba(0,0,0,0.4); }

/* Results meta */
.fb-results-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
  padding-left: 2px;
}
[data-bs-theme=light] .fb-results-meta { color: rgba(0,0,0,0.4); }

/* Accordion list */
.fb-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.fb-item:hover { border-color: rgba(10,213,255,0.25); }
[data-bs-theme=light] .fb-item {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
[data-bs-theme=light] .fb-item:hover { border-color: rgba(0,153,204,0.3); }

/* Accordion header */
.fb-item-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  color: inherit;
}
.fb-item-favicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}
.fb-item-domain {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading-color, #fff);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-bs-theme=light] .fb-item-domain { color: #1a1a1a; }

/* Badges */
.fb-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
/* Attribution badges (hero) — clase específica para no colisionar con los de accordion */
.fb-attribution .fb-badge {
  padding: 4px 10px 4px 8px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  color: #111;
  transition: opacity .15s, transform .1s;
  letter-spacing: .01em;
}
.fb-attribution .fb-badge:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; color: #111; }
.fb-badge-ransomware {
  background: rgb(199,59,53);
  color: #fff;
  border: 1px solid rgba(199,59,53,0.6);
}
.fb-badge-leaked {
  background: rgba(10,213,255,0.18);
  color: rgb(10,213,255);
  border: 1px solid rgba(10,213,255,0.35);
}
.fb-badge-industry {
  background: rgba(139,92,246,0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.35);
}
.fb-badge-creds {
  background: rgba(234,179,8,0.15);
  color: #fcd34d;
  border: 1px solid rgba(234,179,8,0.3);
}
/* Light mode badges */
[data-bs-theme=light] .fb-badge-ransomware { background: #dc2626; color: #fff; border-color: #b91c1c; }
[data-bs-theme=light] .fb-badge-leaked     { background: #0891b2; color: #fff; border-color: #0e7490; }
[data-bs-theme=light] .fb-badge-industry   { background: #7c3aed; color: #fff; border-color: #6d28d9; }
[data-bs-theme=light] .fb-badge-creds      { background: #d97706; color: #fff; border-color: #b45309; }

/* Chevron */
.fb-chevron {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  transition: transform .25s;
  flex-shrink: 0;
}
[data-bs-theme=light] .fb-chevron { color: rgba(0,0,0,0.3); }
.fb-item.open .fb-chevron { transform: rotate(90deg); }

/* Accordion body */
.fb-item-body {
  display: none;
  padding: 0 18px 18px;
}
.fb-item.open .fb-item-body { display: block; }

.fb-body-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.fb-body-field {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 12px;
}
[data-bs-theme=light] .fb-body-field { background: rgba(0,0,0,0.04); }
.fb-body-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 3px;
}
[data-bs-theme=light] .fb-body-label { color: rgba(0,0,0,0.4); }
.fb-body-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color, #fff);
}
[data-bs-theme=light] .fb-body-value { color: #1a1a1a; }

/* Revenue bar */
.fb-revenue-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
[data-bs-theme=light] .fb-revenue-bar-wrap { background: rgba(0,0,0,0.08); }
.fb-revenue-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(to right, rgba(10,213,255,0.6), rgba(10,213,255,1));
}

/* No results */
.fb-no-results {
  text-align: center;
  padding: 60px 0;
  color: rgba(255,255,255,0.3);
  font-size: 0.95rem;
}
[data-bs-theme=light] .fb-no-results { color: rgba(0,0,0,0.3); }

/* Mobile */
@media (max-width: 576px) {
  .fb-badges { display: none; }
  .fb-item-header { gap: 10px; padding: 12px 14px; }
  .fb-item-body { padding: 0 14px 14px; }
}

/* ── Map section ────────────────────────────────────────── */
.fb-map-section {
  width: 100%;
  background: #0d1117;
  border-top: 1px solid #1e2a35;
  border-bottom: 1px solid #1e2a35;
  padding: 0;
  margin-bottom: 0;
}
.fb-map-section .container {
  padding-top: 0;
  padding-bottom: 16px;
}
.fb-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}
#fb-map {
  width: 100%;
  height: 480px;
  border-radius: 6px;
  overflow: hidden;
}
.fb-map-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.fb-map-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .8rem;
  color: #667788;
}
.fb-map-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.fb-map-dot.leaked    { background: rgb(10,213,255); }
.fb-map-dot.ransomware { background: rgb(199,59,53); }

.fb-map-toggle {
  display: flex;
  gap: 4px;
  background: #111920;
  border: 1px solid #1e2a35;
  border-radius: 6px;
  padding: 3px;
}
.fb-map-btn {
  background: transparent;
  border: none;
  color: #667788;
  font-size: .75rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.fb-map-btn:hover { color: #cdd6e0; }
.fb-map-btn.active {
  background: #1e2a35;
  color: #cdd6e0;
}

/* Leaflet popup override */
.fb-popup .leaflet-popup-content-wrapper {
  background: #0d1117;
  border: 1px solid #1e2a35;
  border-radius: 8px;
  color: #cdd6e0;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.fb-popup .leaflet-popup-tip { background: #0d1117; }
.fb-popup .leaflet-popup-content { margin: 0; min-width: 220px; }
.fb-popup-inner { padding: 12px 14px; }
.fb-popup-domain { font-size: .9rem; font-weight: 700; color: #0ad5ff; margin-bottom: 6px; }
.fb-popup-domain.rw  { color: rgb(199,59,53); }
.fb-popup table { width: 100%; font-size: .78rem; border-collapse: collapse; }
.fb-popup td { padding: 2px 0; }
.fb-popup td:first-child { color: #556677; width: 42%; }
.fb-popup td:last-child  { color: #cdd6e0; font-weight: 500; }
