/**
 * @file
 * Bridges the gap between D6 markup the original stylesheets expect and what
 * Drupal 11 emits. Only additions — style.css / local.css are untouched so the
 * original design stays the source of truth.
 */

/* ---------------------------------------------------------------------------
 * Layout scaffolding the D6 core stylesheets used to provide.
 * ------------------------------------------------------------------------ */
.clear-block:after,
.float-group:after {
  content: "";
  display: table;
  clear: both;
}
.clear-both {
  clear: both;
}
.make-it-center:after {
  content: "";
  display: table;
  clear: both;
}

/* The D6 theme floated the three columns; reset.css does not set this. */
.column-1,
.column-2,
.column-3 {
  float: left;
}

/* ---------------------------------------------------------------------------
 * Main navigation. In D6 this was #block-superfish-1 sitting in content_top.
 * The Drupal 11 menu block lands in the same region with a different id, so
 * re-apply the two rules local.css targeted by id.
 * ------------------------------------------------------------------------ */
#content-top .block-menu .content,
#content-top .block-superfish .content {
  padding: 0 0 4px 0;
  border-bottom: 1px solid #c9c9c6;
}
#content-top .block-menu ul,
#content-top .block-superfish ul {
  padding: 0 0 3px 0;
}
#content-top .block-menu h2.title {
  display: none;
}

/* sf-navbar needs a positioning context and a defined height for the drop rows. */
#content-top .sf-menu {
  float: none;
}
#content-top .sf-menu:after {
  content: "";
  display: table;
  clear: both;
}

/* ---------------------------------------------------------------------------
 * Page title. D6 printed <h1 class="title"> straight from page.tpl.php;
 * Drupal 11 renders it as a block in the highlighted region.
 * ------------------------------------------------------------------------ */
.block-page-title-block h2.title {
  display: none;
}
.block-page-title-block h1,
.column-2 h1.page-title {
  margin: 0 0 0.4em 0;
  padding: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #333;
  background: none;
  border: none;
}

/* Local task tabs and status messages sit in the same region. */
.block-local-tasks-block ul.tabs {
  margin: 0 0 8px 0;
  padding: 0;
}
.messages {
  margin: 0 0 8px 0;
  padding: 6px 8px;
  border: 1px solid #c9c9c6;
  background-color: #f7f7f2;
}
.messages--error {
  border-color: #a33;
  background-color: #fdf1f1;
}
.messages--status {
  border-color: #3a3;
  background-color: #f1fdf1;
}

/* ---------------------------------------------------------------------------
 * Drupal 11 body/toolbar. The admin toolbar is fixed; keep it off the header.
 * ------------------------------------------------------------------------ */
body.toolbar-fixed .make-it-center {
  position: relative;
}

/* Images inside migrated node bodies must not blow out the 524px column. */
.main-content-block img,
.column-2 .node img {
  max-width: 100%;
  height: auto;
}

/* Views/table output that used to be styled by D6 core views.css. */
.column-2 table {
  width: 100%;
  border-collapse: collapse;
}
.column-2 table th,
.column-2 table td {
  padding: 3px 5px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e2e2;
}

/* Search form in the left column (D6 search block). */
.column-1 .block-search .content {
  padding: 4px;
}
.column-1 .block-search input.form-text {
  width: 90%;
}

/* Feed icons / RSS links that D6 aggregator.css handled. */
.feed-icon {
  display: inline-block;
}

/* ---------------------------------------------------------------------------
 * Footer. D6 printed the copyright straight into #footer with no .block
 * wrapper; as a block it inherits the tan .block-block background, which makes
 * #E0D5C5 text invisible on the brown bar. Strip the chrome back off.
 * ------------------------------------------------------------------------ */
#footer .block,
#footer .block-block {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  background-color: transparent;
}
#footer .block .content {
  padding: 0;
}
#footer .block p {
  margin: 0;
  padding: 4px 0;
  color: #e0d5c5;
}

/* ---------------------------------------------------------------------------
 * Breadcrumb. D6 rendered "Home » Education" as a plain inline trail.
 * ------------------------------------------------------------------------ */
.block-system_breadcrumb_block {
  background: none;
  border: none;
  margin: 0;
}
.block-system_breadcrumb_block .content {
  padding: 0;
}
.block-system_breadcrumb_block ol {
  margin: 0 0 4px 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}
.block-system_breadcrumb_block li {
  display: inline;
}
.block-system_breadcrumb_block li + li:before {
  content: " » ";
  color: #777;
}

/* ---------------------------------------------------------------------------
 * Superfish second row. The active-trail submenu is absolutely positioned at
 * top:33px, so it escapes the flow and the page title rides up underneath it.
 * D6 reserved the space with .sf-navbar padding; give it enough for the row.
 * ------------------------------------------------------------------------ */
#content-top .sf-navbar {
  height: 30px;
  padding-bottom: 42px;
}
#content-top .sf-navbar li li a {
  padding: 8px 10px;
}

/* ---------------------------------------------------------------------------
 * Slideview block (replaces the D6 views_slideshow singleframe display).
 * Slides are stacked; only .is-active is shown, cross-fading.
 * ------------------------------------------------------------------------ */
.slideview-slides {
  margin: 0;
  padding: 0;
  list-style: none;
}
.slideview--active {
  position: relative;
}
.slideview-slides.slideview--active > li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--slideview-speed, 700ms) ease-in-out;
}
.slideview-slides.slideview--active > li.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}
.slideview-slides.slideview--active > li h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
}
.slideview-pager {
  padding: 2px 0;
  font-size: 11px;
}
.slideview-pager a {
  display: inline-block;
  margin-right: 4px;
  padding: 0 4px;
  color: #333;
  text-decoration: none;
  border: 1px solid #c9c9c6;
  background-color: #f2ede6;
}
.slideview-pager a.is-active,
.slideview-pager a:hover {
  color: #e0d5c5;
  background-color: #b1946c;
  border-color: #b1946c;
}

/* "more" link footer on the Custom Link Feed block, as styled in the D6 view. */
.clf-more {
  text-align: right;
  padding-bottom: 4px;
  border-bottom: 1px solid #747474;
}

/* Aggregator feed blocks: match the D6 sidebar feed styling. */
.block-aggregator ul {
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
}
.block-aggregator li {
  margin-bottom: 5px;
  line-height: 1.25;
}
.block-aggregator .more-link {
  text-align: right;
  font-size: 11px;
}

/* D6 gave the slideshow block a tinted panel. */
#content-top .block-views-block .content {
  background-color: #f2ede6;
  padding: 4px;
}

/* ---------------------------------------------------------------------------
 * Search results (Search API view at /search/node). Mirrors D6 core search:
 * a linked title with a short keyword-highlighted snippet underneath.
 * ------------------------------------------------------------------------ */
.views-exposed-form {
  margin: 0 0 8px 0;
}
.views-exposed-form .form-item {
  margin: 0 0 4px 0;
}
.views-exposed-form label {
  display: none;
}
.column-1 .views-exposed-form .form-text {
  width: 95%;
}
h3.search-result-title {
  margin: 12px 0 2px 0;
  font-size: 14px;
  line-height: 1.2;
}
h3.search-result-title a {
  text-decoration: none;
}
.search-result-excerpt {
  margin: 0 0 10px 0;
  padding-bottom: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #333;
  border-bottom: 1px solid #c9c9c6;
}
.search-result-excerpt strong {
  background-color: #f2ede6;
  font-weight: bold;
}
