/*
 * Shared frontend tweaks that are safe to load sitewide.
 * Focused on stabilizing the header controls used across sales pages.
 */

.et-l--header .et_pb_column_4_tb_header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.et-l--header .et_pb_column_4_tb_header > .et_pb_module {
  margin: 0 !important;
  flex: 0 0 auto;
}

.et-l--header .et_pb_blurb_0_tb_header,
.et-l--header .et_pb_text_1_tb_header,
.et-l--header .et_pb_text_2_tb_header {
  display: flex;
  align-items: center;
  min-height: 40px;
  height: 40px;
  border: 1px solid rgba(33, 49, 77, 0.08);
  border-radius: 12px !important;
  background: #f3f4f6 !important;
  box-shadow: none !important;
  overflow: hidden;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease !important;
}

.et-l--header .et_pb_blurb_0_tb_header,
.et-l--header .et_pb_blurb_0_tb_header:hover {
  width: auto !important;
  min-width: 86px;
  margin: 0 !important;
  padding: 0 10px !important;
  transform: none !important;
}

.et-l--header .et_pb_text_1_tb_header,
.et-l--header .et_pb_text_1_tb_header:hover {
  width: auto !important;
  min-width: 112px;
  margin: 0 !important;
  padding: 0 10px !important;
  transform: none !important;
}

.et-l--header .et_pb_text_2_tb_header,
.et-l--header .et_pb_text_2_tb_header:hover {
  width: auto !important;
  min-width: 104px;
  margin: 0 !important;
  padding: 0 10px !important;
  transform: none !important;
}

.et-l--header .et_pb_blurb_0_tb_header:hover,
.et-l--header .et_pb_text_1_tb_header:hover,
.et-l--header .et_pb_text_2_tb_header:hover {
  background: #eceef2 !important;
  box-shadow: 0 10px 24px rgba(33, 49, 77, 0.08) !important;
}

.et-l--header .et_pb_blurb_0_tb_header .et_pb_blurb_content,
.et-l--header .et_pb_text_1_tb_header .et_pb_text_inner,
.et-l--header .et_pb_text_2_tb_header .et_pb_text_inner,
.et-l--header .wishlist_products_counter,
.et-l--header .cartpops-cart__toggle,
.et-l--header .cartpops-cart__container,
.et-l--header .cartpops-cart__container-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 0.5rem;
  white-space: nowrap;
}

.et-l--header .et_pb_blurb_0_tb_header .et_pb_main_blurb_image {
  margin-bottom: 0;
}

.et-l--header .et_pb_blurb_0_tb_header .et_pb_module_header {
  margin: 0 !important;
  padding-bottom: 0;
  color: var(--eoy-store-text) !important;
  line-height: 1;
  white-space: nowrap;
}

.et-l--header .et_pb_blurb_0_tb_header .et_pb_image_wrap,
.et-l--header .wishlist_products_counter img {
  width: 18px !important;
  height: 18px;
  transform: none !important;
}

.et-l--header .wishlist_products_counter img {
  position: static;
  top: auto;
  right: auto;
  object-fit: contain;
}

.et-l--header .et_pb_text_1_tb_header p,
.et-l--header .et_pb_text_2_tb_header p {
  margin: 0;
  padding: 0;
}

.et-l--header .wishlist_products_counter,
.et-l--header .wishlist_products_counter:hover {
  color: var(--eoy-store-text) !important;
}

.et-l--header .wishlist_products_counter_text {
  font-size: 14px;
  font-weight: 600;
  color: var(--eoy-store-text) !important;
  line-height: 1;
  white-space: nowrap;
}

.et-l--header .wishlist_products_counter_number {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  min-width: 18px;
  width: auto;
  height: 18px;
  margin: 0;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--eoy-store-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.et-l--header .wishlist_products_counter_number:empty {
  display: none;
}

.et-l--header .cartpops-cart__wrapper {
  width: 100%;
}

.et-l--header .cartpops-cart__toggle {
  cursor: pointer;
}

.et-l--header .cartpops-cart__container.cpops-toggle-drawer,
.et-l--header .cartpops-cart__container.cpops-toggle-drawer:hover {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  transform: none !important;
}

.et-l--header .cartpops-cart__container-icon {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.et-l--header .cartpops-cart__container-counter {
  position: static !important;
  top: auto !important;
  right: auto !important;
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--eoy-store-accent) !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

.et-l--header .cartpops-cart__container-text,
.et-l--header .cartpops-cart__container-text .amount {
  position: static !important;
  left: auto !important;
  margin: 0;
  color: var(--eoy-store-text) !important;
  font-weight: 600;
  line-height: 1;
}

.et-l--header .cpops-icon-shopping-cart-line::before {
  color: var(--eoy-store-text) !important;
  font-weight: 700;
}

@media (max-width: 980px) {
  .et-l--header .et_pb_column_4_tb_header {
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .et-l--header .et_pb_blurb_0_tb_header,
  .et-l--header .et_pb_blurb_0_tb_header:hover,
  .et-l--header .et_pb_text_1_tb_header,
  .et-l--header .et_pb_text_1_tb_header:hover,
  .et-l--header .et_pb_text_2_tb_header,
  .et-l--header .et_pb_text_2_tb_header:hover {
    width: auto !important;
    min-width: 44px;
    padding: 0 10px !important;
  }

  .et-l--header .et_pb_blurb_0_tb_header .et_pb_module_header,
  .et-l--header .wishlist_products_counter_text,
  .et-l--header .cartpops-cart__container-text {
    display: none;
  }
}
