/* badsound delivery: the library cards on My account, order pages and the thank-you page. */

.bsd {
  --bsd-ink: #25272d;
  --bsd-ink2: #6b7079;
  --bsd-line: #dfe1e5;
  --bsd-surface: #fff;
  --bsd-display: "Bebas Neue", "Open Sans", Impact, sans-serif;
  display: block;
  max-width: 920px;
  margin: 0 0 28px;
  color: var(--bsd-ink);
  text-align: left;
}

.bsd *,
.bsd *::before {
  box-sizing: border-box;
}

/* ---------- heading row ---------- */

.bsd .bsd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 6px;
}

.bsd h2.bsd-title {
  margin: 0;
  padding: 0;
  font-family: var(--bsd-display);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--bsd-ink);
}

.bsd .bsd-count {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1.4;
  color: var(--bsd-ink2);
  white-space: nowrap;
}

.bsd .bsd-intro {
  display: block;
  max-width: 64ch;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--bsd-ink2);
}

/* ---------- cards ---------- */

/* The !important on the h3 sizes below is there because the site's checkout CSS sets every h3
   on checkout pages (the thank-you page included) to 20px/600 with !important. */

.bsd .bsd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  container-type: inline-size;
}

.bsd .bsd-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 0;
  padding: 20px;
  background: var(--bsd-surface);
  border: 1px solid var(--bsd-line);
  border-radius: 4px;
}

.bsd .bsd-card--nocover {
  grid-template-columns: minmax(0, 1fr);
}

.bsd .bsd-cover {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
  background: #f1f2f4;
}

.bsd .bsd-cover img,
.bsd .bsd-mini-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
}

.bsd .bsd-body {
  display: block;
  min-width: 0;
}

.bsd h3.bsd-name {
  margin: 0 0 3px;
  padding: 0;
  font-family: var(--bsd-display);
  font-size: 30px !important;
  line-height: 1.05;
  font-weight: 400 !important;
  letter-spacing: 0.3px;
  color: var(--bsd-ink);
}

.bsd .bsd-facts {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--bsd-ink2);
}

.bsd .bsd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 14px;
}

.bsd a.bsd-download {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--bsd-ink);
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.12s ease;
}

.bsd a.bsd-download:hover,
.bsd a.bsd-download:focus-visible {
  opacity: 0.85;
  color: #fff;
}

.bsd a.bsd-download:focus-visible,
.bsd a.bsd-tutorial:focus-visible,
.bsd a.bsd-mini:focus-visible {
  outline: 2px solid var(--bsd-ink);
  outline-offset: 3px;
}

.bsd .bsd-download-size {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.72;
}

.bsd a.bsd-tutorial {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--bsd-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.bsd a.bsd-tutorial::before {
  content: "";
  flex: 0 0 auto;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}

.bsd a.bsd-tutorial:hover {
  opacity: 0.7;
}

.bsd .bsd-start {
  display: block;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--bsd-line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--bsd-ink2);
}

.bsd .bsd-start strong {
  font-weight: 600;
  color: var(--bsd-ink);
}

.bsd .bsd-meta {
  display: block;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--bsd-ink2);
}

.bsd .bsd-meta a {
  color: var(--bsd-ink);
  text-decoration: underline;
}

/* ---------- not in your collection yet ---------- */

.bsd.bsd-more {
  margin-top: 4px;
}

.bsd h3.bsd-subtitle {
  margin: 0 0 12px;
  padding: 0;
  font-family: var(--bsd-display);
  font-size: 22px !important;
  line-height: 1.1;
  font-weight: 400 !important;
  letter-spacing: 0.3px;
  color: var(--bsd-ink);
}

.bsd .bsd-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
  gap: 12px;
}

.bsd a.bsd-mini {
  display: block;
  padding: 10px;
  border: 1px dashed #c3c7ce;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--bsd-ink);
  text-decoration: none;
}

.bsd .bsd-mini-cover {
  display: block;
  aspect-ratio: 1 / 1;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 2px;
  background: #f1f2f4;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.bsd a.bsd-mini:hover .bsd-mini-cover,
.bsd a.bsd-mini:focus-visible .bsd-mini-cover {
  filter: none;
  opacity: 1;
}

.bsd .bsd-mini-name {
  display: block;
  font-family: var(--bsd-display);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.3px;
}

.bsd .bsd-mini-cta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bsd-ink2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- by the room a card has (not the screen) ---------- */

/* Narrow column (tablet, small laptop): smaller cover. */
@container (max-width: 470px) {
  .bsd .bsd-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }
}

/* Wide column: one row per library, buttons on the right. */
@container (min-width: 700px) {
  .bsd .bsd-card {
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: center;
  }

  .bsd .bsd-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 24px;
    align-items: center;
  }

  .bsd h3.bsd-name {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .bsd .bsd-facts {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-bottom: 0;
  }

  .bsd .bsd-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-wrap: nowrap;
    margin: 0;
  }

  .bsd .bsd-start {
    grid-column: 1 / -1;
    margin-top: 14px;
  }

  .bsd .bsd-meta {
    grid-column: 1 / -1;
  }
}

/* ---------- phones ---------- */

@media (max-width: 600px) {
  .bsd h2.bsd-title {
    font-size: 30px;
  }

  .bsd .bsd-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .bsd h3.bsd-name {
    font-size: 26px !important;
  }

  .bsd .bsd-facts {
    margin-bottom: 12px;
  }

  /* Button and tutorial link under the cover, across the card. */
  .bsd .bsd-body {
    display: contents;
  }

  .bsd h3.bsd-name,
  .bsd .bsd-facts {
    grid-column: 2;
  }

  .bsd h3.bsd-name {
    align-self: end;
  }

  .bsd .bsd-cover {
    grid-row: 1 / span 2;
  }

  .bsd .bsd-facts {
    align-self: start;
    margin-bottom: 0;
  }

  .bsd .bsd-actions,
  .bsd .bsd-start,
  .bsd .bsd-meta {
    grid-column: 1 / -1;
  }

  .bsd .bsd-actions {
    margin: 0;
  }

  .bsd .bsd-meta {
    margin: 0;
  }

  .bsd a.bsd-download {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bsd a.bsd-download,
  .bsd .bsd-mini-cover {
    transition: none;
  }
}

/* ---------- My account: a calm panel behind the content, and room for the cards ---------- */

/* Every tab: text no longer sits directly on the concrete texture. */
body.bsd-account .my-account-box .woocommerce-MyAccount-content {
  padding: 22px 24px 24px !important;
  border: 1px solid #d8d8d8;
  background: #fff;
}

/* Desktop: the account box may use the width the site's own CSS gives it (88%, at most 1320px).
   The page had a second limit of 70% on it, which made every tab cramped on laptop screens. */
@media (min-width: 1025px) {
  body.bsd-account .my-account-box {
    max-width: 88% !important;
  }
}

/* Dashboard and Downloads: the content column takes the room next to the menu. */
@media (min-width: 1025px) {
  body.bsd-library-view .my-account-box .woocommerce-MyAccount-content {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  body.bsd-account .my-account-box .woocommerce-MyAccount-content {
    padding: 16px 14px 18px !important;
  }
}

/* WooCommerce's own notices keep their look inside the panel. */
body.bsd-account .my-account-box .woocommerce-MyAccount-content > :last-child {
  margin-bottom: 0;
}
