/* Info Board — "Sidebar Dashboard" */

/*
 * The Info Board sits at the bottom of the Miller Library homepage, so the
 * global #main and .editor-home-page bottom padding
 * leave a large dead space before the footer. Zero it — but ONLY on a page that
 * actually contains this component, via :has()
 */
#main:has(.com-info-board),
.editor-home-page:has(.com-info-board) {
  padding-bottom: 0;
}

.com-info-board {
  --info-board-rail-bg: var(--color-primary-purple);
  --info-board-radius: 16px;
  --info-board-rail-width: 330px;
}

.com-info-board-grid {
  display: grid;
  grid-template-columns: var(--info-board-rail-width) 1fr;
  border: 1px solid hsl(0 0% 80% / 1);
  border-radius: var(--info-board-radius);
  overflow: hidden;
  background: hsl(0 0% 100% / 1);
  box-shadow: 0 0 20px 0 hsl(0 0% 30% / 0.28);
}

/* E2: rail on the right */
.com-info-board-grid.rail-right {
  grid-template-columns: 1fr var(--info-board-rail-width);
}
.com-info-board-grid.rail-right .com-info-board-rail { order: 2; }
.com-info-board-grid.rail-right .com-info-board-main { order: 1; }

/* ── Rail ─────────────────────────────────────────────── */
.com-info-board-rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px 28px;
  background: var(--info-board-rail-bg);
  color: hsl(0 0% 100% / 1);
}
.com-info-board-rail a {
  color: var(--color-primary-yellow);
}

.com-info-board-seg {
  padding-top: 20px;
  border-top: 1px solid hsl(0 0% 100% / 0.18);
}
.com-info-board-seg:first-child {
  padding-top: 0;
  border-top: none;
}

.com-info-board-seg-title {
  margin: 0 0 8px;
  color: hsl(0 0% 100% / 1);
  font-size: 1.12rem;
  line-height: 1.25;
}

.com-info-board-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  background: var(--color-primary-yellow);
  color: hsl(34 100% 12% / 1);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.com-info-board-note {
  margin: 0;
  font-size: 0.86rem;
  color: hsl(0 0% 100% / 0.82);
}

/* Rich-text body */
.com-info-board-body {
  margin: 0;
  font-size: 0.9rem;
  color: hsl(0 0% 100% / 0.85);
}
.com-info-board-body p { margin: 0 0 0.5rem; color: inherit; }
.com-info-board-body p:last-child { margin-bottom: 0; }
.com-info-board-body a { color: var(--color-primary-yellow); }
.com-info-board-body ul,
.com-info-board-body ol { margin: 0.3rem 0; padding-left: 1.1rem; }

/* "Learn more" link under a segment */
.com-info-board-seg-link { margin: 0.6rem 0 0; }
.com-info-board-seg-link a { color: var(--color-primary-yellow); }

.com-info-board-hours-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid hsl(0 0% 100% / 0.14);
}
.com-info-board-hours-row:last-child {
  border-bottom: none;
}
.com-info-board-hours-row span:last-child {
  color: hsl(0 0% 100% / 0.82);
}

.com-info-board-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.com-info-board-pill {
  padding: 5px 12px;
  background: hsl(0 0% 100% / 0.14);
  border: 1px solid hsl(0 0% 100% / 0.3);
  border-radius: 100px;
  color: hsl(0 0% 100% / 1);
  font-weight: 600;
  font-size: 0.82rem;
}
a.com-info-board-pill {
  text-decoration: none;
  transition: background ease-out 150ms;
}
a.com-info-board-pill:hover { background: hsl(0 0% 100% / 0.3); }

.com-info-board-libby {
  display: flex;
  align-items: center;
  gap: 14px;
}
.com-info-board-libby-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
}
.com-info-board-libby-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.com-info-board-libby-icon a { display: block; width: 100%; height: 100%; }
/* Library (Tabler) icon variant: white stroke glyph centered on the primary
   blue circle. Uploaded image icons keep their full-bleed rendering above. */
.com-info-board-libby-icon.has-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-blue);
  color: #fff;
}
.com-info-board-libby-icon.has-svg a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.com-info-board-libby-icon .w-icon { width: 30px; height: 30px; }
.com-info-board-libby-txt h3 { margin-bottom: 2px; font-size: 1rem; }
.com-info-board-libby-txt p {
  margin: 0;
  font-size: 0.92rem;
  color: hsl(0 0% 100% / 0.82);
}

/* ── Main: action cards ───────────────────────────────── */
.com-info-board-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 30px;
  background: hsl(0 0% 100% / 1);
}

.com-info-board-card {
  padding: 20px 22px;
  border: 1px solid hsl(0 0% 80% / 1);
  border-radius: 10px;
}
.com-info-board-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--color-heading);
}
.com-info-board-card-title a {
  color: var(--color-link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.com-info-board-card-title a:hover { text-decoration: underline; }

/* Trailing arrow (→) marking the heading as a link; inherits the link color. */
.com-info-board-arrow {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  transition: transform 150ms ease-out;
}
.com-info-board-card-title a:hover .com-info-board-arrow { transform: translateX(3px); }

.com-info-board-card-body { font-size: 0.95rem; }
.com-info-board-card-body p { margin: 0.3rem 0; }
.com-info-board-card-body a { color: var(--color-link); }

.com-info-board-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 0.62rem 1.1rem;
  background: var(--color-primary-purple);
  color: hsl(0 0% 100% / 1);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background ease-out 200ms;
}
.com-info-board-cta:hover { background: hsl(269deg 53% 22% / 1); }

/* ── Mobile: single column stack ──────────────────────── */
@media (width <= 700px) {
  /*
   * Pull the board to near-full-bleed on mobile. The home-page template gives
   * every component `padding-inline: var(--mobile-content-edge-padding)` (20px)
   * via a (0,4,0) selector, so we mirror that selector's shape (+ .com-info-board
   * + the two :not()s) to out-specify it. Top/bottom are zeroed too.
   */
  .editor-home-page .com.com-info-board:not(.com-page-header):not(.com-library-header) {
    padding: 0 6px;
  }

  .com-info-board-grid,
  .com-info-board-grid.rail-right {
    grid-template-columns: 1fr;
    box-shadow: none;
    border: none;
    /* Rounding is owned by the rail itself on mobile (below), not the grid. */
    border-radius: 0;
  }

  /* Round the purple rail as its own box — bottom corners match the top. */
  .com-info-board-rail {
    border-radius: var(--info-board-radius);
  }

  .com-info-board-main {
    padding: 1em 0;
  }
  .com-info-board-grid.rail-right .com-info-board-rail,
  .com-info-board-grid.rail-right .com-info-board-main {
    order: initial;
  }
}
