/* ***
 * McCourt Fixes
 * ------------------------------
 * Note:  despite the name of the file, these styles apply to non-McCourt sites
 * as well as McCourt.  these are tweaks made largely to line up the this theme
 * with the way McCourt looked using their pre-release build of the core DP
 * theme.
 */


/*
 * for some reason, the originally launched McCourt theme included this rule
 * but it was turned off for the li:last-child.  likely it was before the "back
 * to top" links were added to the theme.
 */

.cc--chaptered-page-link-list ul li {
	margin-bottom: 1.25rem;
}

/*
 * copied from the chaptered page template styles and applied to the
 * parent/child page template that McCourt uses for some pages like the
 * Student Organizations page.
 */

.tc--sfs-program-details .chaptered-page-chapter .chapter-anchor {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    top: -4.0625rem;
}

@media screen and (min-width: 768px) {
    .tc--sfs-program-details .chaptered-page-chapter .chapter-anchor {
        top: -7.5rem;
    }
}

@media screen and (min-width: 1024px) {
    .tc--sfs-program-details .chaptered-page-chapter .chapter-anchor {
        top: -5rem;
    }
}

/*
 * this applies to <hr>'s that editors add via Gutenberg.
 */

.wp-block-separator {
    background: #CCC;
    border: 0;
    height: 1px;
    margin-top: 2.1875rem;
    margin-bottom: 2.1875rem;
}

/*
 * this fixes spacing issues - DP may not have taken into account multi-line
 * sidebar menu items, so their solution of height and min-height declarations
 * to control padding doesn't work all the time.  the first rule overrides
 * their baseline styles; the second one adds the padding back in but on the
 * element containing these links.
 */

.cc--chaptered-menu .c--chaptered-menu ul#chaptered-menu a {
    height: auto;
    min-height: auto;
}

/*
 * the size of 1.09375rem was chosen so that adjacent list items have the same
 * padding as adjacent sections of the page (i.e. 2.1875 / 2 = 1.09375).
 */

.cc--chaptered-menu .c--chaptered-menu ul#chaptered-menu li {
    padding-top: 1.09375rem;
    padding-bottom: 1.09375rem;
}

/*
 * The offset of the chapter anchors needs to be different because the site
 * headers on child themes are different (taller) than the TT site header.
 */

@media screen and (min-width: 1024px) {
  .tc--chaptered-page .chapter-anchor,
  .tc--sfs-chaptered-page .chapter-anchor {
    top: -11.875rem !important;
  }
}
