/* S27 Parcelas & PIX — Frontend v2.0.1 */

/* ── Preço variável "a partir de" ────────────────────────── */
.s27pp-range-price { display: inline; }
.s27pp-from-label-price { font-size: min(14px, .65em); color: #aaa !important; font-weight: 400 !important; margin-right: .3em; vertical-align: baseline; }

/* ── Wrap ────────────────────────────────────────────────── */
.s27pp-wrap,.s27pp-loop-wrap,.s27pp-cart-wrap { margin: .5em 0; }

/* ── Parcelas ────────────────────────────────────────────── */
.s27pp-installments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5em;
  margin-bottom: .4em;
}
.s27pp-prefix {
  font-size: var(--s27pp-size-installment, .95rem);
  color: var(--s27pp-color-installment, #333);
  line-height: 1.4;
}
.s27pp-from-label { font-size: .85em; opacity: .7; margin-right: .2em; }

/* ── Botão "Ver todas as parcelas" ───────────────────────── */
.s27pp-modal-trigger {
  display: inline-flex;
  align-items: center;
  color: var(--s27pp-color-modal-title, #e91e8c);
  background: transparent !important;
  border: none !important;
  border-left: 1px solid currentColor !important;
  padding: 0 0 0 .6em !important;
  margin: 0 !important;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.3;
  min-height: unset !important;
  height: auto !important;
  text-decoration: none;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.s27pp-modal-trigger:hover { opacity: .8; }

/* ── PIX / Boleto blocks ─────────────────────────────────── */
.s27pp-pix-block, .s27pp-boleto-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4em;
  padding: .5em .75em;
  border-radius: 6px;
  margin-bottom: .4em;
}
.s27pp-pix-block    { border: 1px solid var(--s27pp-color-pix-border, #16a34a);   background: var(--s27pp-color-pix-bg, #f0fdf4); }
.s27pp-boleto-block { border: 1px solid var(--s27pp-color-boleto-border, #1d4ed8); background: var(--s27pp-color-boleto-bg, #eff6ff); }

/* ── Badges ──────────────────────────────────────────────── */
.s27pp-badge {
  font-size: var(--s27pp-size-badge, .65rem);
  font-weight: 700;
  letter-spacing: .03em;
  padding: .15em .45em;
  border-radius: 4px;
  text-transform: uppercase;
  line-height: 1.4;
}
.s27pp-pix-badge    { background: var(--s27pp-color-pix-badge-bg, #16a34a);   color: var(--s27pp-color-pix-badge-text, #fff); }
.s27pp-boleto-badge { background: var(--s27pp-color-boleto-badge-bg, #1d4ed8); color: var(--s27pp-color-boleto-badge-text, #fff); }

/* ── Prefixes ────────────────────────────────────────────── */
.s27pp-pix-prefix, .s27pp-boleto-prefix {
  font-size: var(--s27pp-size-prefix, .85rem);
  color: var(--s27pp-color-prefix, #555);
}

/* ── Icons SVG inline ────────────────────────────────────── */
.s27pp-pix-icon    { width: 20px; height: 20px; color: var(--s27pp-color-pix-value, #16a34a);  flex-shrink: 0; }
.s27pp-boleto-icon { width: 20px; height: 20px; color: var(--s27pp-color-boleto-icon, #1d4ed8); flex-shrink: 0; }

/* ── Values ──────────────────────────────────────────────── */
.s27pp-pix-value, .s27pp-pix-value .amount, .s27pp-pix-value bdi { font-size: var(--s27pp-size-pix-value, 1.4rem); font-weight: 700; color: var(--s27pp-color-pix-value, #16a34a) !important; }
.s27pp-boleto-value { font-size: var(--s27pp-size-boleto-value, 1.4rem); font-weight: 700; color: var(--s27pp-color-boleto-value, #1d4ed8); }
.s27pp-economy { font-size: .78rem; opacity: .75; }

/* ── Loop ────────────────────────────────────────────────── */
.s27pp-loop-wrap { display: flex; flex-direction: column; gap: .2em; margin-top: .3em; }
.s27pp-loop-installments { font-size: .82rem; color: var(--s27pp-color-installment, #333); }
.s27pp-loop-pix { display: flex; align-items: center; gap: .35em; }

/* ── Modal ───────────────────────────────────────────────── */
.s27pp-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; }
.s27pp-modal[hidden] { display: none; }
.s27pp-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); cursor: pointer; }
.s27pp-modal-inner {
  position: relative; z-index: 1; background: #fff; border-radius: 10px;
  padding: 1.25em 1.5em 1.5em; width: min(92vw, 520px); max-height: 80vh;
  overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.s27pp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1em;
  gap: 1em;
}
.s27pp-modal-title { font-size: 1.1rem; color: var(--s27pp-color-modal-title, #e91e8c); margin: 0; }
.s27pp-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: .2em;
  flex-shrink: 0;
}
.s27pp-modal-close:hover { color: #333; }
body.s27pp-modal-open { overflow: hidden; }

/* ── Tabela ──────────────────────────────────────────────── */
.s27pp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.s27pp-table thead th { text-align: left; padding: .4em .6em; border-bottom: 2px solid #eee; font-weight: 600; }
.s27pp-table tbody td { padding: .45em .6em; border-bottom: 1px solid #f2f2f2; }
.s27pp-table tbody tr:hover td { background: #fafafa; }
.s27pp-free-badge { display: inline-block; font-size: .68rem; background: #dcfce7; color: #16a34a; border-radius: 3px; padding: .1em .4em; margin-left: .3em; vertical-align: middle; }

/* Installments text adjustments */
.s27pp-wrap .s27pp-installments button {
	font-size: 10px;
	color: #555;
}
.s27pp-wrap .s27pp-installments span {
	font-weight: 500;
}

/* ══ 2.3.0: alinhamento ═════════════════════════════════════ */
/* Com alinhamento escolhido o bloco ocupa a largura toda (temas que estreitam o resumo em flex). */
.s27pp-align-left, .s27pp-align-center, .s27pp-align-right { width: 100%; align-self: stretch; box-sizing: border-box; }
.s27pp-align-left   { text-align: left; }
.s27pp-align-center { text-align: center; }
.s27pp-align-right  { text-align: right; }
.s27pp-align-center .s27pp-installments, .s27pp-align-center .s27pp-pix-block, .s27pp-align-center .s27pp-boleto-block,
.s27pp-align-center .s27pp-loop-pix, .s27pp-align-center .s27pp-destaque, .s27pp-align-center .s27pp-chips,
.s27pp-align-center .s27pp-lista li, .s27pp-align-center .s27pp-loop-linha { justify-content: center; }
.s27pp-align-right .s27pp-installments, .s27pp-align-right .s27pp-pix-block, .s27pp-align-right .s27pp-boleto-block,
.s27pp-align-right .s27pp-loop-pix, .s27pp-align-right .s27pp-destaque, .s27pp-align-right .s27pp-chips,
.s27pp-align-right .s27pp-lista li, .s27pp-align-right .s27pp-loop-linha { justify-content: flex-end; }
.s27pp-loop-wrap.s27pp-align-left   { align-items: flex-start; }
.s27pp-loop-wrap.s27pp-align-center { align-items: center; }
.s27pp-loop-wrap.s27pp-align-right  { align-items: flex-end; }
.s27pp-align-center .s27pp-colunas { margin-left: auto; margin-right: auto; }
.s27pp-align-right .s27pp-colunas  { margin-left: auto; }

/* ══ 2.3.0: estilos ═════════════════════════════════════════ */
.s27pp-card-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--s27pp-color-installment, #333); }
.s27pp-wrap[class*="s27pp-estilo-"]:not(.s27pp-estilo-classic) .s27pp-pix-icon,
.s27pp-wrap[class*="s27pp-estilo-"]:not(.s27pp-estilo-classic) .s27pp-boleto-icon,
.s27pp-loop-wrap .s27pp-pix-icon { width: 18px; height: 18px; }
.s27pp-destaque-rotulo { color: var(--s27pp-color-pix-value, #16a34a); font-size: .9rem; }
.s27pp-linha-boleto { font-size: .85rem; color: var(--s27pp-color-prefix, #555); margin-top: .2em; }
.s27pp-linha-boleto .s27pp-boleto-value, .s27pp-linha-boleto .s27pp-boleto-value bdi { font-size: inherit; }
.s27pp-botao-linha { margin-top: .4em; }
.s27pp-botao-linha .s27pp-modal-trigger { border-left: none !important; padding-left: 0 !important; text-decoration: underline; }

/* PIX em destaque */
.s27pp-destaque { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4em; margin-bottom: .2em; }
.s27pp-estilo-pix .s27pp-destaque .s27pp-pix-value, .s27pp-estilo-pix .s27pp-destaque .s27pp-pix-value bdi { font-size: calc(var(--s27pp-size-pix-value, 1.4rem) * 1.15); }

/* Lista com ícones */
.s27pp-lista { list-style: none !important; margin: 0 0 .4em !important; padding: 0 !important; display: grid; gap: .35em; }
.s27pp-lista li { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; margin: 0 !important; padding: .45em .7em; border-radius: 6px; background: rgba(0,0,0,.035); font-size: var(--s27pp-size-installment, .95rem); }
.s27pp-lista li::before { content: none !important; }
.s27pp-lista-pix { background: var(--s27pp-color-pix-bg, #f0fdf4) !important; }
.s27pp-lista .s27pp-pix-value, .s27pp-lista .s27pp-pix-value bdi, .s27pp-lista .s27pp-boleto-value, .s27pp-lista .s27pp-boleto-value bdi { font-size: inherit; }
.s27pp-lista-off { opacity: .7; font-size: .85em; }

/* Chips */
.s27pp-chips { display: flex; flex-wrap: wrap; gap: .4em; }
.s27pp-chip { display: inline-flex; align-items: center; gap: .35em; padding: .3em .75em; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); font-size: .85rem; line-height: 1.3; color: var(--s27pp-color-installment, #333); }
.s27pp-chip-pix { border-color: var(--s27pp-color-pix-border, #16a34a); color: var(--s27pp-color-pix-value, #16a34a); background: var(--s27pp-color-pix-bg, #f0fdf4); }
.s27pp-chip-boleto { border-color: var(--s27pp-color-boleto-border, #1d4ed8); color: var(--s27pp-color-boleto-value, #1d4ed8); }
.s27pp-chip .s27pp-pix-value, .s27pp-chip .s27pp-pix-value bdi, .s27pp-chip .s27pp-boleto-value, .s27pp-chip .s27pp-boleto-value bdi { font-size: inherit; }
.s27pp-chip .s27pp-pix-icon, .s27pp-chip .s27pp-boleto-icon, .s27pp-chip .s27pp-card-icon { width: 15px; height: 15px; }

/* Duas colunas */
.s27pp-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; max-width: 460px; margin-bottom: .4em; }
.s27pp-coluna { display: flex; flex-direction: column; gap: .1em; padding: .55em .75em; border-radius: 8px; border: 1px solid rgba(0,0,0,.15); text-align: left; }
.s27pp-coluna-pix { border-color: var(--s27pp-color-pix-border, #16a34a); background: var(--s27pp-color-pix-bg, #f0fdf4); }
.s27pp-coluna-rotulo { font-size: .75rem; color: var(--s27pp-color-prefix, #555); }
.s27pp-coluna-pix .s27pp-coluna-rotulo { color: var(--s27pp-color-pix-value, #16a34a); }
.s27pp-coluna-valor, .s27pp-coluna-valor bdi { font-size: var(--s27pp-size-pix-value, 1.4rem); font-weight: 700; color: var(--s27pp-color-installment, #333); }
.s27pp-coluna .s27pp-prefix, .s27pp-coluna .s27pp-economy { font-size: .78rem; }

/* Minimalista */
.s27pp-minimal { display: grid; gap: .15em; font-size: var(--s27pp-size-installment, .95rem); color: var(--s27pp-color-prefix, #555); margin-bottom: .4em; }
.s27pp-minimal .s27pp-prefix { color: inherit; font-weight: 400 !important; }
.s27pp-minimal .s27pp-pix-value, .s27pp-minimal .s27pp-pix-value bdi, .s27pp-minimal .s27pp-boleto-value, .s27pp-minimal .s27pp-boleto-value bdi { font-size: inherit; }

/* Cards da loja */
.s27pp-loop-destaque { display: inline-flex; align-items: baseline; gap: .3em; }
.s27pp-loop-wrap .s27pp-pix-value, .s27pp-loop-wrap .s27pp-pix-value bdi { font-size: 1.05rem; }
.s27pp-loop-wrap .s27pp-chip .s27pp-pix-value, .s27pp-loop-wrap .s27pp-chip .s27pp-pix-value bdi,
.s27pp-loop-wrap .s27pp-coluna .s27pp-pix-value, .s27pp-loop-wrap .s27pp-coluna .s27pp-pix-value bdi { font-size: .95rem; }
.s27pp-loop-linha { display: inline-flex; align-items: center; gap: .35em; font-size: .82rem; }
.s27pp-loop-linha-pix { color: var(--s27pp-color-pix-value, #16a34a); }
.s27pp-loop-linha .s27pp-pix-value, .s27pp-loop-linha .s27pp-pix-value bdi { font-size: .95rem; }
.s27pp-loop-wrap .s27pp-chips { gap: .3em; }
.s27pp-loop-wrap .s27pp-chip { font-size: .75rem; padding: .2em .6em; }
.s27pp-loop-wrap .s27pp-colunas { gap: .3em; width: 100%; }
.s27pp-loop-wrap .s27pp-coluna { padding: .35em .5em; }
.s27pp-loop-wrap .s27pp-coluna .s27pp-loop-installments { font-size: .75rem; }

/* 2.3.2: estilos montados só com os textos do painel (etiqueta, texto antes do valor, valor, economia) */
.s27pp-minimal > div, .s27pp-linha-boleto, .s27pp-coluna-rotulo, .s27pp-loop-minimal-pix { display: flex; flex-wrap: wrap; align-items: center; gap: .35em; }
.s27pp-loop-destaque, .s27pp-loop-linha { gap: .35em; flex-wrap: wrap; }
.s27pp-destaque { align-items: center; }
.s27pp-loop-minimal-pix { display: inline-flex; }
.s27pp-coluna-rotulo .s27pp-pix-prefix { color: inherit; font-size: inherit; }
.s27pp-align-center .s27pp-minimal > div, .s27pp-align-center .s27pp-linha-boleto, .s27pp-align-center .s27pp-botao-linha { justify-content: center; }
.s27pp-align-right .s27pp-minimal > div, .s27pp-align-right .s27pp-linha-boleto, .s27pp-align-right .s27pp-botao-linha { justify-content: flex-end; }
.s27pp-align-center .s27pp-coluna { text-align: center; align-items: center; }
.s27pp-align-center .s27pp-coluna-rotulo { justify-content: center; }
