/* Alpha Diagnostics — sticky buy, version 1 */
.ad-sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 900;
  display: none;
  background: #fff;
  border-bottom: 1px solid #dce5ee;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .09);
  font-family: Arial, sans-serif;
}

.ad-sticky-buy.is-visible {
  display: block;
}

.ad-sticky-buy__inner {
  max-width: 1180px;
  min-height: 68px;
  margin: 0 auto;
  padding: 9px 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.ad-sticky-buy__info {
  min-width: 0;
}

.ad-sticky-buy__name {
  font-size: 15px;
  font-weight: 600;
  color: #172033;
  line-height: 1.4;
}

.ad-sticky-buy__price {
  font-size: 23px;
  font-weight: 700;
  color: #172033;
  white-space: nowrap;
}

.ad-sticky-buy__button {
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  padding: 14px 30px;
  background: #d71920;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.ad-sticky-buy__button:hover {
  background: #b9141a;
}

.ad-sticky-buy__button:focus-visible {
  outline: 3px solid #1598be;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .ad-sticky-buy {
    top: auto;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-bottom: 0;
    border-top: 1px solid #dce5ee;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, .10);
  }

  .ad-sticky-buy__inner {
    min-height: 64px;
    padding: 9px 14px;
    gap: 12px;
  }

  .ad-sticky-buy__name {
    display: none;
  }

  .ad-sticky-buy__price {
    font-size: 21px;
  }

  .ad-sticky-buy__button {
    min-height: 46px;
    padding: 11px 22px;
    font-size: 16px;
  }

  body.ad-sticky-buy-active {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  }
}

/* Sticky Buy — desktop redesign, October 2026 */
@media (min-width: 768px) {

  .ad-sticky-buy {
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e9ef;
    box-shadow: 0 4px 18px rgba(20, 35, 55, 0.09);
    z-index: 900;
  }

  .ad-sticky-buy__inner {
    max-width: 1200px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .ad-sticky-buy__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex: 1;
    min-width: 0;
  }

  .ad-sticky-buy__name {
    font-size: 15px;
    font-weight: 600;
    color: #172033;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ad-sticky-buy__price {
    font-size: 24px;
    font-weight: 700;
    color: #172033;
    white-space: nowrap;
  }

  .ad-sticky-buy__button {
    min-height: 48px;
    padding: 12px 32px;
    border-radius: 8px;
    background: #d71920;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
  }

}


/* Sticky buy aligned to content column on desktop */
@media (min-width: 768px) {
  .ad-sticky-buy__inner {
    max-width: 960px;
    margin-left: calc(50% - 70px);
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Sticky buy — final desktop alignment */
@media (min-width: 768px) {
  .ad-sticky-buy__inner {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-left: 220px !important;
    padding-right: 24px !important;
  }

  .ad-sticky-buy__info {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* CoaguChek XS thumbnail — desktop */
@media (min-width: 768px) {
  .ad-sticky-buy__inner {
    gap: 12px !important;
  }

  .ad-sticky-buy__image {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .ad-sticky-buy__info {
    flex: 1;
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  .ad-sticky-buy__image {
    display: none;
  }
}

/* Mobile sticky buy — move price to the right */
@media (max-width: 767px) {
  .ad-sticky-buy__info {
    justify-content: flex-end !important;
    flex: 0 1 auto !important;
    margin-left: auto !important;
  }

  .ad-sticky-buy__inner {
    justify-content: flex-end !important;
    gap: 16px !important;
  }
}

/* Tablet sticky buy: stable centered layout without desktop sidebar offset.
   Applies to tablet-width viewport only; phone and desktop remain unchanged. */
@media (min-width: 768px) and (max-width: 1199px) {
  .ad-sticky-buy__inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 10px 16px !important;
    gap: 12px !important;
    justify-content: space-between !important;
  }

  .ad-sticky-buy__image {
    display: block;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
  }

  .ad-sticky-buy__info {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .ad-sticky-buy__name {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .ad-sticky-buy__price {
    flex: 0 0 auto;
    font-size: 20px;
    white-space: nowrap;
  }

  .ad-sticky-buy__button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
}
