#floating-sidebar {
  flex-grow: 0;
}

/* Override .cp-redesign base layout for inline (non-dialog) use on the article page.
   The shared stylesheet expects a dialog body as parent (100% height, flex column,
   overflow hidden) — none of that applies here. */
#news-article-wrapper .cp-redesign {
  display: block;
  height: auto;
  overflow: visible;
}

/* Ad banner on article page: soften corners + add a subtle shadow so it pairs with the
   chips/cards below, rather than reading as a hard-edged billboard. Fixed 700:115 shape
   (prevents layout shift on ad rotation); ads that don't match are cover-fitted.
   We use the padding-bottom hack rather than the CSS `aspect-ratio` property because
   percentage heights on absolutely-positioned children don't reliably resolve against a
   parent whose height is `aspect-ratio`-derived — which leaks a few px of container
   background below the image. `height: 0; padding-bottom: 16.4286%` gives the container
   a definite containing block that `height: 100%` resolves against cleanly. */
#banner-placements-container.isArticle {
  aspect-ratio: auto;
  max-width: none;
  height: 0;
  padding: 0 0 calc(115 / 700 * 100%) 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(43, 52, 55, 0.08);
  margin-bottom: 16px;
}

/* On desktop the fixed nav sits flush above the article, so the 60px of mt-60 is
   unnecessary breathing room. Narrower widths keep it — mobile nav layout still
   relies on the spacing. */
@media only screen and (min-width: 1024px) {
  #news-article-wrapper.mt-60 {
    margin-top: 12px;
  }
}

/* Financials panel — full-width section below the article body */
#article-financials-panel.cp-redesign {
  margin: 32px 0 16px 0;
  padding: 24px 0 0 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  padding-right: 0 !important;
}

#banner-placements-container {
  padding-right: 0 !important;
}

#banner-placements-container {
  position: relative;
  top: 0px;
  width: 100%;
  max-width: 1000px;
  padding-right: 20px;
}

#news-article-wrapper #main-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  width: 100%;
}

#news-article-wrapper .companies-wrapper {
  flex: 1 1 640px;
  margin-right: 0;
  width: auto;
  min-width: 0;
}

#news-article-wrapper #floating-sidebar {
  flex: 0 1 280px;
  max-width: 320px;
  width: 100%;
  margin-top: -10px;
  position: sticky;
  top: 80px; /* 60px navbar + 20px spacing */
  align-self: flex-start;
}

/* Constrain images that come from article body HTML (external news providers often
   include oversized or explicitly-sized imgs). Scoped to .news-item so sibling chrome
   — ad banner, ticker chips, sidebar preview — isn't caught by the !important rules. */
.news-article-wrapper .news-item img {
  max-width: 100% !important;
  height: auto !important;
}

#companiesWrapper {
  flex-shrink: 0;
}


#projectWrapper {
  margin-bottom: 20px;
  position: relative;
  margin-top: 0;
  top: unset;
}

#floating-sidebar h3 {
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 500;
}

#current-project {
  margin-bottom: 6px;
}

/* OTHER COMPANY NEWS SECTION */
#otherCompanyNewsWrapper {
  margin-top: 32px;
  margin-bottom: 50px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

#otherCompanyNewsWrapper > h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
}

.other-company-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.other-news {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  transition: all 0.15s ease;
}

.other-news:last-child {
  border-bottom: none;
}

.other-news:hover {
  background-color: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.other-news date {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.other-news a {
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.other-news a:hover {
  color: #0091af;
}

.load-more-other-news {
  margin-top: 20px;
  width: auto;
  padding: 12px 24px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.load-more-other-news:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.load-more-other-news:active {
  background: #f3f4f6;
}

#date-time {
  font-size: small;
  letter-spacing: 0px;
  color: #9296ad;
  padding-right: 20px;
}

#advChart
  div.qmod-component-content
  div.qmodii-component-header.qmodii-modifiers
  .v-tabs__bar.theme--dark.primary {
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
  background-color: #30a5bf !important;
}

.article-excerpt table {
  max-width: 100% !important;
}

#banner-placements-container.isArticle.isEmbedded {
  max-width: 1000px;
  top: 5px;
  width: calc(100% + 20px);
  transform: translateX(-10px);
  margin-top: -5px;
}

#company-logo {
  display: none !important;
}

#social-icons {
  display: none !important;
}

.article-share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.article-share-btn:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}

.article-share-btn:focus-visible {
  outline: 2px solid #0091af;
  outline-offset: 2px;
}

.article-share-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.article-share-label {
  display: inline-block;
}

.article-share-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  padding: 6px 10px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.article-share-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 12px;
  border: 4px solid transparent;
  border-top-color: #111827;
}

.article-share-btn.show-tooltip {
  z-index: 99999;
}

.article-share-btn.show-tooltip .article-share-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.article-share-btn.is-error .article-share-tooltip {
  background: #b91c1c;
}

.article-share-btn.is-error .article-share-tooltip::after {
  border-top-color: #b91c1c;
}

/* #modal-mini-quote {
  display: none !important;
} */

.news-item > h1 {
  margin-top: 10px !important;
}


/* This is for the project-map-preview helper that let's us embded project maps on any page */
.project-preview {
  position: relative;
  min-height: 300px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f7fb;
}

/* Ensure nothing under the overlay handles events */
.project-preview .leaflet-container,
.project-preview .leaflet-pane,
.project-preview .leaflet-top,
.project-preview .leaflet-bottom {
  pointer-events: none;
}

.project-preview .leaflet-container {
  height: 100%;
  width: 100%;
}

.project-preview__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  text-decoration: none;
  background: rgba(24, 35, 66, 0.05);
  transition: background 0.2s ease-in-out;
  z-index: 3;
  pointer-events: auto;
  cursor: pointer;
}

.project-preview__overlay:hover {
  background: rgba(24, 35, 66, 0.12);
}

.project-preview__overlay-text {
  margin: 16px;
  padding: 8px 14px;
  background: rgba(24, 35, 66, 0.9);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
}



@media only screen and (max-width: 641px) {
  #banner-placements-container {
    width: calc(100% + 20px);
    top: 0;
    margin-bottom: 0;
    transform: translateX(-10px);
    padding-right: 0px;
  }
}

@media only screen and (max-width: 1024px) {
  #news-article-wrapper #main-wrapper {
    flex-direction: column;
    gap: 24px;
  }

  #news-article-wrapper .companies-wrapper,
  #news-article-wrapper #floating-sidebar {
    flex: 1 1 auto;
    max-width: 100%;
  }

  #news-article-wrapper #floating-sidebar {
    position: static;
  }

  .other-company-news-list {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 641px) {
  .cp-ticker-strip {
    padding: 8px 10px;
    gap: 10px;
  }

  .cp-ticker-name { font-size: 13px; }
  .cp-ticker-price { font-size: 16px; }
  .cp-ticker-change { font-size: 12px; }
}

@media only screen and (min-width: 1280px) {
  #news-article-wrapper .companies-wrapper {
    margin-right: 40px;
  }
}

/* LEAD CAPTURE INLINE CARD (Desktop) */
#lead-capture-card {
  display: none;
  margin: 32px 0;
  padding: 24px;
  background: linear-gradient(135deg, #f0f9fb 0%, #e6f4f7 100%);
  border: 1px solid #b8e0e8;
  border-radius: 12px;
  max-width: 1000px;
}

#lead-capture-card .lead-capture-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#lead-capture-card .lead-capture-card-text h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: #0a4a5a;
}

#lead-capture-card .lead-capture-card-text p {
  margin: 0;
  font-size: 14px;
  color: #3d7a8a;
  line-height: 1.5;
}

#lead-capture-card-btn {
  background: linear-gradient(135deg, #0091af 0%, #007a94 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 145, 175, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

#lead-capture-card-btn:hover {
  background: linear-gradient(135deg, #007a94 0%, #006578 100%);
  box-shadow: 0 4px 16px rgba(0, 145, 175, 0.4);
  transform: translateY(-1px);
}

#lead-capture-card-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 145, 175, 0.3);
}

/* LEAD CAPTURE FOOTER (Mobile) */
#lead-capture-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 10px 16px;
  z-index: 2001;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#lead-capture-footer-btn {
  background: linear-gradient(135deg, #0091af 0%, #007a94 100%);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 145, 175, 0.3);
  max-width: 400px;
  width: 100%;
}

#lead-capture-footer-btn:hover {
  background: linear-gradient(135deg, #007a94 0%, #006578 100%);
  box-shadow: 0 4px 16px rgba(0, 145, 175, 0.4);
  transform: translateY(-1px);
}

#lead-capture-footer-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 145, 175, 0.3);
}

/* Desktop: show card, hide footer */
@media only screen and (min-width: 768px) {
  #lead-capture-card {
    display: block;
  }

  #lead-capture-footer {
    display: none;
  }
}

/* LEAD CAPTURE MODAL */
#lead-capture-modal {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#lead-capture-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.lead-capture-modal-content {
  display: flex;
  flex-direction: column;
}

.lead-capture-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.lead-capture-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.lead-capture-modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.lead-capture-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.lead-capture-modal-body {
  padding: 24px;
}

.lead-capture-description {
  margin: 0 0 20px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.lead-capture-form-group {
  margin-bottom: 20px;
}

.lead-capture-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.lead-capture-form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.lead-capture-form-group input[type="email"]:hover {
  border-color: #9ca3af;
}

.lead-capture-form-group input[type="email"]:focus {
  outline: none;
  border-color: #0091af;
  box-shadow: 0 0 0 3px rgba(0, 145, 175, 0.1);
}

.lead-capture-form-group input[type="email"]::placeholder {
  color: #9ca3af;
}

.lead-capture-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-capture-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lead-capture-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #0091af;
}

.lead-capture-checkbox label {
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

.lead-capture-checkbox label a {
  color: #0091af;
  text-decoration: none;
}

.lead-capture-checkbox label a:hover {
  text-decoration: underline;
}

.lead-capture-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}

.lead-capture-btn-cancel {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lead-capture-btn-cancel:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.lead-capture-btn-submit {
  padding: 10px 20px;
  border: none;
  background: linear-gradient(135deg, #0091af 0%, #007a94 100%);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lead-capture-btn-submit:hover {
  background: linear-gradient(135deg, #007a94 0%, #006578 100%);
  box-shadow: 0 2px 8px rgba(0, 145, 175, 0.3);
}

.lead-capture-btn-submit:active {
  transform: translateY(1px);
}

.lead-capture-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lead-capture-error {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
}
