/* Pick your smoothies (/byb/). Base styles, variables and shared blocks are in luke-home.css */

.lbtn-s {
  font-size: 14px;
  line-height: 20px;
  padding: 8px 22px;
}
.lbtn:disabled,
.lbtn.disabled {
  background: #96A09C;
  border-color: #96A09C;
  color: #E1E5E4;
  cursor: default;
  pointer-events: none;
}

/***************************************************************************** LAYOUT ***/
section.luke-byb { /* body has class luke-byb too */
  padding: 32px 0 var(--section);
}
.luke-byb-in {
  display: grid;
  gap: 24px;
  grid-template-areas: "head" "steps" "main";
  grid-template-columns: minmax(0, 1fr);
}
.luke-byb-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-area: head;
}
.luke-byb-head p {
  font-size: 16px;
  letter-spacing: -.02em;
  line-height: 22px;
  margin-top: 6px;
}
.luke-byb-steps {
  align-items: center;
  display: flex;
  gap: 16px;
  grid-area: steps;
}
.luke-byb-step {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 12px;
  letter-spacing: .08em;
  line-height: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
.luke-byb-step i {
  align-items: center;
  border: 1px solid var(--c-green);
  border-radius: 50%;
  color: var(--c-green);
  display: flex;
  font-size: 16px;
  font-style: normal;
  height: 32px;
  justify-content: center;
  letter-spacing: 0;
  width: 32px;
}
.luke-byb-step.active i {
  background: #F2F8E4;
  border-width: 2px;
}
.luke-byb-steps-line {
  background: var(--c-beige1);
  border-radius: 40px;
  flex: 1;
  height: 2px;
}
.luke-byb-main {
  grid-area: main;
  min-width: 0;
}
@media (min-width: 768px) {
  .luke-byb-head p {
    font-size: 18px;
    line-height: 24px;
  }
  .luke-byb-steps {
    gap: 24px;
  }
}
@media (min-width: 1200px) {
  section.luke-byb { /* /byb/, /byb-addons/: 80px to the features strip and from it to the reviews */
    padding-bottom: 80px;
    padding-top: 40px;
  }
  section.luke-byb ~ .luke-reviews {
    padding-top: 80px;
  }
  .luke-byb-in {
    align-items: start;
    column-gap: 60px;
    grid-template-areas: "head steps" "main side";
    grid-template-columns: minmax(0, 1fr) 420px;
    row-gap: 40px;
  }
  .luke-byb-steps {
    align-self: end;
  }
}
@media (min-width: 1500px) {
  .luke-byb-in {
    grid-template-columns: minmax(0, 1fr) 507px;
  }
}

/***************************************************************************** FILTERS ***/
.luke-byb-filters {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 24px;
  overflow-x: auto;
  padding: 0 var(--gutter);
  scrollbar-width: none;
}
.luke-byb-filters::-webkit-scrollbar {
  display: none;
}
.luke-byb-filter {
  background: var(--c-white);
  border: 1px solid var(--c-beige1);
  border-radius: 90px;
  color: var(--c-dark);
  display: block;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 7px 14px;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.luke-byb-filter:hover {
  border-color: var(--c-green);
  color: var(--c-dark);
}
.luke-byb-filter.active {
  background: var(--c-green-btn);
  border-color: var(--c-green-btn);
  color: var(--c-cream);
}
@media (min-width: 768px) {
  .luke-byb-filters {
    flex-wrap: wrap;
    margin: 0 0 32px;
    overflow: visible;
    padding: 0;
  }
  .luke-byb-filter {
    font-size: 16px;
    line-height: 22px;
    padding: 8px 15px;
  }
}

/***************************************************************************** PRODUCT CARDS ***/
.luke-byb-grid {
  display: grid;
  gap: 16px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.luke-pc {
  background: var(--c-white);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px var(--c-divider); /* not a border: the photo keeps the full card width and covers the line */
  position: relative;
  transition: box-shadow .2s;
}
.luke-pc:hover {
  box-shadow: inset 0 0 0 1px var(--c-divider), 0 8px 8px rgba(0, 0, 0, .06), 0 4px 6px rgba(0, 0, 0, .05);
}
.luke-pc.hidden {
  display: none;
}
.luke-pc-photo {
  position: relative;
}
.luke-pc-photo img {
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: cover;
  width: 100%;
}
.luke-pc-badge {
  font-size: 11px;
  left: 8px;
  line-height: 14px;
  padding: 5px 9px;
  position: absolute;
  top: 8px;
}
.luke-pc-view {
  background: var(--c-white);
  border-radius: 50%;
  bottom: 8px;
  box-shadow: 0 7px 6px rgba(146, 139, 130, .4);
  color: var(--c-dark);
  display: flex;
  padding: 8px;
  position: absolute;
  right: 8px;
  transition: background-color .2s, color .2s;
}
.luke-pc-view svg {
  height: 20px;
  width: 20px;
}
.luke-pc-view:hover {
  background: var(--c-green-btn);
  color: var(--c-white);
}
.luke-pc-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}
.luke-pc-name {
  color: var(--c-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
a.luke-pc-name:hover {
  color: var(--c-green);
  text-decoration: underline;
}
.luke-pc-sub {
  color: var(--c-gray);
  font-size: 13px;
  line-height: 18px;
}
.luke-pc-atc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.luke-pc-price {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}
.luke-pc-price b {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}
.luke-pc-price span {
  color: var(--c-gray);
  font-size: 14px;
  line-height: 20px;
}
.luke-pc-atc .lbtn {
  width: 100%;
}
.luke-pc .luke-step {
  display: none;
}
.luke-pc.in-box .luke-pc-add {
  display: none;
}
.luke-pc.in-box .luke-step {
  display: flex;
}
@media (min-width: 768px) {
  .luke-byb-grid {
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .luke-pc,
  .luke-pc-photo img {
    border-radius: 24px;
  }
  .luke-pc-badge {
    font-size: 13px;
    left: 11px;
    line-height: 18px;
    padding: 6px 12px;
    top: 11px;
  }
  .luke-pc-view {
    bottom: 12px;
    padding: 12px;
    right: 12px;
  }
  .luke-pc-view svg {
    height: 24px;
    width: 24px;
  }
  .luke-pc-info {
    padding: 16px 20px;
  }
  .luke-pc-name {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-pc-sub {
    font-size: 14px;
    line-height: 20px;
  }
  .luke-pc-atc {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    min-height: 48px;
    padding-top: 8px;
  }
  .luke-pc-atc .lbtn {
    padding-left: 18px;
    padding-right: 18px;
    width: auto;
  }
  .luke-pc-price {
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
  }
}

/* Stepper - N + */
.luke-step {
  align-items: center;
  align-self: flex-start;
  background: var(--c-white);
  border: 1px solid var(--c-dark);
  border-radius: 10px;
  display: flex;
  gap: 8px;
  padding: 5px 9px;
}
.luke-pc-atc .luke-step {
  align-self: stretch;
  justify-content: space-between;
  padding: 9px 12px;
}
.luke-step button {
  color: var(--c-dark);
  display: flex;
}
.luke-step button:hover {
  color: var(--c-green);
}
.luke-step-qty {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  min-width: 22px;
  text-align: center;
}
@media (min-width: 768px) {
  .luke-pc-atc .luke-step {
    align-self: center;
    padding: 5px 9px;
  }
}

/* +$1 badge with tooltip */
.luke-plus1 {
  align-items: center;
  background: #DAF1FE;
  border: 1px solid var(--c-white);
  border-radius: 60px;
  color: #00456C;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  line-height: 18px;
  padding: 3px 6px;
  position: relative;
}
.luke-pc .luke-plus1 {
  position: absolute;
  right: 8px;
  top: 8px;
}
.luke-plus1 svg {
  height: 18px;
  width: 18px;
}
.luke-tip {
  background: var(--c-dark);
  border-radius: 10px;
  color: var(--c-cream);
  display: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  padding: 10px 12px;
  position: absolute;
  right: -8px;
  text-align: left;
  top: calc(100% + 10px);
  width: 240px;
  z-index: 5;
}
.luke-tip::before {
  border: 8px solid transparent;
  border-bottom-color: var(--c-dark);
  border-top: 0;
  bottom: 100%;
  content: '';
  position: absolute;
  right: 16px;
}
.luke-plus1:hover .luke-tip,
.luke-plus1:focus .luke-tip,
.luke-plus1.open .luke-tip {
  display: block;
}
@media (max-width: 767px) { /* 2 columns: the tip of the left card starts at the left edge of the card (gap 10px, --gutter 20px) */
  .luke-pc .luke-tip {
    width: min(240px, calc(50vw - 25px));
  }
}
@media (max-width: 385px) { /* --gutter 15px */
  .luke-pc .luke-tip {
    width: min(240px, calc(50vw - 20px));
  }
}
@media (min-width: 768px) {
  .luke-pc .luke-plus1 {
    padding: 6px 8px;
    right: 11px;
    top: 11px;
  }
  .luke-plus1 svg {
    height: 20px;
    width: 20px;
  }
  .luke-tip {
    width: 255px;
  }
}

/***************************************************************************** YOUR BUNDLE ***/
.luke-bundle {
  background: var(--c-white);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.luke-bundle > * {
  flex-shrink: 0; /* the sidebar scrolls instead of squeezing its parts */
}
.luke-bundle-title {
  align-items: center;
  border-bottom: 1px solid var(--c-beige0);
  display: flex;
  font-size: 24px;
  font-weight: 500;
  justify-content: space-between;
  letter-spacing: -.03em;
  line-height: 28px;
  padding-bottom: 16px;
}
.luke-bundle-close {
  color: var(--c-dark);
  display: flex;
}
.luke-bundle-head {
  align-items: center;
  display: flex;
  gap: 12px;
}
.luke-bundle-name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 22px;
}
.luke-bundle-dot {
  background: var(--c-dark);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}
.luke-bundle-count {
  color: var(--c-gray);
  font-size: 14px;
  line-height: 20px;
}
.luke-bundle-min {
  align-items: center;
  background: #FEE9EE;
  border-radius: 60px;
  color: #E2365D;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 2px;
  line-height: 18px;
  margin-left: auto;
  padding: 6px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}
.luke-bundle-min.ok {
  background: #E9FAC0;
  color: var(--c-green);
  padding-left: 6px;
}

/* Progress bar: ticks at 7, 14, 21 (25/50/75%), full from 24 */
.luke-bar {
  background: #F2F8E4;
  border-radius: 50px;
  height: 16px;
  position: relative;
}
.luke-bar-zone {
  background: #FEE9EE;
  border-radius: 30px 0 0 30px;
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  width: 25%;
}
.luke-bar.ok .luke-bar-zone {
  display: none;
}
.luke-bar-fill {
  background: #FBC7D3;
  border-radius: 30px 0 0 30px;
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  transition: width .3s;
  width: 0;
}
.luke-bar-fill::after {
  background: #E2365D;
  border-radius: 30px;
  bottom: -2px;
  content: '';
  position: absolute;
  right: -1px;
  top: -2px;
  width: 2px;
}
.luke-bar.ok .luke-bar-fill {
  background: var(--c-lime);
}
.luke-bar.ok .luke-bar-fill::after {
  background: var(--c-green);
}
.luke-bar-tick {
  background: #A8AF95;
  height: 10px;
  margin-top: -5px;
  position: absolute;
  top: 50%;
  width: 1px;
}
.luke-bar-tick:nth-child(3) {
  background: #E2365D;
  height: 100%;
  left: 25%;
  margin-top: 0;
  top: 0;
}
.luke-bar.ok .luke-bar-tick:nth-child(3) {
  background: #ADC660;
  height: 10px;
  margin-top: -5px;
  top: 50%;
}
.luke-bar-tick:nth-child(4) {
  left: 50%;
}
.luke-bar-tick:nth-child(5) {
  left: 75%;
}
.luke-bar-s {
  height: 8px;
}
.luke-bar-s .luke-bar-tick {
  height: 8px;
  margin-top: -4px;
}

.luke-bundle-msg {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 6px 12px;
  line-height: 20px;
}
.luke-bundle-msg .muted {
  color: var(--c-gray);
}
.luke-chip {
  align-items: center;
  background: #E9FAC0;
  border-radius: 40px;
  color: var(--c-green);
  display: inline-flex;
  gap: 4px;
  padding: 3px 10px 3px 6px;
}
.luke-chip span {
  font-weight: 400;
}

.luke-bundle-items:empty {
  display: none;
}
.luke-bundle-items li {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 8px 0;
}
.luke-bundle-items li + li {
  border-top: 1px solid var(--c-beige0);
}
.luke-bundle-items img {
  border-radius: 12px;
  flex-shrink: 0;
  height: 48px;
  object-fit: cover;
  width: 48px;
}
.luke-bundle-item-name {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  gap: 4px 12px;
  line-height: 20px;
  min-width: 0;
}
.luke-bundle-items .luke-plus1 {
  padding: 2px 6px;
}
.luke-bundle-items .luke-step {
  align-self: center;
}
.luke-bundle-items .luke-tip {
  left: -60px;
  right: auto;
}
.luke-bundle-items .luke-tip::before {
  left: 76px;
  right: auto;
}

.luke-bundle-note {
  align-items: flex-start;
  background: #DAF1FE;
  border-radius: 10px;
  color: #00456C;
  display: none;
  font-size: 14px;
  gap: 6px;
  line-height: 20px;
  padding: 5px 10px;
}
.luke-bundle-note span {
  color: var(--c-dark);
}
.luke-bundle-note b {
  font-weight: 600;
}
.luke-bundle-note.show {
  display: flex;
}

.luke-bundle-sum {
  border-top: 1px solid var(--c-beige0);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}
.luke-bundle-row {
  align-items: center;
  display: flex;
  font-size: 16px;
  font-weight: 500;
  justify-content: space-between;
  letter-spacing: -.02em;
  line-height: 24px;
}
.luke-bundle-row > span:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
}
.luke-bundle-row b {
  font-size: 18px;
  font-weight: 500;
}
.luke-bundle-row small {
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  margin-right: 8px;
}
.luke-bundle-offer svg {
  color: var(--c-green);
}
.luke-bundle-offer b {
  color: var(--c-red);
}
.luke-bundle-total > span:first-child {
  font-size: 18px;
}
.luke-bundle-total s {
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  margin-right: 8px;
}
.luke-bundle-per {
  color: var(--c-gray);
  font-size: 14px;
  line-height: 20px;
}
.luke-bundle [data-full] {
  display: none;
}
.luke-bundle.full [data-full] {
  display: flex;
}
.luke-bundle.full .luke-bundle-per {
  display: block;
}
.luke-bundle-go {
  width: 100%;
}
/* Editing a bundle of the subscription (/dash/edit/…): "Discard changes" under the main button, the error of saving */
.luke-edit-discard {
  width: 100%;
}
.luke-edit-error {
  background: #FEE9EE;
  border-radius: 12px;
  color: var(--c-dark);
  font-size: 14px;
  line-height: 20px;
  padding: 10px 14px;
}
.luke-edit-error[hidden] {
  display: none;
}
.luke-edit-dates { /* step 2: "You won't be charged now", the next payment and delivery (Figma 209-30894) */
  background: #F2F0E8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 500;
  gap: 8px;
  line-height: 22px;
  padding: 16px;
}
.luke-edit-dates b {
  border-bottom: 1px solid var(--c-dark);
  font-weight: 600;
  padding-bottom: 8px;
}
.luke-edit-dates div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.luke-edit-dates div span:first-child {
  color: var(--c-gray);
}
.luke-edit-dates div span:last-child {
  white-space: nowrap;
}

@media (min-width: 768px) {
  .luke-bundle-title {
    font-size: 32px;
    line-height: 32px;
  }
  .luke-bundle-head {
    gap: 16px;
  }
  .luke-bundle-name {
    font-size: 20px;
    line-height: 24px;
  }
  .luke-bundle-count,
  .luke-bundle-msg {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-bundle-items img {
    height: 56px;
    width: 56px;
  }
  .luke-bundle-item-name {
    font-size: 16px;
    gap: 4px 16px;
    line-height: 22px;
  }
  .luke-bundle-row {
    font-size: 18px;
  }
  .luke-bundle-row b,
  .luke-bundle-total > span:first-child {
    font-size: 20px;
  }
  .luke-bundle-row small,
  .luke-bundle-total s,
  .luke-bundle-per {
    font-size: 16px;
    line-height: 22px;
  }
}

/* Desktop: sticky sidebar */
@media (min-width: 1200px) {
  .luke-byb-side {
    grid-area: side;
    position: sticky;
    top: 100px;
  }
  .luke-bundle {
    border-radius: 40px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .06), 0 4px 11px rgba(0, 0, 0, .05);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 40px 30px;
    scrollbar-width: thin;
  }
  .luke-bundle-close {
    display: none;
  }
  .luke-bundle-title {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .luke-bundle-title::after {
    content: none;
  }
  .luke-bundle-head {
    border-top: 1px solid var(--c-beige0);
    padding-top: 16px;
  }
  .luke-bbar {
    display: none;
  }
}

/* Below 1200: bottom bar + bottom sheet */
@media (max-width: 1199px) {
  body.luke-byb {
    padding-bottom: 110px;
  }
  .luke-byb-side { /* position and slide only; the sheet itself scrolls (iOS does not scroll a pointer-events: none box) */
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    transform: translateY(100%);
    transition: transform .3s, visibility .3s;
    visibility: hidden;
    z-index: 60;
  }
  .luke-sheet-open .luke-byb-side {
    pointer-events: none; /* empty space beside the 600px sheet: clicks go to the shade */
    transform: none;
    visibility: visible;
  }
  .luke-bundle {
    -webkit-overflow-scrolling: touch;
    border-radius: 24px 24px 0 0;
    margin: 0 auto;
    max-height: 90vh;
    max-height: 90dvh; /* Safari toolbars */
    max-width: 600px;
    overflow-y: auto;
    overscroll-behavior: contain; /* the page under the sheet does not scroll */
    padding: 24px 16px;
    pointer-events: auto;
  }
  .luke-sheet-open .luke-shade {
    cursor: pointer; /* iOS Safari fires click on a div only with a pointer cursor */
    display: block;
    z-index: 55;
  }
  .luke-bbar {
    align-items: center;
    background: var(--c-white);
    border-radius: 10px 10px 0 0;
    bottom: 0;
    box-shadow: 0 -8px 18px rgba(0, 0, 0, .06), 0 -4px 11px rgba(0, 0, 0, .05);
    display: flex;
    gap: 16px;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    right: 0;
    z-index: 50;
  }
  .luke-bbar-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .luke-bbar-open {
    align-items: center;
    align-self: flex-start;
    color: var(--c-dark);
    display: flex;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    letter-spacing: -.03em;
    line-height: 20px;
  }
  .luke-bbar .luke-bundle-msg {
    font-size: 12px;
    gap: 6px 8px;
    line-height: 16px;
  }
  .luke-bbar .luke-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px 3px 6px;
  }
  .luke-bbar .luke-chip svg {
    height: 16px;
    width: 16px;
  }
  .luke-bbar .luke-bundle-go {
    flex-shrink: 0;
    width: auto;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .luke-bbar {
    padding: 14px var(--gutter);
  }
}
