/*
 * Marble Government UI
 * Shared materials component
 *
 * Canonical contract:
 *
 *   .marble-materials
 *   .marble-materials__heading
 *   .marble-materials__eyebrow
 *   .marble-materials__title
 *   .marble-materials__count
 *   .marble-materials__grid
 *   .marble-materials__list
 *
 *   .marble-material-card
 *   .marble-material-card__type
 *   .marble-material-card__file-icon
 *   .marble-material-card__content
 *   .marble-material-card__meta
 *   .marble-material-card__title
 *   .marble-material-card__description
 *   .marble-material-card__actions
 *   .marble-material-card__open
 *   .marble-material-card__download
 *
 * This component is deliberately context-independent.
 * News, events and future content types must not own its
 * visual contract through parent-scoped overrides.
 */


.marble-materials {
  width: 100%;
  min-width: 0;
}


.marble-materials__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}


.marble-materials__eyebrow {
  margin: 0 0 5px;
  color: #71879a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
}


.marble-materials__title {
  margin: 0;
  color: #07345b;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}


.marble-materials__count {
  flex: 0 0 auto;
  color: #74899a;
  font-size: 13px;
  line-height: 1.3;
}


.marble-materials__grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}


.marble-materials__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}


.marble-materials__list > * {
  width: auto;
  max-width: 100%;
}


/*
 * Material card.
 *
 * The compact bordered presentation below is the final
 * presentation previously reached on news pages. It is now
 * the component's own default instead of a news override.
 */

.marble-material-card {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;

  align-items: stretch;

  margin: 0;
  padding: 0;

  border: 1px solid rgba(15, 76, 117, .20);
  border-radius: 5px;

  background: #fff;

  box-sizing: border-box;
  overflow: hidden;
}


.marble-material-card__type {
  display: flex;
  width: 46px;
  min-width: 46px;
  min-height: 74px;
  flex: 0 0 46px;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;

  margin: -1px 0 -1px -1px;
  padding: 7px 5px;

  border-radius: 5px 0 0 5px;

  background: #eef6fb;
  color: #0f4c75;

  box-sizing: border-box;
}


.marble-material-card__type strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;

  overflow: hidden;

  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
}


.marble-material-card__file-icon {
  position: relative;

  display: block;
  width: 25px;
  height: 29px;

  flex: 0 0 auto;

  border: 2px solid currentColor;
  border-radius: 2px;

  box-sizing: border-box;
}


.marble-material-card__file-icon::before {
  content: "";

  position: absolute;
  top: -2px;
  right: -2px;

  width: 8px;
  height: 8px;

  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;

  background: #eef6fb;

  box-sizing: border-box;
}


.marble-material-card__file-icon span {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 13px;

  height: 2px;

  background: currentColor;

  box-shadow:
    0 5px 0 currentColor;
}


.marble-material-card__content {
  display: flex;

  min-width: 0;
  width: auto;
  flex: 1 1 auto;

  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  padding: 7px 10px;

  box-sizing: border-box;
}


.marble-material-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;

  margin: 0 0 4px;

  color: #71879a;
  font-size: 11px;
  line-height: 1.3;
}


.marble-material-card__title {
  display: block;

  width: auto;
  max-width: 100%;
  min-width: 0;

  height: auto;
  max-height: none;

  margin: 0;

  color: #173b57;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;

  white-space: normal;

  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;

  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}


.marble-material-card__description {
  margin: 5px 0 0;

  color: #5f7689;

  font-size: 12px;
  line-height: 1.4;

  overflow-wrap: anywhere;
}


.marble-material-card__actions {
  display: flex;

  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;

  gap: 6px 12px;

  margin: 5px 0 0;
  padding: 0;
}


.marble-material-card__actions a {
  padding: 0;

  color: #087abd;

  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;

  text-decoration: none;
  white-space: nowrap;
}


.marble-material-card__actions a:hover {
  text-decoration: underline;
}


.marble-material-card:hover {
  border-color: rgba(15, 76, 117, .32);
}


@media (max-width: 760px) {

  .marble-materials__grid {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 620px) {

  .marble-materials__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }


  .marble-material-card {
    max-width: 100%;
  }


  .marble-material-card__type {
    width: 42px;
    min-width: 42px;
    flex-basis: 42px;

    min-height: 68px;

    padding-right: 4px;
    padding-left: 4px;
  }


  .marble-material-card__file-icon {
    width: 23px;
    height: 27px;
  }


  .marble-material-card__content {
    padding: 7px 9px;
  }

}


@media print {

  .marble-material-card {
    break-inside: avoid;
    border-color: #aaa;
    background: #fff;
  }


  .marble-material-card__actions {
    display: none;
  }

}
