/* =========================================================
   GLPHTC Sandbox - Modern Storefront Custom CSS
   https://glphtsandbox.catalog.instructure.com/
   GLPHTC logo colors: navy #064469, orange #F7A41D,
   aqua #66C7C7. Search sits in a navy band; lively cards.
   Keep !important so these override the Theme Editor.
   ========================================================= */

/* HEADER BAR: white, black links (Login, cart) */
[data-customizationid="header"] > div:first-child {
  background-color: #ffffff !important;
}

[data-customizationid="header"] a,
[data-customizationid="login-link"] {
  color: #000000 !important;
}

/* HIDE THE CANVAS CATALOG LOGO (header and footer)
   visibility:hidden keeps its space, so Login, the cart,
   and the footer copyright stay where they are. */
[data-customizationid="linked-headerimage"] {
  visibility: hidden !important;
}

/* COVER IMAGE AREA: white behind the GLPHTC logo and welcome text */
[data-customizationid="cover-image-section"] {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* LOGO LEFT, BANNER TEXT RIGHT
   Lines the logo up with the page content and puts the
   welcome text beside it instead of over it. */
[data-customizationid="cover-image-section"] {
  display: flex !important;
  align-items: center !important;
  gap: 48px !important;
  max-width: 1188px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 16px 24px !important;
  box-sizing: border-box !important;
  line-height: 1.6 !important;
}

/* Let the cover area grow to fit the text */
[data-customizationid="header"] div:has(> [data-customizationid="cover-image-section"]) {
  height: auto !important;
}

[data-customizationid="cover-image-section"] > img {
  flex: 0 0 auto !important;
  width: auto !important;
  height: 150px !important;
}

/* Take the text out of its overlay so it sits beside the logo */
[data-customizationid="cover-image-section"] > div {
  position: static !important;
  inset: auto !important;
  flex: 1 1 auto !important;
}

[data-customizationid="cover-image-section"] > div * {
  max-width: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

[data-customizationid="cover-image-section"] div[style*="text-align"] {
  text-align: left !important;
}

/* One consistent text size, navy bold links */
[data-customizationid="cover-image-section"] > div span,
[data-customizationid="cover-image-section"] > div a {
  font-size: 17px !important;
}

[data-customizationid="cover-image-section"] a {
  color: #064469 !important;
  font-weight: 700 !important;
}

/* Collapse runs of blank lines left over in the banner text */
[data-customizationid="cover-image-section"] br + br {
  display: none !important;
}

/* DESKTOP: BIGGER LOGO, LESS EMPTY SPACE ABOVE IT
   - Pulls the logo area up into the empty space left by the
     hidden Canvas Catalog logo (Login and the cart still work).
   - Crops the white margins built into the logo image, so the
     logo itself is larger without making the area taller. */
@media (min-width: 768px) {
  [data-customizationid="header"] div:has(> [data-customizationid="cover-image-section"]) {
    overflow: visible !important;
    margin-top: -50px !important;
    position: relative !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background: transparent !important;
  }

  [data-customizationid="cover-image-section"] {
    background: transparent !important;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
  }

  [data-customizationid="cover-image-section"] a {
    pointer-events: auto !important;
  }

  [data-customizationid="cover-image-section"] > img {
    width: 520px !important;
    height: 132px !important;
    object-fit: cover !important;
    object-position: 50% 46% !important;
  }
}

/* PHONES: stack the logo above centered text */
@media (max-width: 767px) {
  [data-customizationid="cover-image-section"] {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
  }

  [data-customizationid="cover-image-section"] > img {
    height: 110px !important;
  }

  [data-customizationid="cover-image-section"] div[style*="text-align"] {
    text-align: center !important;
  }
}

/* AQUA STRIPE under the cover image
   (replaces the navy band from the Theme Editor) */
[data-customizationid="header"] > div:last-child {
  border-top: 12px solid #66C7C7 !important;
  border-bottom-width: 0 !important;
}

/* NAVY BAND behind Listings, search, and filters,
   then a pale blue-gray behind the listing cards */
body:has(#home-page) #content {
  background: linear-gradient(180deg, #064469 0px, #064469 200px, #eef3f6 200px) !important;
}

#content > div,
#home-page {
  background: transparent !important;
}

/* TITLES: white on navy, with a short orange underline */
#content h1 {
  color: #ffffff !important;
  font-size: 2.6rem !important;
}

#content h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 5px;
  margin-top: 10px;
  background: #F7A41D;
  border-radius: 3px;
}

#content h2 {
  color: #ffffff !important;
}

/* PHONES: search and Filters stack, so the band is taller
   and "Browse Listings" sits below it in navy */
@media (max-width: 767px) {
  body:has(#home-page) #content {
    background: linear-gradient(180deg, #064469 0px, #064469 265px, #eef3f6 265px) !important;
  }

  #content h2 {
    color: #064469 !important;
  }
}

/* SEARCH AND FILTERS: white field, aqua buttons */
[data-customizationid="search-form"] {
  background-color: transparent !important;
}

[data-customizationid="search-form"] input {
  border: 2px solid #ffffff !important;
}

[data-customizationid="search-form"] button,
[data-customizationid="search-form"] button span,
[data-customizationid="filter-button"],
[data-customizationid="filter-button"] span {
  background-color: #fffff !important;
  color: #1d1d1d !important;
  border-color: #fffff !important;
}

/* LISTING CARDS: rounded, shadowed, orange top edge,
   and a gentle lift when hovered */
[data-customizationid="product-card"] {
  border: none !important;
  border-top: 6px solid #F7A41D !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

[data-customizationid="product-card"]:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18) !important;
}

[data-customizationid="product-card-image"] {
  border-radius: 10px !important;
  overflow: hidden !important;
}

[data-customizationid="product-card-type"] {
  color: #0E6E73 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

[data-customizationid="product-card-title"] {
  color: #064469 !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-customizationid="product-card"],
  [data-customizationid="product-card"]:hover {
    transition: none !important;
    transform: none !important;
  }
}

/* FOOTER: white, with a navy line on top */
[data-customizationid="footer"] {
  background-color: #ffffff !important;
}

[data-customizationid="footer"] > div:first-child {
  border-bottom: 6px solid #064469 !important;
}

/* Added by Boxcar Studio for columned formatting */
.wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10%;
}

.wrapper .column {
  flex: 1;
  min-width: 400px;
}

/* =========================================================
   LISTING DETAIL PAGES (a course or program page)
   ========================================================= */

/* GLPHTC LOGO IN THE HEADER on every page that has no cover image
   (listing pages, cart, login). The home page keeps the larger
   logo in its cover image area instead.
   The image URL is the GLPHTC logo already uploaded to the sandbox's
   cover image. If that cover image is ever replaced, update the URL. */
body:not(:has([data-customizationid="cover-image-section"])) [data-customizationid="header"] [data-customizationid="linked-headerimage"] {
  visibility: visible !important;
  display: block !important;
  width: 280px !important;
  height: 72px !important;
  min-height: 72px !important;
  background-image: url("https://catalog-prod-s3-gallerys3-skf57zr7pimb.s3.amazonaws.com/production/cover_images/778c33f7-8a8f-421d-9cdf-136eb437a1fd.png") !important;
  background-size: 280px auto !important;
  background-position: 0 -17px !important;
  background-repeat: no-repeat !important;
}

/* SOFT BACKGROUND instead of stark white */
body:has(#product-page) #content {
  background: #eef3f6 !important;
}

/* SECTIONS ("About This Program", "Courses available...", sign-up)
   as white cards with an orange top edge */
#product-page section {
  background: #ffffff !important;
  border-top: 6px solid #F7A41D !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(6, 68, 105, 0.08) !important;
  padding: 24px 28px !important;
  margin-bottom: 24px !important;
}

/* HEADINGS: navy */
#product-page h1,
#product-page h2 {
  color: #064469 !important;
}

/* "PROGRAM" / "COURSE" LABEL: deep teal (readable on light backgrounds) */
[data-customizationid="product-details-type"],
[data-customizationid="product-details-type"] * {
  color: #0E6E73 !important;
}

/* PRICE: bold navy */
[data-customizationid="product-details-price"],
[data-customizationid="product-details-price"] * {
  color: #064469 !important;
  font-weight: 700 !important;
}

/* ENROLL BUTTON: navy */
[data-customizationid="enroll-button"] span {
  background-color: #064469 !important;
  border-color: #064469 !important;
}

/* LISTING IMAGE: rounded corners and a soft shadow */
[data-customizationid="product-details-image"] img {
  border-radius: 14px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15) !important;
}

/* HERO BAND (like the legacy listing page): a full-width navy band
   behind the listing image, title, price, and Enroll buttons.
   The box-shadow trick stretches the band edge to edge and
   always matches the height of the content. */
#product-page span:has(> section) > span:first-child {
  background: #064469 !important;
  box-shadow: 0 0 0 100vmax #064469 !important;
  clip-path: inset(-36px -100vmax) !important;
  margin-bottom: 72px !important;
}

#product-page span:has(> section) > span:first-child h1 {
  color: #ffffff !important;
}

#product-page span:has(> section) > span:first-child [data-customizationid="product-details-type"],
#product-page span:has(> section) > span:first-child [data-customizationid="product-details-type"] *,
#product-page span:has(> section) > span:first-child [data-customizationid="product-details-price"],
#product-page span:has(> section) > span:first-child [data-customizationid="product-details-price"] *,
#product-page span:has(> section) > span:first-child [data-customizationid="product-info-item-list"],
#product-page span:has(> section) > span:first-child [data-customizationid="product-info-item-list"] * {
  color: #ffffff !important;
}

/* Enroll stands out in aqua on the navy band */
#product-page span:has(> section) > span:first-child [data-customizationid="enroll-button"] span {
  background-color: #66C7C7 !important;
  border-color: #66C7C7 !important;
  color: #1d1d1d !important;
}

#product-page span:has(> section) > span:first-child [data-customizationid="enroll-button"] * {
  color: #1d1d1d !important;
  fill: #1d1d1d !important;
}

/* PHONES: smaller listing title */
@media (max-width: 767px) {
  #product-page h1 {
    font-size: 1.9rem !important;
  }
}
/* ==================================================
   GLPHTC HEADER LINKS AND CONTACT INFORMATION
   ================================================== */

/* Arrange the welcome message above all three links */
:root body div:has(> a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]):has(> a[href="mailto:glphtc@umich.edu"]) {
  display: grid !important;
  grid-template-columns: auto auto auto !important;
  align-items: center !important;
  justify-content: start !important;
  column-gap: 40px !important;
  row-gap: 14px !important;
  min-width: 0 !important;
}

/* Welcome message */
:root body div:has(> a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]):has(> a[href="mailto:glphtc@umich.edu"]) > p {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #064469 !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

/* Website and newsletter buttons */
:root body a[href="https://www.rvphtc.org/"],
:root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"] {
  position: relative !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  background: #064469 !important;
  color: #ffffff !important;
  border: 1px solid #064469 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  width: auto !important;
  height: auto !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Remove earlier dividers placed before buttons */
:root body a[href="https://www.rvphtc.org/"]::before,
:root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]::before {
  content: none !important;
}

/* Matching vertical lines after both buttons */
:root body a[href="https://www.rvphtc.org/"]::after,
:root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]::after {
  content: "" !important;
  position: absolute !important;
  right: -21px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 1px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: #064469 !important;
  pointer-events: none !important;
}

/* Questions and email address */
:root body a[href="mailto:glphtc@umich.edu"] {
  position: relative !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  background: transparent !important;
  color: #064469 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 0 0 26px !important;
  width: auto !important;
  height: auto !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-align: left !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Small envelope beside Questions */
:root body a[href="mailto:glphtc@umich.edu"]::before {
  content: "\2709" !important;
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: 0 !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #064469 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

/* No divider after Questions */
:root body a[href="mailto:glphtc@umich.edu"]::after {
  content: none !important;
}

/* Underline the email address */
:root body a[href="mailto:glphtc@umich.edu"] u {
  color: inherit !important;
  font: inherit !important;
  text-decoration: underline !important;
}

/* Visible keyboard focus for all three links */
:root body a[href="https://www.rvphtc.org/"]:focus-visible,
:root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]:focus-visible,
:root body a[href="mailto:glphtc@umich.edu"]:focus-visible {
  outline: 3px solid #064469 !important;
  outline-offset: 4px !important;
}

/* Mobile screen settings */
@media (max-width: 767px) {
  :root body div:has(> a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]):has(> a[href="mailto:glphtc@umich.edu"]) {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: start !important;
    gap: 16px !important;
    width: 100% !important;
  }

  :root body a[href="https://www.rvphtc.org/"],
  :root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"] {
    max-width: 100% !important;
    white-space: normal !important;
  }

  :root body a[href="https://www.rvphtc.org/"]::after,
  :root body a[href="https://mailchi.mp/d2d983848c0e/sign-up-form"]::after {
    content: none !important;
  }
}
