/*
 * Sleepbetter.Baby account and library UI v3.1.
 *
 * Loaded after theme-v300.css. The extra .woocommerce-account scope is
 * intentional: WooCommerce's classic stylesheet otherwise restores floats and
 * fixed percentage widths on the account navigation and content containers.
 */

.woocommerce-account .woocommerce,
.woocommerce-account .sbb-library-shell,
.woocommerce-account .sbb-library-shell *,
.woocommerce-account .sbb-auth-shell,
.woocommerce-account .sbb-auth-shell * {
  box-sizing: border-box;
}

.woocommerce-account .woocommerce {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after,
.woocommerce-account .sbb-library-layout::before,
.woocommerce-account .sbb-library-layout::after,
.woocommerce-account .sbb-auth-shell::before,
.woocommerce-account .sbb-auth-shell::after {
  display: none;
  content: none;
}

/* Signed-out Library introduction */
.woocommerce-account .sbb-auth-hero {
  min-height: clamp(300px, 31vw, 410px);
  overflow: hidden;
  border: 1px solid rgba(115, 86, 67, .1);
  border-radius: var(--sbb-radius-xl, 34px);
  background:
    linear-gradient(90deg, rgba(255, 250, 244, .99) 0%, rgba(255, 250, 244, .95) 48%, rgba(255, 250, 244, .52) 72%, rgba(255, 250, 244, .18) 100%),
    url("../images/illustration-library-v310.webp") 73% center / cover no-repeat,
    #f7f0e8;
  box-shadow: var(--sbb-shadow-sm, 0 16px 42px rgba(74, 53, 39, .08));
}

.woocommerce-account .sbb-auth-hero h1 {
  max-width: 720px;
  color: var(--sbb-ink, #342b26);
  font-family: var(--sbb-font-display, Georgia, serif);
  font-weight: 650;
  line-height: 1.05;
}

.woocommerce-account .sbb-auth-hero > div > p:last-child {
  max-width: 650px;
  color: var(--sbb-ink-soft, #554942);
}

.woocommerce-account .sbb-auth-hero-checks li {
  border: 1px solid rgba(115, 86, 67, .12);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 8px 24px rgba(74, 53, 39, .05);
  backdrop-filter: blur(8px);
}

/* Logged-in account shell */
.woocommerce-account .sbb-library-shell {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.woocommerce-account .sbb-library-top {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(300px, 32vw, 420px);
  grid-template-columns: minmax(0, 1.18fr) minmax(220px, .82fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  overflow: hidden;
  padding: clamp(1.7rem, 5vw, 4rem);
  border: 1px solid rgba(115, 86, 67, .1);
  border-radius: var(--sbb-radius-xl, 34px);
  background:
    linear-gradient(90deg, rgba(255, 250, 244, .99) 0%, rgba(255, 250, 244, .96) 45%, rgba(255, 250, 244, .58) 68%, rgba(255, 250, 244, .28) 100%),
    url("../images/illustration-library-v310.webp") 72% center / cover no-repeat,
    #f7f0e8;
  box-shadow: var(--sbb-shadow-sm, 0 16px 42px rgba(74, 53, 39, .08));
}

.woocommerce-account .sbb-library-top::after {
  position: absolute;
  z-index: -1;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2.5rem);
  width: clamp(110px, 15vw, 180px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  content: "";
  backdrop-filter: blur(3px);
}

.woocommerce-account .sbb-library-top__copy,
.woocommerce-account .sbb-library-top__summary {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.woocommerce-account .sbb-library-top h1 {
  max-width: 720px;
  margin-bottom: .35em;
  overflow-wrap: anywhere;
  font-family: var(--sbb-font-display, Georgia, serif);
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.02;
}

.woocommerce-account .sbb-library-top__copy > p:last-child {
  max-width: 630px;
  margin: 0;
  color: var(--sbb-ink-soft, #554942);
  font-size: clamp(.95rem, 1.35vw, 1.08rem);
}

.woocommerce-account .sbb-library-top__summary {
  display: grid;
  gap: .7rem;
}

.woocommerce-account .sbb-library-top__summary span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
  padding: .8rem .95rem;
  border: 1px solid rgba(115, 86, 67, .12);
  border-radius: var(--sbb-radius-md, 18px);
  background: rgba(255, 255, 255, .78);
  color: var(--sbb-ink-soft, #554942);
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(74, 53, 39, .05);
  backdrop-filter: blur(8px);
}

.woocommerce-account .sbb-library-top__summary i {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sbb-success, #42674f);
  color: #fff;
  font-size: .72rem;
  font-style: normal;
}

.woocommerce-account .sbb-library-layout {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 3.5vw, 3rem);
}

.woocommerce-account .sbb-library-sidebar,
.woocommerce-account .sbb-library-main {
  width: auto;
  max-width: 100%;
  min-width: 0;
  float: none;
}

.woocommerce-account .sbb-library-sidebar {
  position: sticky;
  top: calc(var(--sbb-header-height, 78px) + 22px);
  z-index: 4;
}

.woocommerce-account .sbb-library-main .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  float: none;
}

/* Dynamic WooCommerce navigation, including third-party endpoints */
.woocommerce-account .sbb-library-sidebar .woocommerce-MyAccount-navigation,
.woocommerce-account .sbb-account-navigation {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  float: none;
}

.woocommerce-account .sbb-account-navigation ul {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: .7rem;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-lg, 26px);
  background: rgba(255, 255, 255, .94);
  list-style: none;
  box-shadow: var(--sbb-shadow-xs, 0 8px 24px rgba(74, 53, 39, .06));
  backdrop-filter: blur(10px);
}

.woocommerce-account .sbb-account-navigation li {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce-account .sbb-account-navigation a {
  display: grid;
  min-height: 46px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .68rem .78rem;
  border: 1px solid transparent;
  border-radius: var(--sbb-radius-sm, 12px);
  color: var(--sbb-muted, #71645c);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.woocommerce-account .sbb-account-navigation a:hover {
  border-color: var(--sbb-line, #e8dbcf);
  background: var(--sbb-paper, #fffaf4);
  color: var(--sbb-brand-strong, #5d4436);
  transform: translateX(2px);
}

.woocommerce-account .sbb-account-navigation .is-active a,
.woocommerce-account .sbb-account-navigation a[aria-current="page"] {
  border-color: var(--sbb-brand, #735643);
  background: var(--sbb-brand, #735643);
  color: #fff;
  box-shadow: 0 10px 24px rgba(93, 68, 54, .18);
}

.woocommerce-account .sbb-account-navigation__icon {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dashboard */
.woocommerce-account .sbb-library-dashboard {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 1.15rem;
}

.woocommerce-account .sbb-library-welcome-card,
.woocommerce-account .sbb-library-section-card,
.woocommerce-account .sbb-library-download-card,
.woocommerce-account .sbb-library-order-card,
.woocommerce-account .sbb-library-empty {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-lg, 26px);
  background: #fff;
  box-shadow: var(--sbb-shadow-xs, 0 8px 24px rgba(74, 53, 39, .06));
}

.woocommerce-account .sbb-library-welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, .8fr);
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background:
    radial-gradient(circle at 93% 12%, rgba(255, 255, 255, .9), transparent 27%),
    linear-gradient(125deg, var(--sbb-paper, #fffaf4), var(--sbb-blush, #f6e7df));
}

.woocommerce-account .sbb-library-welcome-card > div {
  min-width: 0;
}

.woocommerce-account .sbb-library-welcome-card h2 {
  margin-bottom: .35em;
  overflow-wrap: anywhere;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
}

.woocommerce-account .sbb-library-welcome-card p:last-child {
  margin-bottom: 0;
  color: var(--sbb-muted, #71645c);
}

.woocommerce-account .sbb-library-welcome-card__chips {
  display: grid;
  gap: .55rem;
}

.woocommerce-account .sbb-library-welcome-card__chips span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .6rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(115, 86, 67, .1);
  border-radius: var(--sbb-radius-sm, 12px);
  background: rgba(255, 255, 255, .68);
  color: var(--sbb-ink-soft, #554942);
  font-size: .76rem;
  font-weight: 800;
}

.woocommerce-account .sbb-library-welcome-card__chips i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sbb-success, #42674f);
  color: #fff;
  font-size: .68rem;
  font-style: normal;
}

.woocommerce-account .sbb-library-action-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.woocommerce-account .sbb-library-action-card {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  padding: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: #fff;
  color: var(--sbb-ink, #342b26);
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(74, 53, 39, .035);
}

.woocommerce-account .sbb-library-action-card::after {
  position: absolute;
  right: -.8rem;
  bottom: -.85rem;
  width: 4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sbb-blush, #f6e7df);
  content: "";
  opacity: .8;
}

.woocommerce-account .sbb-library-action-card:nth-child(2)::after {
  background: var(--sbb-sage, #dce5d7);
}

.woocommerce-account .sbb-library-action-card:nth-child(3)::after {
  background: var(--sbb-sky, #dfe8ed);
}

.woocommerce-account .sbb-library-action-card:nth-child(4)::after {
  background: var(--sbb-lavender, #e7e1ec);
}

.woocommerce-account .sbb-library-action-card:hover {
  border-color: var(--sbb-brand-soft, #b98f70);
  box-shadow: var(--sbb-shadow-sm, 0 16px 42px rgba(74, 53, 39, .08));
  transform: translateY(-3px);
}

.woocommerce-account .sbb-library-action-card > span,
.woocommerce-account .sbb-library-action-card > strong,
.woocommerce-account .sbb-library-action-card > p {
  position: relative;
  z-index: 1;
}

.woocommerce-account .sbb-library-action-card > span {
  color: var(--sbb-brand-soft, #b98f70);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.woocommerce-account .sbb-library-action-card strong {
  display: block;
  margin-top: .3rem;
  overflow-wrap: anywhere;
  font-family: var(--sbb-font-display, Georgia, serif);
  font-size: 1.08rem;
  line-height: 1.25;
}

.woocommerce-account .sbb-library-action-card p {
  margin: .35rem 0 0;
  color: var(--sbb-muted, #71645c);
  font-size: .76rem;
  line-height: 1.55;
}

.woocommerce-account .sbb-library-section-card {
  width: 100%;
  padding: clamp(1.15rem, 3vw, 2rem);
}

.woocommerce-account .sbb-library-section-head {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.woocommerce-account .sbb-library-section-head > div {
  min-width: 0;
}

.woocommerce-account .sbb-library-section-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.woocommerce-account .sbb-library-section-head > a {
  flex: 0 0 auto;
  color: var(--sbb-brand-strong, #5d4436);
  font-size: .78rem;
  font-weight: 900;
}

.woocommerce-account .sbb-library-bookshelf,
.woocommerce-account .sbb-library-download-grid {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.woocommerce-account .sbb-library-book-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(88px, 112px) minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  padding: .9rem;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .sbb-library-book-card > div {
  min-width: 0;
}

.woocommerce-account .sbb-library-book-card__cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-cream, #f7f0e8);
  box-shadow: 0 10px 22px rgba(74, 53, 39, .1);
}

.woocommerce-account .sbb-library-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.woocommerce-account .sbb-library-book-card__cover:hover img {
  transform: scale(1.035);
}

.woocommerce-account .sbb-library-book-card > div > span {
  display: block;
  color: var(--sbb-brand, #735643);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.woocommerce-account .sbb-library-book-card > div > strong {
  display: block;
  margin-top: .2rem;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.woocommerce-account .sbb-library-book-card__actions,
.woocommerce-account .sbb-library-download-card__actions,
.woocommerce-account .sbb-library-order-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

.woocommerce-account .sbb-library-book-card__actions a {
  color: var(--sbb-brand-strong, #5d4436);
  font-size: .72rem;
  font-weight: 900;
}

/* Downloads */
.woocommerce-account .sbb-library-downloads-head {
  width: 100%;
  max-width: 760px;
  margin-bottom: 1.35rem;
}

.woocommerce-account .sbb-library-downloads-head h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.85rem, 4vw, 3rem);
}

.woocommerce-account .sbb-library-downloads-head > p:last-child {
  margin-bottom: 0;
  color: var(--sbb-muted, #71645c);
}

.woocommerce-account .sbb-library-download-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
}

.woocommerce-account .sbb-library-download-card__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin: -1rem -1rem 1rem;
  background: var(--sbb-cream, #f7f0e8);
}

.woocommerce-account .sbb-library-download-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.woocommerce-account .sbb-library-download-card__image:hover img {
  transform: scale(1.025);
}

.woocommerce-account .sbb-library-download-card > span {
  color: var(--sbb-brand, #735643);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.woocommerce-account .sbb-library-download-card h3 {
  margin: .3rem 0 .35rem;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}

.woocommerce-account .sbb-library-download-card > p {
  margin: 0 0 .75rem;
  color: var(--sbb-muted, #71645c);
  font-size: .82rem;
}

.woocommerce-account .sbb-library-download-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
}

.woocommerce-account .sbb-library-download-meta > div {
  min-width: 0;
  padding: .65rem .7rem;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .sbb-library-download-meta dt {
  color: var(--sbb-muted, #71645c);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.woocommerce-account .sbb-library-download-meta dd {
  margin: .12rem 0 0;
  overflow-wrap: anywhere;
  color: var(--sbb-ink, #342b26);
  font-size: .76rem;
  font-weight: 850;
}

.woocommerce-account .sbb-library-download-card__actions {
  margin-top: auto;
  padding-top: 1rem;
}

.woocommerce-account .sbb-library-download-card__actions .sbb-btn {
  min-height: 44px;
  flex: 1 1 130px;
  padding: .65rem .9rem;
  font-size: .78rem;
}

/* Recent orders and full order history */
.woocommerce-account .sbb-library-order-list {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: .7rem;
}

.woocommerce-account .sbb-library-order-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(120px, 1.35fr) minmax(100px, .8fr) minmax(100px, .8fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .85rem;
  border: 1px solid transparent;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-paper, #fffaf4);
  font-size: .8rem;
}

.woocommerce-account .sbb-library-order-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.woocommerce-account .sbb-library-order-row:hover {
  border-color: var(--sbb-line, #e8dbcf);
  background: #fff;
}

.woocommerce-account .sbb-library-order-row span,
.woocommerce-account .sbb-library-order-card__top > div > span {
  display: block;
  margin-bottom: .12rem;
  color: var(--sbb-muted, #71645c);
  font-size: .67rem;
  font-weight: 700;
}

.woocommerce-account .sbb-library-order-row a {
  color: var(--sbb-brand-strong, #5d4436);
  font-weight: 900;
}

.woocommerce-account .sbb-library-order-card {
  overflow: hidden;
  padding: clamp(1rem, 2.5vw, 1.4rem);
}

.woocommerce-account .sbb-library-order-card__top {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: .7rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sbb-line, #e8dbcf);
}

.woocommerce-account .sbb-library-order-card__datum {
  min-width: 0;
  padding: .65rem .7rem;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .sbb-library-order-card__value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--sbb-ink, #342b26);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.4;
}

.woocommerce-account .sbb-library-order-card__value a {
  color: var(--sbb-brand-strong, #5d4436);
}

.woocommerce-account .sbb-library-order-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .35rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: var(--sbb-sky, #dfe8ed);
  color: var(--sbb-ink-soft, #554942);
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.2;
}

.woocommerce-account .sbb-library-order-status::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.woocommerce-account :is(.sbb-library-order-status--completed, .sbb-library-order-status--processing) {
  background: var(--sbb-sage, #dce5d7);
  color: var(--sbb-success, #42674f);
}

.woocommerce-account :is(.sbb-library-order-status--failed, .sbb-library-order-status--cancelled, .sbb-library-order-status--refunded) {
  background: #f8e2df;
  color: var(--sbb-error, #a33f3f);
}

.woocommerce-account .sbb-library-order-products {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  padding-block: 1rem;
}

.woocommerce-account .sbb-library-order-product {
  display: grid;
  min-width: 0;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  padding: .65rem;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .sbb-library-order-product > div {
  min-width: 0;
}

.woocommerce-account .sbb-library-order-product__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 9px;
  background: var(--sbb-cream, #f7f0e8);
}

.woocommerce-account .sbb-library-order-product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woocommerce-account .sbb-library-order-product strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.35;
}

.woocommerce-account .sbb-library-order-product > div > span {
  display: block;
  color: var(--sbb-muted, #71645c);
  font-size: .7rem;
}

.woocommerce-account .sbb-library-order-product__reader {
  color: var(--sbb-brand-strong, #5d4436);
  font-size: .72rem;
  font-weight: 900;
}

.woocommerce-account .sbb-library-order-actions {
  justify-content: flex-end;
  padding-top: .85rem;
  border-top: 1px solid var(--sbb-line, #e8dbcf);
}

.woocommerce-account .sbb-library-order-actions .button {
  min-height: 42px;
  padding: .6rem 1rem;
  font-size: .78rem;
}

.woocommerce-account .woocommerce-pagination.woocommerce-Pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  margin-top: 1.2rem;
}

.woocommerce-account .woocommerce-pagination .woocommerce-button--previous {
  justify-self: start;
}

.woocommerce-account .woocommerce-pagination .woocommerce-button--next {
  grid-column: 3;
  justify-self: end;
}

.woocommerce-account .sbb-library-pagination-status {
  grid-column: 2;
  grid-row: 1;
  color: var(--sbb-muted, #71645c);
  font-size: .76rem;
  font-weight: 800;
}

/* Empty and extension states */
.woocommerce-account .sbb-library-empty,
.woocommerce-account .sbb-library-empty-inline {
  width: 100%;
  max-width: 100%;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px dashed var(--sbb-line-strong, #d8c5b5);
  border-radius: var(--sbb-radius-lg, 26px);
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, .92), transparent 24%),
    linear-gradient(135deg, var(--sbb-paper, #fffaf4), var(--sbb-cream, #f7f0e8));
  color: var(--sbb-muted, #71645c);
  text-align: center;
}

.woocommerce-account .sbb-library-empty h3 {
  margin-bottom: .35rem;
}

.woocommerce-account .sbb-library-empty p,
.woocommerce-account .sbb-library-empty-inline p {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
}

.woocommerce-account .sbb-account-extension-slot:empty {
  display: none;
}

.woocommerce-account .sbb-account-extension-slot:not(:empty) {
  display: grid;
  min-width: 0;
  gap: .75rem;
  padding-top: .25rem;
}

/* Sign in and registration */
.woocommerce-account .sbb-auth-shell {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1rem, 3vw, 1.6rem);
}

.woocommerce-account .sbb-auth-shell--login-only {
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
}

.woocommerce-account .sbb-auth-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: clamp(1.3rem, 3.5vw, 2.35rem);
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-xl, 34px);
  background: #fff;
  box-shadow: var(--sbb-shadow-sm, 0 16px 42px rgba(74, 53, 39, .08));
}

.woocommerce-account .sbb-auth-shell .u-column1,
.woocommerce-account .sbb-auth-shell .u-column2,
.woocommerce-account .sbb-auth-shell .col-1,
.woocommerce-account .sbb-auth-shell .col-2 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  float: none;
}

.woocommerce-account .sbb-auth-card--register {
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 255, 255, .85), transparent 24%),
    var(--sbb-paper, #fffaf4);
}

.woocommerce-account .sbb-auth-card__head > span {
  color: var(--sbb-brand, #735643);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.woocommerce-account .sbb-auth-card__head h2 {
  margin: .35rem 0 .4rem;
  overflow-wrap: anywhere;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
}

.woocommerce-account .sbb-auth-card__head p {
  margin-bottom: 0;
  color: var(--sbb-muted, #71645c);
  font-size: .88rem;
}

.woocommerce-account .sbb-auth-social {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-block: 1.15rem;
}

.woocommerce-account .sbb-social-login {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: .55rem;
  padding: .62rem .72rem;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-sm, 12px);
  background: #fff;
  color: var(--sbb-ink-soft, #554942);
  font-size: .73rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.woocommerce-account .sbb-social-login:hover {
  border-color: var(--sbb-brand-soft, #b98f70);
  background: var(--sbb-cream, #f7f0e8);
}

.woocommerce-account .sbb-auth-or {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-block: 1rem;
  color: var(--sbb-muted, #71645c);
  font-size: .7rem;
  text-align: center;
}

.woocommerce-account .sbb-auth-or::before,
.woocommerce-account .sbb-auth-or::after {
  height: 1px;
  flex: 1;
  background: var(--sbb-line, #e8dbcf);
  content: "";
}

.woocommerce-account .sbb-auth-form,
.woocommerce-account .woocommerce-MyAccount-content form {
  max-width: 100%;
  min-width: 0;
}

.woocommerce-account .sbb-auth-form .form-row,
.woocommerce-account .woocommerce-MyAccount-content form .form-row {
  width: 100%;
  max-width: 100%;
  margin: 0 0 .9rem;
  padding: 0;
  float: none;
}

.woocommerce-account .sbb-auth-form label,
.woocommerce-account .woocommerce-MyAccount-content form .form-row label {
  display: inline-block;
  margin-bottom: .35rem;
  color: var(--sbb-ink-soft, #554942);
  font-size: .75rem;
  font-weight: 800;
}

.woocommerce-account .sbb-auth-form :is(input.input-text, select, textarea),
.woocommerce-account .woocommerce-MyAccount-content form :is(input.input-text, select, textarea),
.woocommerce-account .woocommerce-MyAccount-content .select2-container {
  width: 100%;
  max-width: 100%;
}

.woocommerce-account .sbb-auth-form :is(input.input-text, select, textarea),
.woocommerce-account .woocommerce-MyAccount-content form :is(input.input-text, select, textarea) {
  min-height: 50px;
  padding: .72rem .85rem;
  border: 1px solid var(--sbb-line-strong, #d8c5b5);
  border-radius: var(--sbb-radius-sm, 12px);
  background: #fff;
  color: var(--sbb-ink, #342b26);
  box-shadow: none;
}

.woocommerce-account .sbb-auth-form textarea,
.woocommerce-account .woocommerce-MyAccount-content form textarea {
  min-height: 130px;
  resize: vertical;
}

.woocommerce-account .sbb-auth-form :is(input.input-text, select, textarea):focus,
.woocommerce-account .woocommerce-MyAccount-content form :is(input.input-text, select, textarea):focus {
  border-color: var(--sbb-brand, #735643);
  outline: 0;
  box-shadow: var(--sbb-shadow-focus, 0 0 0 4px rgba(115, 86, 67, .2));
}

.woocommerce-account .sbb-auth-form .password-input,
.woocommerce-account .woocommerce-MyAccount-content form .password-input {
  display: block;
  width: 100%;
  max-width: 100%;
}

.woocommerce-account .sbb-auth-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-top: .25rem;
}

.woocommerce-account .sbb-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  cursor: pointer;
}

.woocommerce-account .sbb-auth-remember input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--sbb-brand, #735643);
}

.woocommerce-account .sbb-auth-submit {
  min-width: 146px;
}

.woocommerce-account .sbb-auth-lost {
  margin: .8rem 0 0;
  text-align: right;
}

.woocommerce-account .sbb-auth-lost a {
  color: var(--sbb-brand-strong, #5d4436);
  font-size: .78rem;
  font-weight: 800;
}

.woocommerce-account .sbb-auth-generated-password-note {
  padding: .8rem;
  border-radius: var(--sbb-radius-sm, 12px);
  background: var(--sbb-sage, #dce5d7);
  color: var(--sbb-ink-soft, #554942);
  font-size: .8rem;
}

.woocommerce-account .sbb-auth-register-action,
.woocommerce-account .sbb-auth-register-action .sbb-auth-submit {
  width: 100%;
}

/* Unoverridden WooCommerce endpoints: address, profile, payment, view order */
.woocommerce-account .woocommerce-MyAccount-content > :first-child {
  margin-top: 0;
}

.woocommerce-account .woocommerce-MyAccount-content > :last-child {
  margin-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-content > p,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-address-fields,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-EditAccountForm,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-details,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods {
  max-width: 100%;
  min-width: 0;
}

.woocommerce-account .woocommerce-MyAccount-content > p:not(.woocommerce-info) {
  color: var(--sbb-muted, #71645c);
}

.woocommerce-account .woocommerce-MyAccount-content fieldset {
  min-width: 0;
  margin: 1.2rem 0;
  padding: clamp(1rem, 2.5vw, 1.4rem);
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .woocommerce-MyAccount-content legend {
  padding-inline: .35rem;
  color: var(--sbb-ink, #342b26);
  font-family: var(--sbb-font-display, Georgia, serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row-first,
.woocommerce-account .woocommerce-MyAccount-content form .form-row-last {
  width: calc(50% - .45rem);
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row-first {
  float: left;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row-last {
  float: right;
}

.woocommerce-account .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.woocommerce-account .woocommerce-Addresses::before,
.woocommerce-account .woocommerce-Addresses::after {
  display: none;
  content: none;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.4rem);
  float: none;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: #fff;
  box-shadow: var(--sbb-shadow-xs, 0 8px 24px rgba(74, 53, 39, .06));
}

.woocommerce-account .woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.woocommerce-account .woocommerce-Address-title::before,
.woocommerce-account .woocommerce-Address-title::after {
  display: none;
  content: none;
}

.woocommerce-account .woocommerce-Address-title h2,
.woocommerce-account .woocommerce-Address-title h3 {
  margin: 0;
  font-size: 1.35rem;
}

.woocommerce-account .woocommerce-Address-title .edit {
  flex: 0 0 auto;
  color: var(--sbb-brand-strong, #5d4436);
  font-size: .78rem;
  font-weight: 850;
}

.woocommerce-account .woocommerce-Address address {
  margin-top: 1rem;
  color: var(--sbb-muted, #71645c);
  font-style: normal;
}

.woocommerce-account .woocommerce-MyAccount-content :is(table.shop_table, table.account-payment-methods-table) {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: #fff;
}

.woocommerce-account .woocommerce-MyAccount-content :is(table.shop_table, table.account-payment-methods-table) th,
.woocommerce-account .woocommerce-MyAccount-content :is(table.shop_table, table.account-payment-methods-table) td {
  padding: .8rem;
  border-bottom: 1px solid var(--sbb-line, #e8dbcf);
  overflow-wrap: anywhere;
  text-align: left;
}

.woocommerce-account .woocommerce-MyAccount-content :is(table.shop_table, table.account-payment-methods-table) tr:last-child > * {
  border-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-details,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details {
  margin-top: 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-x: auto;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-lg, 26px);
  background: #fff;
  box-shadow: var(--sbb-shadow-xs, 0 8px 24px rgba(74, 53, 39, .06));
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details address {
  padding: 0;
  border: 0;
}

.woocommerce-account .woocommerce-MyAccount-content :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 1rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--sbb-line, #e8dbcf);
  border-radius: var(--sbb-radius-md, 18px);
  background: var(--sbb-paper, #fffaf4);
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error {
  border-color: rgba(163, 63, 63, .25);
  background: #fff7f6;
}

.woocommerce-account .woocommerce-MyAccount-content :is(.woocommerce-info, .woocommerce-message) .button {
  margin-left: .65rem;
  float: none;
}

/* Tablet */
@media (max-width: 1024px) {
  .woocommerce-account .sbb-library-top {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .55fr);
  }

  .woocommerce-account .sbb-library-layout {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-sidebar {
    position: static;
    top: auto;
  }

  .woocommerce-account .sbb-account-navigation ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .woocommerce-account .sbb-account-navigation a:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 820px) {
  .woocommerce-account .sbb-auth-hero {
    grid-template-columns: 1fr;
    background:
      linear-gradient(90deg, rgba(255, 250, 244, .98), rgba(255, 250, 244, .88)),
      url("../images/illustration-library-v310.webp") center / cover no-repeat,
      #f7f0e8;
  }

  .woocommerce-account .sbb-library-top {
    grid-template-columns: 1fr;
    background:
      linear-gradient(90deg, rgba(255, 250, 244, .98), rgba(255, 250, 244, .88)),
      url("../images/illustration-library-v310.webp") center / cover no-repeat,
      #f7f0e8;
  }

  .woocommerce-account .sbb-library-top__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .woocommerce-account .sbb-library-welcome-card {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-welcome-card__chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .woocommerce-account .sbb-library-bookshelf,
  .woocommerce-account .sbb-library-download-grid,
  .woocommerce-account .sbb-library-order-products {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-auth-shell {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .woocommerce-account .sbb-auth-hero {
    min-height: 0;
    padding: 1.35rem;
    border-radius: 24px;
  }

  .woocommerce-account .sbb-auth-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3.3rem);
  }

  .woocommerce-account .sbb-library-top {
    gap: 1.15rem;
    padding: 1.35rem;
    border-radius: 24px;
  }

  .woocommerce-account .sbb-library-top h1 {
    font-size: clamp(2.15rem, 11vw, 3.45rem);
  }

  .woocommerce-account .sbb-library-top__summary,
  .woocommerce-account .sbb-library-welcome-card__chips {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-account-navigation ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .55rem;
  }

  .woocommerce-account .sbb-account-navigation a {
    min-height: 44px;
    grid-template-columns: 21px minmax(0, 1fr);
    gap: .55rem;
    padding: .62rem .65rem;
    font-size: .75rem;
  }

  .woocommerce-account .sbb-library-action-grid {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .woocommerce-account .sbb-library-order-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .sbb-library-order-row > a {
    justify-self: start;
  }

  .woocommerce-account .sbb-library-order-actions {
    justify-content: stretch;
  }

  .woocommerce-account .sbb-library-order-actions .button {
    flex: 1 1 130px;
  }

  .woocommerce-account .sbb-auth-social {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-auth-form__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .woocommerce-account .sbb-auth-submit {
    width: 100%;
  }

  .woocommerce-account .sbb-auth-lost {
    text-align: left;
  }

  .woocommerce-account .woocommerce-MyAccount-content form .form-row-first,
  .woocommerce-account .woocommerce-MyAccount-content form .form-row-last {
    width: 100%;
    float: none;
  }

  .woocommerce-account .woocommerce-Addresses {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .woocommerce-MyAccount-content :is(table.shop_table, table.account-payment-methods-table) {
    min-width: 560px;
  }

  .woocommerce-account .sbb-library-main .woocommerce-MyAccount-content {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 440px) {
  .woocommerce-account .sbb-account-navigation ul {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-welcome-card,
  .woocommerce-account .sbb-library-section-card,
  .woocommerce-account .sbb-library-order-card,
  .woocommerce-account .sbb-auth-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .woocommerce-account .sbb-library-book-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .woocommerce-account .sbb-library-order-row {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-order-card__top {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .sbb-library-order-product {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .woocommerce-account .sbb-library-download-meta {
    grid-template-columns: 1fr;
  }

  .woocommerce-account .woocommerce-pagination.woocommerce-Pagination {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .sbb-library-pagination-status {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .woocommerce-account .woocommerce-pagination .woocommerce-button--previous {
    grid-column: 1;
    grid-row: 2;
  }

  .woocommerce-account .woocommerce-pagination .woocommerce-button--next {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .woocommerce-account .sbb-library-action-card:hover,
  .woocommerce-account .sbb-account-navigation a:hover,
  .woocommerce-account .sbb-library-book-card__cover:hover img,
  .woocommerce-account .sbb-library-download-card__image:hover img {
    transform: none;
  }
}

@media print {
  .woocommerce-account .sbb-library-sidebar,
  .woocommerce-account .sbb-library-top__summary {
    display: none;
  }

  .woocommerce-account .sbb-library-top,
  .woocommerce-account .sbb-library-layout {
    display: block;
  }

  .woocommerce-account .sbb-library-top {
    min-height: 0;
    padding: 1rem 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }
}
