/* =========================================================
   CMC WIC display style for the Celeste (Portal) EasyDNNnews theme
   Colors and fonts match the site (glend-custom.css, section 36 print palette):
     Purple #89479C (white text 6.1:1)   Darker purple #6E3A7F (hover)
     Teal #42BFB0   Green #7ACB53   Orange #F6A01A   Text #24212B
   Corners match the site: cards 16px, small items 12px / 8px, large panels 24px.
   Select it per module: Module Settings > Theme "Celeste (Portal)" > Display style "cmcwic.css".
   ========================================================= */

/* ---------- 1. Colors, fonts, corner sizes ---------- */
.eds_news_Celeste.eds_style_predefined_cmcwic,
.EDN_search.theme_Celeste.cmcwic,
.qtip.edn_calendarbox_Celeste.cmcwic
{
  --celeste-news-primary: #89479C;
  --celeste-news-primary-dark: #6E3A7F;
  --celeste-news-secondary: #6E3A7F;
  --celeste-news-secondary-dark: #5B2C73;
  --celeste-news-accent: #42BFB0;
  --celeste-news-eyebrow: #89479C;
  --celeste-news-heading: #24212B;
  --celeste-news-text: #24212B;
  --celeste-news-muted: #5B5866;
  --celeste-news-surface: #FFFFFF;
  --celeste-news-background-soft: #F3EDF5;
  --celeste-news-surface-warm: #F7F5FA;
  --celeste-news-border: #E2DEE8;
  --celeste-news-border-strong: #C9C3D3;
  --celeste-news-white: #FFFFFF;
  --celeste-news-black: #000000;
  --celeste-news-success: #2E7D32;
  --celeste-news-warning: #F6A01A;
  --celeste-news-error: #B3261E;
  --celeste-news-font-heading: "Inter Tight", Arial, sans-serif;
  --celeste-news-font-body: "Nunito Sans", Arial, sans-serif;
  --celeste-news-radius: 16px;
  --celeste-news-radius-sm: 12px;
  --celeste-news-radius-lg: 24px;
}

/* ---------- 2. Corners: same sizes as the rest of the site ---------- */
/* Listing: card grid (three columns) and media list */
.eds_news_Celeste.eds_style_predefined_cmcwic .eds_celesteGridCard,
.eds_news_Celeste.eds_style_predefined_cmcwic .eds_newsCard {
  border-radius: 16px;
}
/* Details: main image frame (was 20px) */
.eds_news_Celeste.eds_style_predefined_cmcwic .eds_news_Celeste__articleMedia {
  border-radius: 16px;
}
/* Categories menu box (was about 11px) */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_categoryMenu .EDN_module_box {
  border-radius: 16px;
}
/* Archive box (was about 14px) and its year and month rows */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list {
  border-radius: 16px;
}
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list > .edn_archive_menu_wrapper .node.level_0 > .edn_archiveByYear,
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list > .edn_archive_menu_wrapper .node.level_1 > div {
  border-radius: 8px;
}

/* ---------- 3. Archive ---------- */
/* Remove the grey box around the archive, so it is one white card like the Categories menu */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* Same shadow as the Categories menu box */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list {
  box-shadow: 0 0.55rem 1.4rem color-mix(in srgb, var(--celeste-news-heading) 7%, transparent);
}
/* Month links the same size as the year links (0.9rem) */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list .node.level_1 > div .edn_archiveLink {
  font-size: 0.9rem;
}

/* Archive heading, icon and padding the same size as the Categories box */
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list {
  padding: 0.75rem 0.8rem 0.8rem;
}
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list > h3.edn_module_title {
  gap: 0.72rem;
  min-height: 2.75rem;
  padding: 0 0 0.68rem;
  font: 650 1.28rem/1 var(--celeste-news-font-heading);
  letter-spacing: -0.035em;
}
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list > h3.edn_module_title::before {
  flex: 0 0 2.05rem;
  width: 2.05rem;
  height: 2.05rem;
  color: var(--celeste-news-primary);
  font-size: 0.88rem;
  border-radius: 0.48rem;
}
.eds_news_Celeste.eds_style_predefined_cmcwic.eds_subCollection_calendar.eds_template_Archive_Default .archive_list > .edn_archive_menu_wrapper {
  margin-top: 0.75rem;
}

/* ---------- 4. Details page ---------- */
/* No extra space above the article title (was clamp(2rem, 5vw, 3rem)) */
.eds_news_Celeste.eds_style_predefined_cmcwic .eds_news_Celeste--detailDefault .eds_news_Celeste__articleHeadline {
  margin-top: 0;
}

/* ---------- 5. Article pages: hide the Tips page intro sections ----------
   When an article is open (the details template is on the page), hide the two
   Content Builder sections above it: #main-content (intro) and the stage links
   (#tips on the English page, #topics on the Spanish page).
   #main-content stays in the page as an empty, zero-height anchor so the
   "Skip to main content" link still lands just above the article.
   Browsers without :has() support simply keep showing the sections. */
body:has(.eds_template_Details_Article_Default) #main-content {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}
body:has(.eds_template_Details_Article_Default) #main-content > .is-boxes,
body:has(.eds_template_Details_Article_Default) #tips,
body:has(.eds_template_Details_Article_Default) #topics {
  display: none;
}

/* Same space above the article in both languages. The Content Builder section
   holding the module has a 92px top margin on the English page and none on the
   Spanish page (#blog), so reset that margin and use the site's section padding. */
body:has(.eds_template_Details_Article_Default) .is-section:has(.eds_template_Details_Article_Default) {
  padding-top: 56px;
}
body:has(.eds_template_Details_Article_Default) .is-section:has(.eds_template_Details_Article_Default) > .is-boxes > .is-container {
  margin-top: 0;
}
@media (min-width: 992px) {
  body:has(.eds_template_Details_Article_Default) .is-section:has(.eds_template_Details_Article_Default) {
    padding-top: 88px;
  }
}

/* ---------- 6. Details page: image slider (main image + gallery images) ----------
   Built by the script at the end of News/Details_Article_Default.htm when an
   article has gallery images. Two images get "English" / "Español" buttons;
   more images get dots. */
.eds_news_Celeste .cmcwic-slider {
  position: relative;
}
.eds_news_Celeste .cmcwic-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.eds_news_Celeste .cmcwic-slider__track::-webkit-scrollbar {
  display: none;
}
.eds_news_Celeste .cmcwic-slider__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  background: var(--celeste-news-surface);
}
.eds_news_Celeste .cmcwic-slider__slide picture {
  display: block;
  width: 100%;
}
.eds_news_Celeste.eds_news_Celeste--detailDefault .cmcwic-slider__slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 1000px);
  aspect-ratio: auto;
  object-fit: contain;
}
.eds_news_Celeste .cmcwic-slider__btn {
  position: absolute;
  top: calc(50% - 26px);
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #89479C;
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(36, 33, 43, 0.12), 0 6px 16px rgba(36, 33, 43, 0.16);
  cursor: pointer;
}
.eds_news_Celeste .cmcwic-slider__btn:hover {
  color: #FFFFFF;
  background: #89479C;
}
.eds_news_Celeste .cmcwic-slider__btn--prev { left: 12px; }
.eds_news_Celeste .cmcwic-slider__btn--next { right: 12px; }
.eds_news_Celeste .cmcwic-slider__btn[disabled] {
  opacity: 0;
  pointer-events: none;
}
.eds_news_Celeste .cmcwic-slider__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 12px 4px;
  background: var(--celeste-news-white);
}
/* Two images: "English" / "Español" buttons */
.eds_news_Celeste .cmcwic-slider__pill {
  min-height: 36px;
  padding: 6px 16px;
  color: #89479C;
  font: 700 0.9rem/1.2 var(--celeste-news-font-body);
  background: #FFFFFF;
  border: 2px solid #89479C;
  border-radius: 999px;
  cursor: pointer;
}
.eds_news_Celeste .cmcwic-slider__pill:hover {
  background: #F3EDF5;
}
.eds_news_Celeste .cmcwic-slider__pill[aria-current="true"] {
  color: #FFFFFF;
  background: #89479C;
}
/* Three or more images: dots (24px tap target, 10px dot) */
.eds_news_Celeste .cmcwic-slider__dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.eds_news_Celeste .cmcwic-slider__dot::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid #89479C;
  border-radius: 50%;
}
.eds_news_Celeste .cmcwic-slider__dot[aria-current="true"]::before {
  background: #89479C;
}
.eds_news_Celeste .cmcwic-slider__btn:focus-visible,
.eds_news_Celeste .cmcwic-slider__pill:focus-visible,
.eds_news_Celeste .cmcwic-slider__dot:focus-visible {
  outline: 3px solid #6E3A7F;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .eds_news_Celeste .cmcwic-slider__btn {
    width: 40px;
    height: 40px;
  }
  .eds_news_Celeste .cmcwic-slider__btn--prev { left: 8px; }
  .eds_news_Celeste .cmcwic-slider__btn--next { right: 8px; }
}
