/*
 * A arte do Mercado da Bola — PORTA do bloco ".mercado" de src/styles/global.css
 * do hub de Padrões de Design (modelo "padrão"). Medidas e nomes de classe são
 * os de lá; mudança de desenho se faz LÁ e se traz para cá.
 *
 * Tudo debaixo de `.lt-moldura > .mercado`, com os tokens na própria raiz da
 * arte (como em lettering-arte.css): o painel tem `.mercado-*` próprios, da
 * conferência de mercado do Admin, e nada daqui pode vazar para eles.
 *
 * Fontes: Barlow Condensed 700 (a palavra do status) vem de lettering-arte.css;
 * a 500 (o nome do atleta) vem de /fonts/barlow-condensed.css, do painel.
 */

.lt-moldura > .mercado {
  --card-width: 1080px;
  --card-height: 1350px;
  --safe-area: 64px;
  --content-width: 952px;
  --bottom-gradient-top: 570px;
  --bottom-gradient-height: 780px;
  --bottom-gradient-final-opacity: 0.925;
  --texture-left: -258.8193359375px;
  --texture-top: 689.99609375px;
  --texture-width: 1535.2078857421875px;
  --texture-height: 678.380615234375px;
  --accent-height: 6px;
  --accent-radius: 30px;
  --accent-gradient: linear-gradient(90deg, #f64c68 0%, #ffb800 33%, #61b8e0 66%, #58c071 100%);
  --body-color: #ccc;
  --logo-width: 135px;
  --logo-height: 72.244px;
  --logo-top: 64px;
  --credit-size: 14px;
  --credit-line-height: 18.2px;
  --credit-letter-spacing: 1.4px;
  --credit-anchor-inset: 59px;
  --credit-anchor-top: 411.5px;
  --active-layout-shift: 0px;

  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  box-sizing: border-box;
  width: var(--card-width);
  height: var(--card-height);
  overflow: hidden;
  background: #000;
  isolation: isolate;
  font-family: Inter, Arial, sans-serif;
}

.lt-moldura > .mercado *,
.lt-moldura > .mercado *::before,
.lt-moldura > .mercado *::after {
  box-sizing: border-box;
}

.mercado .mercado__background {
  position: absolute;
  inset: 0;
}

.mercado .mercado__background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-width);
  height: var(--card-height);
  max-width: none;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
}

.mercado .mercado__texture {
  position: absolute;
  z-index: 1;
  top: var(--texture-top);
  left: var(--texture-left);
  width: var(--texture-width);
  height: var(--texture-height);
}

.mercado .mercado__overlay {
  position: absolute;
  z-index: 1;
  top: var(--bottom-gradient-top);
  left: 0;
  width: var(--card-width);
  height: var(--bottom-gradient-height);
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 0%) 0%,
    rgb(0 0 0 / var(--bottom-gradient-final-opacity)) 100%
  );
}

.mercado .mercado__logo {
  position: absolute;
  z-index: 5;
  object-fit: contain;
}

.mercado .mercado__logo--standard {
  top: var(--logo-top);
  width: var(--logo-width);
  height: var(--logo-height);
}

.mercado .mercado__logo--standard[data-position="left"] { left: var(--safe-area); }
.mercado .mercado__logo--standard[data-position="center"] { left: 50%; transform: translateX(-50%); }
.mercado .mercado__logo--standard[data-position="right"] { right: var(--safe-area); }

.mercado .mercado__status {
  position: absolute;
  z-index: 5;
  bottom: calc(var(--status-bottom) + var(--active-layout-shift));
  left: 64px;
  right: 64px;
  margin: 0;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.mercado .mercado__status[data-status="interesse"] { --status-bottom: 158px; font-size: 249.7px; }
.mercado .mercado__status[data-status="negociando"] { --status-bottom: 166px; font-size: 213.7px; }
.mercado .mercado__status[data-status="encaminhado"] { --status-bottom: 171px; font-size: 190.7px; }
.mercado .mercado__status[data-status="fechado"] { --status-bottom: 145px; font-size: 307.5px; }
.mercado .mercado__status[data-status="oficial"] { --status-bottom: 132px; font-size: 363.1px; }

.mercado .mercado__accent-bar {
  position: absolute;
  z-index: 5;
  left: var(--safe-area);
  bottom: calc(178px + var(--active-layout-shift));
  width: var(--content-width);
  height: var(--accent-height);
  border-radius: var(--accent-radius);
  background: var(--accent-gradient);
}

.mercado .mercado__transfer-row {
  position: absolute;
  z-index: 5;
  left: var(--safe-area);
  bottom: calc(var(--safe-area) + var(--active-layout-shift));
  display: flex;
  width: var(--content-width);
  height: 84px;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.mercado .mercado__transfer-row[data-wide] { justify-content: space-between; }

.mercado .mercado__badge {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.mercado .mercado__chevrons {
  flex-shrink: 0;
  width: 133.24px;
  height: 67.13px;
  object-fit: contain;
}

.mercado .mercado__chevrons[data-compact] { width: 88.87px; }

.mercado .mercado__player-name {
  overflow: hidden;
  max-width: 373px;
  color: var(--body-color);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 65px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mercado .mercado__player-name[data-compact] { max-width: 462px; }

/* A régua do nome: a mesma fonte, sem teto de largura e fora do quadro. */
.mercado .mercado__name-measure {
  position: absolute;
  top: -1000px;
  left: 0;
  max-width: none;
  visibility: hidden;
  pointer-events: none;
}

.mercado .mercado__credit {
  position: absolute;
  z-index: 7;
  width: max-content;
  margin: 0;
  color: var(--body-color);
  font-family: Inter, sans-serif;
  font-size: var(--credit-size);
  font-weight: 500;
  line-height: var(--credit-line-height);
  letter-spacing: var(--credit-letter-spacing);
  text-transform: uppercase;
  white-space: nowrap;
}

.mercado .mercado__credit[data-vertical="cima"] { top: var(--credit-anchor-top); }
.mercado .mercado__credit[data-horizontal="esquerda"] {
  left: var(--credit-anchor-inset);
  transform: translate(-50%, -50%) rotate(-90deg);
}
