/**
 * Ganhadores — Outbac-K
 * Tab1 Sorteio (viagens): tabela highlight + linhas.
 * Tab2 Gift Cards: subcategorias + tabela + scroll infinito.
 */

@import url("tokens.css?v=24");
@import url("outback-panel.css?v=10");

/* Abas */
.ganhadores-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin: 0 auto var(--space-4);
}

.ganhadores-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--btn-min-height);
  height: var(--btn-min-height);
  padding: 0.7rem var(--btn-padding-x) 0;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--color-purple);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--btn-font-size);
  font-style: normal;
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  line-height: var(--btn-line-height);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(83, 49, 124, 0.45),
    0 10px 24px rgba(28, 8, 35, 0.22);
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    filter 0.2s ease;
}

.ganhadores-tab:hover {
  filter: brightness(1.1);
  color: #fff;
  box-shadow:
    0 0 22px rgba(83, 49, 124, 0.55),
    0 14px 32px rgba(28, 8, 35, 0.26);
}

.ganhadores-tab.is-active {
  background: var(--color-yellow);
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow);
}

.ganhadores-tab.is-active:hover {
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow-hover);
}

.ganhadores-panel[hidden] {
  display: none !important;
}

/* Prêmio principal — tabela com a barra de ouro */
.ganhadores-profit {
  width: 100%;
  max-width: 106.6rem;
  margin: 0 auto var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ganhadores-profit__container {
  position: relative;
  width: 100%;
  overflow: visible;
}

.ganhadores-profit__icon {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 3;
  display: block;
  width: min(18vw, 16rem);
  max-width: 18rem;
  height: auto;
  transform: translate(-32%, -50%);
  pointer-events: none;
}

.ganhadores-profit__table {
  position: relative;
  z-index: 1;
  width: 100%;
}

.ganhadores-profit__table > * {
  position: relative;
  z-index: 1;
}

.ganhadores-profit__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.2rem 0.8rem 0.8rem;
  font-size: 1.45rem;
  font-weight: 600;
}

.ganhadores-profit__row--top {
  margin-inline: 1rem;
  border-radius: 2rem 2rem 0 0;
  border: 1px solid rgba(206, 27, 130, 0.32);
  border-bottom: 0;
  background: rgba(206, 27, 130, 0.22);
  color: #fff;
  font-weight: 700;
}

.ganhadores-profit__row--highlight {
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: 3.2rem 4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2rem;
  background: rgba(206, 27, 130, 0.42) !important;
  background-size: auto !important;
  color: #fff;
  font-size: clamp(1.6rem, 2.1vw, 2.8rem);
  font-weight: 800;
  box-shadow:
    0 0 22px rgba(206, 27, 130, 0.2),
    0 18px 44px rgba(28, 8, 35, 0.34);
  animation: none;
}

.ganhadores-profit__row--highlight:not(.ganhadores-profit__row--soon) > * {
  position: relative;
  z-index: 1;
}

.ganhadores-profit__row--normal {
  margin-inline: 1rem;
  padding: 1.5rem 4rem;
  border: 1px solid rgba(206, 27, 130, 0.28);
  border-top: 0;
  background: rgba(206, 27, 130, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.4rem, 1.7vw, 2.1rem);
  font-weight: 600;
}

.ganhadores-profit__row--normal:last-child {
  border-radius: 0 0 2rem 2rem;
}

.ganhadores-profit__label,
.ganhadores-profit__label-top,
.ganhadores-profit__value {
  flex: 1;
  min-width: 0;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}

/* Nome do ganhador é a coluna mais longa — ganha mais espaço */
.ganhadores-profit__row > :first-child {
  flex: 1.6;
}

.ganhadores-profit__row--sorteio > :last-child {
  flex: 1.25;
}

.ganhadores-profit__row--sorteio .ganhadores-profit__value:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ganhadores-profit__label-top {
  color: var(--color-gold);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ganhadores-profit__row--soon {
  justify-content: center;
}

.ganhadores-profit__row--soon .ganhadores-profit__label-top {
  flex: none;
  font-size: 1.6rem;
  letter-spacing: 0;
  text-transform: none;
}

.ganhadores-profit__soon {
  margin: 0;
  width: 100%;
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
}

.ganhadores-profit__disclaimer {
  margin: 2.4rem auto 0;
  max-width: calc(100% - 2rem);
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

/* Subcategorias Gift Cards */
.ganhadores-subtabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 0 auto var(--space-3);
}

.ganhadores-subtab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--btn-min-height);
  height: var(--btn-min-height);
  padding: 0.7rem var(--btn-padding-x) 0;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--color-purple);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--btn-font-size);
  font-style: normal;
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  line-height: var(--btn-line-height);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(83, 49, 124, 0.45),
    0 10px 24px rgba(28, 8, 35, 0.22);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.2s ease;
}

.ganhadores-subtab:hover {
  filter: brightness(1.1);
  color: #fff;
  box-shadow:
    0 0 22px rgba(83, 49, 124, 0.55),
    0 14px 32px rgba(28, 8, 35, 0.26);
}

.ganhadores-subtab.is-active {
  background: var(--color-yellow);
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow);
}

.ganhadores-subtab.is-active:hover {
  color: var(--color-purple-strong);
  box-shadow: var(--shadow-btn-yellow-hover);
}

.ganhadores-profit--gift {
  margin-top: var(--space-2);
}

.ganhadores-profit--gift .ganhadores-profit__icon {
  display: none;
}

.ganhadores-profit__body {
  width: 100%;
}

.ganhadores-profit__body .ganhadores-profit__row--normal:last-child {
  border-radius: 0 0 2rem 2rem;
}

/* Gift cards — busca */
.ganhadores-search {
  width: 50%;
  max-width: 520px;
  margin: 0 auto var(--space-4);
}

.ganhadores-search__wrap {
  position: relative;
}

.ganhadores-search__wrap .float-placeholder {
  display: none;
}

.ganhadores-search__icon {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary);
  font-size: 1.3rem;
  pointer-events: none;
}

.ganhadores-search__input {
  width: 100%;
  min-height: 5.2rem;
  padding: 0.85rem 1.4rem 0.85rem 3.8rem;
  border: 1px solid rgba(206, 27, 130, 0.28);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.97);
  color: var(--color-purple);
  font-family: var(--font-ui);
  font-size: 1.45rem;
}

.ganhadores-search__input::placeholder {
  color: #5a645a;
  opacity: 1;
}

.ganhadores-search__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(206, 27, 130, 0.24);
}

.ganhadores-search__meta {
  margin: 0.65rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

@media (max-width: 991px) {
  .ganhadores-subtab {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 14rem;
  }

  body.page-ganhadores.page-cadastro-bg .catalog-hero {
    padding-top: calc(clamp(5.6rem, 6vw, 6.4rem) + 2rem);
  }

  .ganhadores-profit__icon {
    z-index: -1;
    width: min(28vw, 11rem);
    transform: translate(-22%, -50%);
  }

  .ganhadores-profit__row--highlight {
    padding: 2.4rem 1.6rem;
    font-size: 1.6rem;
  }

  .ganhadores-profit__row--normal {
    padding: 1.4rem 1.6rem;
    font-size: 1.35rem;
  }

  .ganhadores-profit__label-top {
    font-size: 1.1rem;
  }

  .ganhadores-tab {
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 14rem;
  }
}

@media (max-width: 767px) {
  .ganhadores-search {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ganhadores-profit__row--top,
  .ganhadores-profit__row--normal {
    padding: 1.5rem 1rem;
    font-size: 1.25rem;
  }

  .ganhadores-profit__row--highlight {
    margin: -0.6rem 0;
    padding: 2rem 1rem;
    font-size: 1.35rem;
  }

  .ganhadores-profit__label-top {
    font-size: 1rem;
    letter-spacing: 0;
  }

  #ganhadores-sorteio-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #ganhadores-sorteio-table .ganhadores-profit__row--sorteio {
    min-width: 56rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ganhadores-profit__row--highlight {
    animation: none;
  }
}
