/*  Second line for News+ theme, where links are in Secondary Menu */
a[data-drupal-link-system-path="user/login"],
#block-secondarymenu-2 a[href="/user/login"] {
  display: none!important;
  visibility: hidden;
}

#block-weatherwidget iframe {
  max-width: 100%;
}

#block-adacompliance {
  text-align: center;
  margin-bottom: 0;
}

#block-adacompliance img {
  width: 100px;
}

/* DFP Ads - class needs added to ad blocks */
.dfp-ad {
  text-align: center;
}

.region-leaderboard .dfp-ad {
  margin-bottom: 1.5rem;
}

/* Simple Ads */
.block-simpleads {
  display: flex;
  justify-content: center;
}

/* Userway */
body .uwy.userway_p3 .userway_buttons_wrapper {
  bottom: 19px !important;
  right: -45px !important;
  width: fit-content;
  left: auto!important;
}

/* Hide the Userway widget while the Klaro cookie dialog is visible so the
   two fixed-position controls don't collide on mobile. */
body:has(#klaro-cookie-notice) .uwy,
body:has(#klaro-cookie-notice) .userway_buttons_wrapper {
  display: none !important;
}

/* When Klaro or Userway is on screen, flip the scroll-to-top button to the
   left edge so it doesn't overlap either widget in the bottom-right corner. */
body:has(#klaro-cookie-notice) #toTop,
body:has(.uwy) #toTop,
body:has(.userway_buttons_wrapper) #toTop {
  right: auto;
  left: 30px;
}

/* Klaro */

/* Container for the notice */
.klaro .cookie-notice {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  border-radius: 0 !important; /* Removes rounded corners for a clean edge */
  padding: 10px 20px !important; /* Reduces vertical height */
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1); /* Subtle shadow on top edge */
}

/* Forces the content (text and buttons) into a single horizontal row */
.klaro .cookie-notice .cn-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Ensure the text doesn't wrap too early */
.klaro .cookie-notice .cn-body p {
  margin: 0;
  flex: 1;
}

/* Adjusts the buttons to sit side-by-side */
.klaro .cookie-notice .cn-ok {
  display: flex;
  gap: 10px;
}

/* video_embed_field's ::after reserves 56.25% padding-bottom for a 16:9
   aspect-ratio slot. Klaro holds the iframe's src empty/absent until consent
   is given, so the slot renders as empty space below Klaro's contextual
   notice. Only reserve the slot when the iframe has a real (non-empty) src.
   :has() re-evaluates when Klaro sets src on accept, so the padding comes
   back and the video is visible. Klaro may keep data-src around even after
   accept, so don't key off data-src. */
.video-embed-field-responsive-video:not(:has(iframe[src]:not([src=""])))::after {
  display: none;
}
