:root {
  --brand-gold: #F7B20F;
  --brand-dark-blue: #0D2F44;
  --brand-bg-light: #F7EFE4;
}

/* Base styles */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--brand-bg-light);
  color: var(--brand-dark-blue);
  margin: 0;
  padding: 0;
}

/* Sidebar */
.main-sidebar {
  background-color: var(--brand-dark-blue) !important;
  color: var(--brand-bg-light);
}

/* Brand link */
.brand-link {
  background-color: var(--brand-dark-blue);
  color: var(--brand-bg-light) !important;
  padding: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary{
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
}
.btn-outline-primary{
  border-color: var(--brand-gold);
  color:var(--brand-gold);
}
.btn-primary:hover{
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
}
.btn-outline-primary:hover{
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
}

.fi-center {
  vertical-align: middle; /* Vertically center with text */
  font-size: smaller;      /* Make slightly smaller than surrounding text */
  margin-right: 0.4em;     /* Optional: space between icon and text */
  line-height: 1;          /* Ensure no extra vertical spacing */
}

.text-decoration-none{
  color: var(--brand-gold) !important;
}

/* Sidebar nav links */
.nav-sidebar .nav-link {
  color: var(--brand-bg-light);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background-color 0.2s, color 0.2s;
}

.nav-sidebar .nav-link .bi {
  font-size: 1.25rem;
  min-width: 24px;
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link.active {
  background-color: var(--brand-gold) !important;
  color: var(--brand-bg-light) !important;
}

/* Buttons */
.btn-brand, .btn-brand-white-text {
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-brand {
  background-color: var(--brand-gold);
  color: var(--brand-dark-blue);
}

.btn-brand:hover {
  background-color: var(--brand-gold);
  box-shadow: 0 0 8px rgba(247,178,15,0.7);
}

.btn-brand-white-text {
  background-color: var(--brand-gold);
  color: white;
}

.btn-brand-white-text:hover {
  background-color: var(--brand-gold);
  color: white;
  box-shadow: 0 0 8px rgba(247,178,15,0.7);
}

.content-wrapper {
  background-color: var(--brand-bg-light) !important;
}
.bg-dark{
  background-color: var(--brand-dark-blue) !important;
}
.active{
  background-color: var(--brand-gold) !important;
}

/* Highlight classes for AI/timeline reports */
.highlight-ip { color: #2563EB; font-weight: 500; } /* blue */
.highlight-tls { color: #7C3AED; font-weight: 500; } /* indigo */
.highlight-asn { color: #059669; font-weight: 500; } /* green */
.highlight-threat { color: #DC2626; font-weight: 500; } /* red */
.pre-wrap { white-space: pre-wrap; }

/* Overlay for mobile sidebar */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1050;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ai output */

/* --- Markdown (AI summary) formatting cleanup --- */
.ai-summary {
  white-space: normal !important;
}


/* Mobile sidebar toggle button */
#sidebar-toggle {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--brand-gold);
  color: var(--brand-dark-blue);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1090;
  box-shadow: 0 6px 18px rgba(13,47,68,0.12);
}

/* Timeline styles (for Security Reports) */
.cd-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
  overflow: visible;
}

.cd-timeline__container {
  position: relative;
  padding: 1rem 0;
}

.cd-timeline__container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 4px;
  background: var(--brand-gold);
  border-radius: 2px;
  z-index: 1;
}

.cd-timeline__block {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
  box-sizing: border-box;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  z-index: 2;
}

.cd-timeline__block.is-visible {
  opacity: 1;
  transform: none;
}

.cd-timeline__block:nth-child(odd) {
  left: 0;
  flex-direction: row-reverse;
  text-align: right;
}

.cd-timeline__block:nth-child(even) {
  left: 50%;
  text-align: left;
}

.cd-timeline__img {
  position: absolute;
  top: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--brand-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(247,178,15,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  z-index: 3;
}

.cd-timeline__block:nth-child(odd) .cd-timeline__img { right: -20px; }
.cd-timeline__block:nth-child(even) .cd-timeline__img { left: -20px; }

.cd-timeline__content {
  background: var(--brand-bg-light);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 90%;
  position: relative;
}

.cd-timeline__title {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--brand-dark-blue);
}

.cd-timeline__description {
  color: #555;
  font-size: 0.95rem;
}

.cd-timeline__date {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cd-timeline__block,
  .cd-timeline__block:nth-child(even),
  .cd-timeline__block:nth-child(odd) {
    width: 100% !important;
    left: 0 !important;
    text-align: left !important;
    padding-left: 3.5rem;
    margin-bottom: 3rem;
  }

  .cd-timeline__img {
    position: absolute !important;
    left: 0 !important;
    top: 0.5rem !important;
  }
}


/* Mobile sidebar adjustments */
@media (max-width: 991px) {
  .main-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 70px; /* collapsed width, icons only */
    height: 100vh !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1080;
  }

  .main-sidebar.show {
    transform: translateX(0);
    width: 250px; /* full width when open */
  }

  .main-sidebar .nav-link p {
    display: none; /* hide text in collapsed state */
  }

  .main-sidebar.show .nav-link p {
    display: inline; /* show text when expanded */
  }

  .content-wrapper {
    margin-left: 70px !important; /* adjust content margin */
    transition: margin-left 0.3s ease;
  }

  .main-sidebar.show ~ .content-wrapper {
    margin-left: 250px !important;
  }
}
