/* threats-integrated.css - Addon for threats section in main app */
/* v1.3 - Keeps sidebar visible, overrides section-body-addon.css */

/* OVERRIDE: Keep the 2-column layout with sidebar */
body.threats-mode .container {
  grid-template-columns: 200px 1fr !important;
  display: grid !important;
}

body.threats-mode .news-sidebar {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
}

/* Force articles container to second column */
body.threats-mode #articles-container,
body.threats-mode .articles-grid {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: block !important;
}

/* SVG container */
#th-svg {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  display: block !important;
}

/* Threats map sizing for embedded view */
.threats-mode .threats-map {
  height: 55vh;
  min-height: 450px;
  max-height: 600px;
  /* Legenda ora è sotto, non serve più padding-right */
  box-sizing: border-box;
}

/* Actor group headers in list */
.threats-actor-group {
  margin-top: 1.5rem;
}

.threats-actor-group:first-child {
  margin-top: 0;
}

.threats-actor-header {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid;
  background: rgba(0,0,0,0.02);
}

.threats-actor-header.actor-russia {
  color: #c41e3a;
  border-color: #c41e3a;
}

.threats-actor-header.actor-ukraine {
  color: #b8860b;
  border-color: #d4a000;
}

.threats-actor-header.actor-eunato {
  color: #326891;
  border-color: #326891;
}

.threats-actor-header.actor-usa {
  color: #6a3bd1;
  border-color: #6a3bd1;
}

.threats-actor-header.actor-unknown {
  color: #666;
  border-color: #999;
}

/* Use same source style as timeline articles */
.threats-item .article-sources {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .threats-mode .threats-map {
    height: auto;
    min-height: 380px;
    padding-bottom: 20px;
  }
}

@media (max-width: 768px) {
  /* On mobile, hide sidebar for threats to give more space */
  body.threats-mode .container {
    grid-template-columns: 1fr !important;
  }
  
  body.threats-mode .news-sidebar {
    display: none !important;
  }
  
  .threats-mode .threats-controls {
    flex-direction: column;
  }
  
  .threats-mode .thctl {
    width: 100%;
  }
  
  .threats-mode .thctl select,
  .threats-mode .thctl input {
    width: 100%;
    min-width: auto;
  }
  
  .threats-mode .thctl-grow input {
    width: 100%;
    min-width: auto;
  }
}
