/*
 * Booze Bag Account Linen Label
 *
 * Activates only after the companion script validates Tonda Membership's
 * account widget. The existing login, account and protected logout URLs remain
 * owned by Tonda/WooCommerce.
 */

:root {
  --bb-account-green: #294337;
  --bb-account-paper: #faf5eb;
  --bb-account-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

.bb-account-swatch-tabs,
.bb-account-swatch-tabs *,
.bb-account-swatch-tabs *::before,
.bb-account-swatch-tabs *::after {
  box-sizing: border-box;
}

.bb-account-swatch-tabs {
  position: relative !important;
  top: 10px;
  overflow: visible !important;
}

.bb-account-fallback-shell {
  position: absolute !important;
  z-index: 80;
  top: 0;
  left: 0;
  display: block !important;
  width: 300px !important;
  overflow: visible !important;
  transform: scale(0.8);
  transform-origin: top left;
}

.bb-account-fallback-position,
.bb-account-fallback-mount {
  position: relative !important;
  z-index: 140 !important;
  overflow: visible !important;
}

.bb-account-swatch-tabs [hidden] {
  display: none !important;
}

/* Shared linen main label. */
.bb-account-label__main-art {
  position: absolute !important;
  z-index: 0;
  inset: 0;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
  border-radius: 0 !important;
  clip-path: none !important;
  pointer-events: none;
  object-fit: fill;
  user-select: none;
}

/* Exact pixels from the existing dark loop form the foreground strand through
 * the brass eye. The full-size transparent canvas shares the same coordinates
 * as the loop behind the label, so that strand continues to the hanging tags. */
.bb-account-swatch__loop-front {
  position: absolute !important;
  z-index: 4;
  top: 49px;
  left: -2px;
  display: block !important;
  width: 203px !important;
  max-width: none !important;
  height: 241px !important;
  margin: 0 !important;
  overflow: visible !important;
  border-radius: 0 !important;
  clip-path: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  object-fit: fill;
  transform: none;
  user-select: none;
}

.bb-account-swatch-tabs--logged-in[data-bb-open="true"]
  .bb-account-swatch__loop-front {
  opacity: 1;
  visibility: visible;
}

.bb-account-label__eyebrow,
.bb-account-label__name {
  position: absolute;
  z-index: 2;
  left: 38.6%;
  display: block;
  width: 39%;
  overflow: hidden;
  color: var(--bb-account-green) !important;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-account-label__eyebrow {
  top: 27%;
  font-family: Raleway, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.bb-account-label__name {
  top: 43%;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 25px !important;
  font-weight: 400 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.05 !important;
  text-transform: none !important;
}

/* Logged-out state: the original Tonda opener still opens its login modal. */
.bb-account-swatch-tabs--logged-out .qodef-login-opener {
  position: relative;
  display: block !important;
  width: 300px !important;
  height: 101px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  outline: 0 !important;
  color: var(--bb-account-green) !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.bb-account-swatch-tabs--logged-out .qodef-login-opener::before,
.bb-account-swatch-tabs--logged-out .qodef-login-opener::after {
  display: none !important;
  content: none !important;
}

.bb-account-swatch-tabs--logged-out .bb-account-label__name {
  overflow: visible;
  padding-bottom: 4px;
  line-height: 1.2 !important;
}

.bb-account-swatch-tabs--logged-out
  .qodef-login-opener:focus-visible
  .bb-account-label__name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Logged-in trigger. */
.bb-account-swatch-tabs--logged-in .qodef-logged-in-user {
  display: block !important;
  width: 300px !important;
  height: 101px !important;
}

.bb-account-swatch-tabs--logged-in .qodef-logged-in-user-inner {
  position: relative;
  z-index: 32;
  display: block !important;
  width: 300px !important;
  height: 101px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  outline: 0 !important;
  color: var(--bb-account-green);
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

.bb-account-swatch-tabs--logged-in
  .qodef-logged-in-user-inner::before,
.bb-account-swatch-tabs--logged-in
  .qodef-logged-in-user-inner::after {
  display: none !important;
  content: none !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-logged-in-user-inner
  > span {
  position: relative;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.bb-account-swatch-tabs--logged-in .qodef-logged-in-user img.avatar {
  display: none !important;
}

.bb-account-swatch-tabs--logged-in .qodef-logged-in-user-name {
  position: absolute !important;
  z-index: 2;
  top: 43%;
  left: 38.6%;
  display: block !important;
  width: 39%;
  max-width: none !important;
  overflow: hidden;
  color: var(--bb-account-green) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 25px !important;
  font-weight: 400 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.05 !important;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: none !important;
  white-space: nowrap;
}

.bb-account-swatch-tabs--logged-in
  .bb-account-label--long-name
  .qodef-logged-in-user-name {
  font-size: 20px !important;
  letter-spacing: -0.025em !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-logged-in-user-inner:focus-visible
  .qodef-logged-in-user-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bb-account-swatch__chevron {
  display: none !important;
}

/* Hanging Account and Log out labels. */
.bb-account-swatch-tabs--logged-in .qodef-login-dropdown {
  position: absolute !important;
  z-index: 30 !important;
  top: 49px !important;
  left: -2px !important;
  display: block !important;
  width: 203px !important;
  min-width: 203px !important;
  height: 260px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  list-style: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  transform: translateY(-5px) scale(0.98);
  transform-origin: 32px 11px;
  transition:
    opacity 150ms ease,
    visibility 150ms ease,
    transform 240ms var(--bb-account-ease);
}

.bb-account-swatch-tabs--logged-in[data-bb-open="true"]
  .qodef-login-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bb-account-swatch-tabs--logged-in .qodef-login-dropdown > li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.bb-account-swatch__art {
  position: absolute !important;
  z-index: 1;
  inset: 0 auto auto 0;
  display: block !important;
  width: 203px !important;
  height: 260px !important;
  pointer-events: none;
}

.bb-account-swatch__art img {
  position: absolute;
  display: block;
  max-width: none !important;
  pointer-events: none;
  user-select: none;
}

.bb-account-swatch__logout-art {
  z-index: 1;
  top: 113px;
  left: 19px;
  width: 184px;
  height: 146px;
  filter:
    drop-shadow(0 7px 5px rgba(61, 47, 29, 0.14))
    drop-shadow(0 2px 2px rgba(61, 47, 29, 0.11));
  object-fit: fill;
}

.bb-account-swatch__upper-art {
  z-index: 2;
  top: 0;
  left: 0;
  width: 203px;
  height: 241px;
  clip-path: inset(0 0 20% 0);
  filter:
    drop-shadow(0 7px 5px rgba(61, 47, 29, 0.16))
    drop-shadow(0 2px 2px rgba(61, 47, 29, 0.13));
  object-fit: fill;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item {
  position: absolute !important;
  z-index: 3;
  display: block !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item--account {
  top: 37px !important;
  left: 0 !important;
  width: 180px !important;
  height: 145px !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item--logout {
  top: 179px !important;
  left: 21px !important;
  width: 182px !important;
  height: 53px !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  color: var(--bb-account-green) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: Raleway, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0.25em !important;
  line-height: 1 !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase !important;
  transform: scale(1);
  transition: color 150ms ease, transform 150ms ease, text-shadow 150ms ease;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item--logout
  > a {
  font-size: 11px !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a::before,
.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a::after {
  display: none !important;
  content: none !important;
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a:hover,
.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a:focus-visible {
  color: #102c21 !important;
  outline: 0 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: scale(1.04);
}

.bb-account-swatch-tabs--logged-in
  .qodef-login-dropdown
  > .bb-account-swatch__item
  > a:focus-visible {
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px;
}

@media (max-width: 680px) {
  .bb-account-swatch-tabs--logged-out .qodef-login-opener,
  .bb-account-swatch-tabs--logged-in .qodef-logged-in-user,
  .bb-account-swatch-tabs--logged-in .qodef-logged-in-user-inner {
    width: 264px !important;
    height: 89px !important;
  }

  .bb-account-label__eyebrow {
    font-size: 9px !important;
  }

  .bb-account-label__name,
  .bb-account-swatch-tabs--logged-in .qodef-logged-in-user-name {
    font-size: 22px !important;
  }

  .bb-account-swatch__loop-front {
    top: 66px;
    left: 7px;
  }

  .bb-account-swatch-tabs--logged-in .qodef-login-dropdown {
    top: 66px !important;
    left: 7px !important;
    transform-origin: 28px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-account-swatch-tabs *,
  .bb-account-swatch-tabs *::before,
  .bb-account-swatch-tabs *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
