:root {
  --channels-color-gray: #979799;
  --channels-color-gray--lightest: #f4f4f4;
  --channels-color-black: #000;
  --channels-color-white: #fff;
  --channels-color-red: #ed1b2f;
  --channels-sans-bold: McGillSans-Bold, Helvetica, Helvetica Neue, Arial, sans-serif;
  --channels-serif-medium: McGillSerif-Medium, Helvetica, Helvetica Neue, Arial, serif;
  --channels-serif-regular: McGillSerif-regular, Helvetica, Helvetica Neue, Arial, serif;
  --channels-space-unit: 1em;
  --channels-space-large: calc(var(--channels-space-unit)*2);
  --channels-gap: 1em;
  --channels-icon--calendar: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" class="ionicon" width="24" height="24" viewBox="0 0 512 512"><path d="M480 128a64 64 0 0 0-64-64h-16V48.45c0-8.61-6.62-16-15.23-16.43A16 16 0 0 0 368 48v16H144V48.45c0-8.61-6.62-16-15.23-16.43A16 16 0 0 0 112 48v16H96a64 64 0 0 0-64 64v12a4 4 0 0 0 4 4h440a4 4 0 0 0 4-4zM32 416a64 64 0 0 0 64 64h320a64 64 0 0 0 64-64V179a3 3 0 0 0-3-3H35a3 3 0 0 0-3 3zm344-208a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24z"/></svg>');
  --channels-icon--location: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" class="ionicon" width="24" height="24" viewBox="0 0 512 512"><circle cx="256" cy="192" r="32"/><path d="M256 32c-88.22 0-160 68.65-160 153 0 40.17 18.31 93.59 54.42 158.78 29 52.34 62.55 99.67 80 123.22a31.75 31.75 0 0 0 51.22 0c17.42-23.55 51-70.88 80-123.22C397.69 278.61 416 225.19 416 185c0-84.35-71.78-153-160-153zm0 224a64 64 0 1 1 64-64 64.07 64.07 0 0 1-64 64z"/></svg>');
  --channels-icon--credit: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" class="ionicon" width="24" height="24" viewBox="0 0 512 512"><path d="M32 376a56 56 0 0 0 56 56h336a56 56 0 0 0 56-56V222H32zm66-76a30 30 0 0 1 30-30h48a30 30 0 0 1 30 30v20a30 30 0 0 1-30 30h-48a30 30 0 0 1-30-30zM424 80H88a56 56 0 0 0-56 56v26h448v-26a56 56 0 0 0-56-56z"/></svg>');
}

.channels_header {
  display: grid;
  gap: var(--channels-gap);
  margin-bottom: var(--channels-space-unit);
}

.channels_details {
  display: grid;
  gap: var(--channels-gap);
  border-width: 1px 0;
  border-style: solid;
  border-color: var(--channels-color-gray);
  padding: var(--channels-space-unit) 0;
}
/* Creates a faux button w/o icon for the ical link. */
.channels_details a:link:is(.service-links-ical) {
  padding: .5em 1.125em;
  border: 2px solid black;
  border-radius: 4px;
  color: var(--channels-color-black);
}
.channels_details a:hover:is(.service-links-ical) {
  background: var(--channels-color-black);
  color: var(--channels-color-white)  !important;
}
.channels_details .service-links-ical i.fa {
  display: none;
}

/* Override link and hover effect for service links to adhere to mcgill-ds. */
.channel-item .service-links a:where(:link,
:visited) i {
  color: var(--channels-color-black);
}
.channel-item .service-links a:hover i {
  color: var(--channels-color-red);
}

/* Aligns twitter icon vertically. */
.channels_details .links {
  display: flex;
  align-items: center;
  gap: var(--channels-gap);
}

/* Displays twitter button centered using flex. */
.channels_details .service-links-twitter-widget {
  display: flex !important;
}

.channels_details :where(.field-label,
.field-items) {
  margin: 0 !important;
}
/* Align icons to the center using grid. */
:where(.channels_date,
.channels_location,
.channels_price)::before {
  display: grid;
  align-items: center;
}

/* Displays icon. */
.channels_date::before {
  content: var(--channels-icon--calendar);
}
.channels_date span:where(.weekday,
.month,
.day,
.year) {
  font-weight: bold;
}
/* Flex align items with icons. */
:where(.channels_location,
.channels_date,
.channels_price) {
  display: flex;
  align-items: center;
  gap: var(--channels-gap);
}

/* Displays icon. */
.channels_location::before {
  content: var(--channels-icon--location);
  margin: var(--channels-space-unit) 0;
}

/* Displays icon. */
.channels_price::before {
  content: var(--channels-icon--credit);
}

.channels_dek {
  font-family: var(--channels-serif-regular);
  font-size: var(--h3);
}

.channels_dek .field-items {
  margin-top: 0 !important;
}

/* Publishing information including publishing on social media. Currently only used for news.*/
.channels_content-pub {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Text is regular case. Deep specificity which is now overridden. */
.channels_content-pub :where(.multi-date > span) {
  color: var(--channels-color-gray) !important;
}
.channels_content-pub .custom-multi-date span:not(.label) {
  text-transform: unset !important;
}

/* TODO: Consider using grid templates for centered content and break out image.*/
.channels_content-area {
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) minmax(auto, 65ch) minmax(2rem, 1fr);
}
.channels_image-collection {
  grid-column: 1 / 4;
  justify-self: center;
  width: 100%;
  max-width: 100ch;
  margin-bottom: var(--channels-space-unit);
}
/* Centers content within the grid. */
:where(.channels_content-body,
.channels_contact-container,
.channels_related-content) {
  grid-column: 2;
}

.channels_contact-container {
  margin-top: var(--channels-space-large);
}

.channels_contact-info {
  display: grid;
  justify-items: start;
  align-content: flex-start;
}

.channels_contact-info .field-label-inline {
  width: 100%;
}
.channels_image-collection img {
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* Secondary images. */
.channels_image-list .field-items {
  display: flex;
  gap: var(--channels-gap);
}

.channels_bio-container {
  display: grid;
  background: var(--channels-color-gray--lightest);
  gap: var(--channels-gap);
}

/* Specifies no margin on fields-items. */
.channels_bio-container :is(.channels_bio-profile,
.field-name-field-bio) .field-items {
  margin: 0;
}

/*phpcs:disable*/
.channels_bio-profile {
  padding: var(--bio-padding, var(--channels-space-unit)) var(--bio-padding, var(--channels-space-unit)) 0 var(--bio-padding, var(--channels-space-unit));
}
/*phpcs:enable*/

/* Image should fill horizontal space on smaller devices. */
.channels_bio-profile img {
  width: 100%;
}
.channels_bio-description {
  padding: var(--channels-space-unit);
  display: flex;
  flex-flow: column;
  align-self: center;
}

/* Display channel tag content inline. */
.channels_related-content {
  gap: var(--channels-gap);
}

:where(.channels_meta,
.channels_source) {
  font-size: var(--channels-text-smallest, 14px);
}

.field-name-field-category {
  margin: 0;
}
.field-name-field-category .links li {
  margin-left: 0;
}

/* Reusable dark background that accommodates text and links. */
.dark-background {
  background: var(--channels-color-black);
  color: var(--channels-color-white);
}

.dark-background a:is(:link,
:visited,
:focus) {
  color: var(--channels-color-white);
}

.dark-background .field-label {
  color: var(--channels-color-white);
}
/*phpcs:disable*/
/* Related content with a reusable notched class. */
.channels_related,
.notched {
  --notchSize: 20px;
  clip-path:
    polygon(
      0 0,
      calc(100% - var(--notchSize)) 0%,
      100% var(--notchSize),
      100% 100%,
      var(--notchSize) 100%,
      0% calc(100% - var(--notchSize))
    );
    padding: var(--channels-space-large)
      var(--channels-space-unit)
      var(--channels-space-large)
      var(--channels-space-large);
    margin: var(--channels-space-large) 0;
}
/*phpcs:enable*/
.channels_related label {
  font-size: var(--h4, 14px);
  font-family: var(--channels-serif-medium);
  font-weight: unset;
}

/* Overrides field margins which are too specific. */
.channels_related .field-name-field-link .field-items {
  margin-top: 0 !important;
}


.field-name-field-tags .field-items {
  display: flex;
  gap: var(--channels-gap);
  flex-wrap: wrap;
}

/* Type of channels content i.e., news, events. */
.node__type {
  text-transform: uppercase;
  color: var(--channels-color-gray);
}


.marketing-title {
  font-family: var(--channels-sans-bold);
  text-align: left;
}

@media (min-width: 768px) {
  .channels_header {
    grid-template-columns: 2fr 1fr;
  }
  .channels_bio-container {
    grid-template-columns: auto 4fr;
  }
  .channels_source {
    display: flex;
    justify-content: space-between;
  }
  /* Display contact information side by side. */
  .channels_contact-container {
    display: flex;
    gap: calc(var(--channels-space-large) + var(--channels-space-unit));
  }


  /* Profile image should be flush against container edge. */
  .channels_bio-profile {
    --bio-padding: 0;
  }
  /* Sets with back to original image size. */
  .channels_bio-profile img {
    width: auto;
  }
  /* Layout for displaying tag inline with label. */
  :where(.field-name-field-tags,
  .field-name-field-category,
  .field-name-field-channels-attach),
  .channels_contact-info .field-label-inline {
    display: grid;
    float: none !important;
    grid-template-columns: minmax(100px, 140px) 1fr;
    align-items: flex-end;
  }
}
