/**
 * compras.html — lista de compras (miolo ML)
 * Escopado em body.compras-list-page para não herdar stretch do carrinho.
 */
* {
  box-sizing: border-box;
}

/* navigation-desktop.css sprite + img local = logo duplicada; carrinho box-shadow = linha cinza */
body.compras-list-page #seguro-desktop-chrome .teste-header-logo .nav-logo.nav-logo-custom,
body.compras-list-page #seguro-desktop-chrome .teste-header-logo .nav-logo-custom {
  background: none !important;
  background-image: none !important;
  text-indent: 0 !important;
}

body.compras-list-page #seguro-desktop-chrome > header.nav-header.nav-header-plus.ui-navigation-v2.teste-header-offline {
  border-top: none !important;
  box-shadow: none !important;
}

body.compras-list-page #seguro-desktop-chrome > header.nav-header.nav-header-plus.ui-navigation-v2.teste-header-offline::before {
  content: none !important;
  display: none !important;
  height: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body.compras-list-page .compras-btn-novamente[hidden] {
  display: none !important;
}

html,
body.compras-list-page {
  margin: 0;
  padding: 0;
  background: #ededed;
  color: rgba(0, 0, 0, 0.9);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ----- Miolo centralizado (evita stretch do cart-page / main-container) ----- */
body.compras-list-page main#root-app.compras-list-main {
  display: block !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 0 40px !important;
  flex: 0 0 auto !important;
  min-height: auto !important;
  box-sizing: border-box !important;
}

body.compras-list-page .main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

body.compras-list-page .compras-main-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 24px 0 32px !important;
  box-sizing: border-box !important;
}

/* ----- Cabeçalho da lista ----- */
body.compras-list-page .list-header-v2 {
  margin-bottom: 4px;
}

body.compras-list-page .list-header-v2__title {
  margin: 0 0 32px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: rgba(0, 0, 0, 0.9);
}

body.compras-list-page .list-header-info-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 28px;
}

body.compras-list-page .list-header-filter-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  flex: 0 1 auto;
  min-width: 0;
}

body.compras-list-page .compras-filter-chips {
  display: contents;
}

body.compras-list-page .compras-search {
  flex: 0 0 320px;
  width: 320px;
  max-width: 320px;
  min-width: 320px;
}

body.compras-list-page .compras-search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  background: #fff;
}

body.compras-list-page .compras-search__field:focus-within {
  border-color: #3483fa;
  box-shadow: 0 0 0 1px #3483fa;
}

body.compras-list-page .compras-search__field input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: rgba(0, 0, 0, 0.9);
}

body.compras-list-page .compras-search__field input::placeholder {
  color: rgba(0, 0, 0, 0.55);
}

body.compras-list-page .compras-search__icon {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.55);
  display: flex;
}

body.compras-list-page .andes-tag--choice {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-sizing: border-box;
  width: 193.64px;
  min-width: 193.64px;
  max-width: 193.64px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px 0 6px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  overflow: hidden;
}

body.compras-list-page .andes-thumbnail-container {
  flex-shrink: 0;
  display: flex;
}

body.compras-list-page .andes-tag--internal-thumbnail.andes-thumbnail--circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
}

body.compras-list-page .andes-tag--internal-thumbnail .bf-ui-icon {
  width: 14px;
  height: 14px;
  display: block;
}

body.compras-list-page .compras-tag-icon--selected[hidden] {
  display: none !important;
}

body.compras-list-page .andes-tag__icon-container-check {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #3483fa;
  line-height: 0;
}

body.compras-list-page .andes-tag__icon-container-check svg {
  display: block;
}

body.compras-list-page .andes-tag--choice:hover:not(.andes-tag--selected) {
  border-color: rgba(0, 0, 0, 0.4);
}

body.compras-list-page .andes-tag--choice.andes-tag--selected,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] {
  border: 1px solid #3483fa;
  background: #e8f1fe;
  color: #3483fa;
  width: auto;
  min-width: 193.64px;
  max-width: none;
  padding: 0 10px 0 6px;
}

body.compras-list-page .andes-tag--choice.andes-tag--selected .andes-tag__label,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] .andes-tag__label {
  color: #3483fa;
}

body.compras-list-page .andes-tag--choice.andes-tag--selected .andes-tag--internal-thumbnail,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] .andes-tag--internal-thumbnail {
  background: rgba(52, 131, 250, 0.12);
}

body.compras-list-page .andes-tag--choice.andes-tag--selected .andes-tag__icon-container-check,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] .andes-tag__icon-container-check {
  display: inline-flex;
}

body.compras-list-page .andes-tag--choice.andes-tag--selected .compras-tag-icon--default,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] .compras-tag-icon--default {
  display: none !important;
}

body.compras-list-page .andes-tag--choice.andes-tag--selected .compras-tag-icon--selected,
body.compras-list-page .andes-tag--choice[aria-pressed="true"] .compras-tag-icon--selected {
  display: block !important;
}

body.compras-list-page .filter-buttonV2.is-active,
body.compras-list-page .compras-filter-date.is-active {
  color: #3483fa;
}

body.compras-list-page .compras-filter-dropdown {
  position: relative;
  flex-shrink: 0;
}

body.compras-list-page .compras-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  max-width: 320px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 8px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

body.compras-list-page .compras-filter-menu[hidden] {
  display: none !important;
}

body.compras-list-page .compras-filter-menu__item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  box-sizing: border-box;
}

body.compras-list-page .compras-filter-menu__item:hover,
body.compras-list-page .compras-filter-menu__item.is-selected {
  background: rgba(52, 131, 250, 0.08);
  color: #3483fa;
}

body.compras-list-page .filter-buttonV2,
body.compras-list-page .compras-filter-date {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

body.compras-list-page .filter-buttonV2:hover,
body.compras-list-page .compras-filter-date:hover {
  color: #3483fa;
}

body.compras-list-page .filter-buttonV2__chev,
body.compras-list-page .compras-filter-date__chev {
  color: inherit;
  display: flex;
  margin-top: 1px;
}

body.compras-list-page .filter-buttonV2__chev svg,
body.compras-list-page .compras-filter-date__chev svg {
  display: block;
}

body.compras-list-page .compras-header-count-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 12px;
}

body.compras-list-page .compras-header-divider {
  flex-shrink: 0;
  padding: 0 8px 0 0;
  font-size: 14px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.25);
  user-select: none;
}

body.compras-list-page .list-header__subtitles {
  flex: 0 0 auto;
  margin-left: 0;
  white-space: nowrap;
}

body.compras-list-page .list-header__subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.9);
}

body.compras-list-page .list-header__subtitle .bf-ui-rich-text {
  color: rgba(0, 0, 0, 0.9);
}

/* ----- Grupos por data ----- */
body.compras-list-page .list-item-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 100%;
}

body.compras-list-page .list-item-grouper {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

body.compras-list-page .list-item-grouper__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 16px 24px;
  max-width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

body.compras-list-page .list-item-grouper__text {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(0, 0, 0, 0.9);
}

body.compras-list-page .list-item-grouper__link {
  border: none;
  background: none;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  color: #3483fa;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

body.compras-list-page .list-item-grouper__link:hover {
  color: #2968c8;
  text-decoration: none;
}

/* ----- Card de compra (grid: conteúdo | botões) ----- */
body.compras-list-page .list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  column-gap: 24px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 20px 24px;
  background: #fff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
}

body.compras-list-page .list-item-grouper .list-item {
  box-shadow: none;
  border-radius: 0;
}

body.compras-list-page .list-item-grouper .list-item + .list-item {
  margin-top: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.compras-list-page .list-item + .list-item {
  margin-top: 12px;
}

body.compras-list-page .list-item__product {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
  grid-column: 1;
}

body.compras-list-page .list-item__image {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  margin: 0;
  overflow: hidden;
}

/* Pedido pago — 1 produto (espelho ML: h3 + bf-ui-image--default 64px) */
body.compras-list-page h3.list-item__image {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;
  font-size: 0;
  font-weight: normal;
  line-height: 0;
  overflow: hidden;
}

body.compras-list-page h3.list-item__image .bf-ui-image--default {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 4px;
  object-fit: contain !important;
  object-position: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  display: block;
}

/* Pedido com vários produtos: miniatura solta (fora do grid 2×2) */
body.compras-list-page .list-item__image:not(h3) > .bf-ui-image--circle,
body.compras-list-page .list-item__image:not(h3) > .bf-ui-image {
  display: block;
  box-sizing: border-box;
  width: 82px;
  height: 82px;
  max-width: 82px;
  max-height: 82px;
  padding: 0;
  border-radius: 4px;
  object-fit: contain !important;
  object-position: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

body.compras-list-page .bf-ui-images-group {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  grid-template-rows: repeat(2, 40px);
  gap: 2px;
  width: 82px;
  height: 82px;
  flex-shrink: 0;
}

body.compras-list-page .bf-ui-images-group .bf-ui-image--circle {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 4px;
  object-fit: contain !important;
  object-position: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

body.compras-list-page .bf-ui-image--default {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
  display: block;
}

body.compras-list-page .list-item__data {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding-top: 2px;
}

body.compras-list-page .list-item__intro {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.25;
}

body.compras-list-page .bf-ui-rich-text--warning {
  color: #ff7733;
}

body.compras-list-page .bf-ui-rich-text--success {
  color: #00a650;
}

body.compras-list-page .bf-ui-rich-text--bold {
  font-weight: 600;
}

body.compras-list-page .compras-list-empty {
  margin: 32px 0 48px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.55);
}

body.compras-list-page .list-item__title-link {
  display: block;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.9);
  text-decoration: none;
}

body.compras-list-page .list-item__title-link:hover {
  color: #3483fa;
  text-decoration: none;
}

body.compras-list-page .bf-ui-rich-text--gray {
  color: rgba(0, 0, 0, 0.55);
}

body.compras-list-page .list-item__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
}

body.compras-list-page .list-item--paid .list-item__title .bf-ui-rich-text {
  font-weight: 600;
}

body.compras-list-page .list-item__title .bf-ui-rich-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 0;
}

body.compras-list-page .bf-ui-icon--full {
  display: block;
  width: 41px;
  height: 13px;
  object-fit: contain;
}

body.compras-list-page .list-item__description {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.55);
}

body.compras-list-page .list-item__link {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.55);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body.compras-list-page .list-item__link:hover {
  color: #3483fa;
  text-decoration: none;
}

body.compras-list-page .list-item__info {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.55);
}

/* ----- Botões (coluna fixa à direita do card) ----- */
body.compras-list-page .bf-ui-button-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  grid-column: 2;
  grid-row: 1;
}

body.compras-list-page .bf-ui-button-container .andes-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
}

body.compras-list-page .bf-ui-button-container .andes-button--loud {
  background: #3483fa;
  color: #fff;
}

body.compras-list-page .bf-ui-button-container .andes-button--loud:hover {
  background: #2968c8;
}

body.compras-list-page .bf-ui-button-container .andes-button--quiet {
  background: #fff;
  color: #3483fa;
  border: 1px solid rgba(52, 131, 250, 0.55);
}

body.compras-list-page .bf-ui-button-container .andes-button--quiet:hover {
  background: rgba(52, 131, 250, 0.08);
  border-color: #3483fa;
}

@media only screen and (max-width: 768px) {
  body.compras-list-page main#root-app.compras-list-main {
    max-width: 100% !important;
    padding: 0 16px 32px !important;
  }

  body.compras-list-page .compras-main-container {
    padding: 16px 0 32px;
  }

  body.compras-list-page .list-header-info-container {
    flex-wrap: wrap;
  }

  body.compras-list-page .list-header-filter-container {
    flex-wrap: wrap;
    width: 100%;
  }

  body.compras-list-page .compras-search {
    flex: 1 1 100%;
    width: 100%;
  }

  body.compras-list-page .compras-header-divider {
    display: none;
  }

  body.compras-list-page .list-header__subtitles {
    margin-left: 0;
    width: 100%;
  }

  body.compras-list-page .list-item {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  body.compras-list-page .bf-ui-button-container {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

.compras-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.compras-loading-overlay[hidden] {
  display: none !important;
}

.compras-loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(52, 131, 250, 0.2);
  border-top-color: #3483fa;
  border-radius: 50%;
  animation: compras-loading-spin 0.8s linear infinite;
}

@keyframes compras-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
