/* Kracker OSINT drawer — independent of start.me */
:root {
  --osint-accent: #1a6bb5;
  --osint-panel-bg: #12161c;
  --osint-panel-fg: #e8eef5;
  --osint-muted: #8b9bb0;
  --osint-border: rgba(255, 255, 255, 0.08);
  --osint-rail-w: 13.5rem;
  --osint-tools-w: min(32rem, 92vw);
  --osint-z: 1080;
}

.osint-fab {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: calc(var(--osint-z) + 2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--osint-accent);
  color: #fff;
  font: 600 0.85rem/1 Montserrat, system-ui, sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.osint-fab:hover,
.osint-fab:focus-visible {
  background: #155a9a;
  transform: translateY(-1px);
  outline: none;
}
.osint-fab[aria-expanded="true"] {
  background: #0f3f6c;
}

.osint-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--osint-z);
  pointer-events: none;
  visibility: hidden;
}
.osint-drawer[hidden] {
  display: none !important;
}
.osint-drawer.is-open {
  display: block !important;
  pointer-events: auto;
  visibility: visible;
}

.osint-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.osint-drawer.is-open .osint-drawer__backdrop {
  opacity: 1;
}

.osint-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: calc(var(--osint-rail-w) + var(--osint-tools-w));
  max-width: 100%;
  background: var(--osint-panel-bg);
  color: var(--osint-panel-fg);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.osint-drawer.is-open .osint-drawer__panel {
  transform: translateX(0);
}

.osint-rail {
  flex: 0 0 var(--osint-rail-w);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--osint-border);
  background: #0c1015;
  min-width: 0;
}
.osint-rail__head {
  padding: 1rem 0.85rem 0.65rem;
  border-bottom: 1px solid var(--osint-border);
}
.osint-rail__head h2 {
  margin: 0;
  font: 700 0.95rem/1.2 Montserrat, system-ui, sans-serif;
}
.osint-rail__head p {
  margin: 0.35rem 0 0;
  color: #8b9bb0;
  font-size: 0.72rem;
  line-height: 1.4;
}
.osint-search {
  margin: 0.75rem 0.65rem 0.5rem;
}
.osint-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--osint-border);
  border-radius: 0.4rem;
  background: #171c24;
  color: var(--osint-panel-fg);
  font-size: 0.8rem;
}
.osint-search input:focus {
  outline: 2px solid rgba(26, 107, 181, 0.55);
  outline-offset: 0;
}
.osint-cats {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 1rem;
  overflow: auto;
  flex: 1;
}
.osint-cats button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--osint-panel-fg);
  padding: 0.4rem 0.85rem 0.45rem;
  font: 500 0.78rem/1.25 Montserrat, system-ui, sans-serif;
  cursor: pointer;
  border-left: 3px solid transparent;
  display: block;
}
.osint-cats button:hover,
.osint-cats button:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
.osint-cats button.is-active {
  background: rgba(26, 107, 181, 0.18);
  border-left-color: var(--osint-accent);
  color: #fff;
}
.osint-cat__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.osint-cat__label {
  min-width: 0;
}
.osint-cats .osint-count {
  color: var(--osint-muted);
  font-weight: 400;
  font-size: 0.7rem;
  flex: 0 0 auto;
}
.osint-cat__hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.3;
  color: #8aa4bc;
}

.osint-tools {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.osint-tools__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--osint-border);
}
.osint-tools__head-text {
  min-width: 0;
  flex: 1;
}
.osint-tools__head h3 {
  margin: 0;
  font: 650 0.95rem/1.2 Montserrat, system-ui, sans-serif;
}
.osint-tools__desc {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 400;
  color: #8aa4bc;
}
.osint-close {
  border: 0;
  background: transparent;
  color: var(--osint-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  flex: 0 0 auto;
}
.osint-close:hover,
.osint-close:focus-visible {
  color: #fff;
  outline: none;
}
.osint-tools__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  overflow: auto;
  flex: 1;
  display: grid;
  /* Colonne più larghe + righe ad altezza contenuto (descrizioni intere) */
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  grid-auto-rows: minmax(min-content, auto);
  gap: 0.5rem;
  align-content: start;
}
.osint-tool {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.45rem;
  text-decoration: none;
  color: var(--osint-panel-fg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  min-height: 2.6rem;
  height: 100%;
  box-sizing: border-box;
}
.osint-tool:hover,
.osint-tool:focus-visible {
  background: rgba(26, 107, 181, 0.2);
  border-color: rgba(26, 107, 181, 0.35);
  color: #fff;
  outline: none;
}
/* Slot fisso: la lettera c’è subito; l’img si sovrappone senza toccare il layout */
.osint-tool__icon-slot {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 0.15rem;
  border-radius: 3px;
  overflow: hidden;
  background: #d9e8f6;
}
.osint-tool__icon-slot__fb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1a6bb5;
  line-height: 1;
}
.osint-tool__icon-slot img {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.osint-tool__icon-slot.has-icon img {
  opacity: 1;
}
.osint-tool__icon-slot.has-icon .osint-tool__icon-slot__fb {
  opacity: 0;
}
.osint-tool__title {
  font-size: 0.78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  /* titolo EN: max 2 righe; la descrizione sotto può espandersi */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.osint-tool__text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.osint-tool__hint {
  font-size: 0.68rem;
  line-height: 1.35;
  font-weight: 400;
  color: #8aa4bc;
  overflow-wrap: anywhere;
  /* niente clamp: la cella cresce con il testo (griglia dinamica) */
}
.osint-empty {
  padding: 1.5rem 1rem;
  color: var(--osint-muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .osint-drawer__panel {
    width: 100%;
    flex-direction: column;
  }
  .osint-rail {
    flex: 0 0 auto;
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid var(--osint-border);
  }
  .osint-fab {
    right: 0.75rem;
    bottom: 0.85rem;
  }
}

body.osint-drawer-open {
  overflow: hidden;
}
