/* Modal de confirmação, texturas e lightbox. */

/* ===== Textura mini (3 opções simples) ===== */
.txMini{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #F6F7F9;
  border: 1px solid rgba(15,23,42,.08);
}

.txMini__title{
  font-size: 14px;
  font-weight: 900;
  color: #0B0F14;
  margin-bottom: 4px;
}

.txMini__sub{
  font-size: 12px;
  color: #5B6472;
  line-height: 1.35;
  margin-bottom: 10px;
}

.txMini__row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.txMini__opt{
  position: relative;
  width: 100%;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.txMini__opt:hover{
  border-color: rgba(225,29,72,.25);
  box-shadow: 0 10px 22px rgba(2,6,23,.10);
}

.txMini__opt:active{ transform: scale(.99); }

.txMini__opt img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.08);
  display: block;
}

.txMini__opt span{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #0B0F14;
}

.txMini__check{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #E11D48;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  opacity: 0;
  transform: scale(.85);
  transition: .12s ease;
}

/* selecionado */
.txMini__opt.is-active{
  border-color: rgba(225,29,72,.55);
  box-shadow: 0 14px 28px rgba(225,29,72,.12);
}

.txMini__opt.is-active .txMini__check{
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 420px){
  .txMini__row{ gap: 8px; }
}
/* =========================
   MODAL (popup, não full)
   ========================= */

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;              /* respiro nas bordas */
}

.modal[aria-hidden="true"]{
  display: none;
}

.modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}

/* A CAIXA (popup) */
.modal__box{
  position: relative;
  width: min(420px, 92vw);    /* tamanho de popup */
  max-height: 82vh;           /* não ocupa a tela inteira */
  overflow: auto;             /* scroll interno se precisar */
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  padding: 16px 16px 18px;
  animation: confirmPop .22s ease;
}

/* animação leve premium */
@keyframes confirmPop{
  from{ opacity: 0; transform: translateY(18px) scale(.97); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

/* botão X */
.modal__close{
  position: sticky;           /* fica acessível ao rolar */
  top: 6px;
  float: right;
  margin-left: 10px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: rgba(0,0,0,.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal__title{
  margin: 4px 0 6px;
  font-size: 20px;
}

.modal__subtitle{
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #5b6472;
}

/* resumo mais compacto */
.modal__row{
  padding: 10px 0;
}

.modal__summary{
  border-radius: 16px;
}

/* ações sempre visíveis (fica “barra” no fim do popup) */
.modal__actions{
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 12px;
  margin-top: 12px;
}

/* pequeno ajuste para telas baixas */
@media (max-height: 720px){
  .modal__box{ max-height: 78vh; }
}
/* dica visual de que tem mais conteúdo */
.modal__box{
  /* já deve existir — mantendo */
  position: relative;
}



/* setinha/legenda */
.modal__scrollHint{
  position: sticky;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
  margin-top: -17px;          /* fica por cima */
  padding-bottom: 6px;
  opacity: 1;
  transition: opacity .2s ease, transform .2s ease;
}

.modal__scrollHint i{
  font-style: normal;
  display: inline-block;
  transform: translateY(0);
  animation: hintBounce 1.2s infinite ease-in-out;
}

@keyframes hintBounce{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===== layout 3 em 1 linha (robusto) ===== */
.txMini__row{
  display: flex;
  gap: 10px;
}

.txMini__opt{
  flex: 1 1 calc((100% - 20px) / 3); /* 3 itens, 2 gaps */
  min-width: 0;                      /* evita quebrar no Android */
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.txMini__opt[aria-pressed="true"]{
  border-color: rgba(225,29,72,.45);
  box-shadow: 0 0 0 3px rgba(225,29,72,.12);
}

.txMini__media{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f6f7f9;
  aspect-ratio: 1 / 1;
}

.txMini__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* check no canto */
.txMini__check{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #E11D48;
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.92);
  transition: .15s ease;
}

.txMini__opt[aria-pressed="true"] .txMini__check{
  opacity: 1;
  transform: scale(1);
}

/* ===== botão VER abaixo da foto ===== */
.txMini__zoom{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top: 8px;
  width: 100%;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(225,29,72,.28);
  background: rgba(225,29,72,.08);
  color: #E11D48;
  font-weight: 800;
  font-size: 12px;
  text-align:center;
  cursor: pointer;
}

.txMini__name{
  display: block;
  margin-top: 8px;
  font-weight: 800;
  text-align: center;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* se a tela for MUITO estreita, aí sim vira 2 colunas */
@media (max-width: 340px){
  .txMini__row{ flex-wrap: wrap; }
  .txMini__opt{ flex: 1 1 calc((100% - 10px) / 2); }
}
.txMini__check{ opacity:0; transform:scale(.92); transition:.15s ease; }
.txMini__opt[aria-pressed="true"] .txMini__check{ opacity:1; transform:scale(1); }
/* ===== LIGHTBOX TEXTURA (premium) ===== */
.txZoom{
  position: fixed; inset: 0;
  z-index: 9999;
  display:flex; align-items:center; justify-content:center;
  padding: 18px; /* não deixa colar nas bordas do celular */
}

.txZoom[aria-hidden="true"]{ display:none; }

.txZoom__overlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(6px);
}

/* card menor + borda */
.txZoom__card{
  position: relative;
  z-index: 1;

  width: min(92vw, 420px);
  max-height: 82vh;

  background: #fff;
  border-radius: 18px;
  padding: 12px;

  /* “moldura” branca + filete vermelho Nexus */
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);

  overflow: hidden; /* garante que nada vaze */
}

/* filete vermelho no topo (detalhe premium) */
.txZoom__card::before{
  content:"";
  position:absolute; left:0; top:0; right:0;
  height: 4px;
  background: rgba(0,93,203,.55);
}

/* botão fechar */
.txZoom__x{
  position:absolute; top:10px; right:10px;
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  font-size: 22px;
  line-height: 1;
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
}

/* imagem com “tamanho controlado” (não ocupa 100% da tela) */
.txZoom__img{
  width: 100%;
  height: auto;
  max-height: 62vh;       /* limita altura */
  object-fit: contain;    /* não corta a textura */
  display:block;
  border-radius: 14px;
  background: #fff;
}

/* legenda */
.txZoom__cap{
  padding: 10px 4px 2px;
  font-weight: 800;
  color: #0B0F14;
  text-align: center;
}
/* garante que overlay fica atrás e não "embaça" o card */
.txZoom{ position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; padding:18px; }
.txZoom[aria-hidden="true"]{ display:none; }

.txZoom__overlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
  /* se estiver embaçando, é porque o overlay está na frente.
     então garante z-index baixo: */
  z-index: 0;
  backdrop-filter: none !important; /* <<< remove blur (principal) */
}

.txZoom__card{
  position:relative;
  z-index: 2;                 /* <<< card sempre acima */
  width: min(92vw, 420px);
  max-height: 82vh;
  background:#fff;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  overflow:hidden;
}

.txZoom__card::before{
  content:"";
  position:absolute; left:0; top:0; right:0;
  height:4px;
  background:none
}

.txZoom__x{
  position:absolute; top:10px; right:10px;
  width:38px; height:38px;
  border-radius:12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.95);
  font-size:22px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  z-index: 3;
}

.txZoom__img{
  width:100%;
  max-height: 62vh;
  object-fit: contain;
  display:block;
  border-radius: 14px;
  background:#fff;
  filter: none !important;     /* <<< se algum blur estiver pegando na img */
}

.txZoom__cap{
  padding: 10px 4px 2px;
  font-weight: 800;
  text-align:center;
  color:#0B0F14;
}
/* ===== Modal: só o miolo rola, rodapé fica fixo ===== */
.modal__box{
  max-height: 86vh;            /* sensação de popup (não tela cheia) */
  overflow: hidden;            /* impede qualquer vazamento */
  display: flex;
  flex-direction: column;
}

/* cria área rolável real */
.modal__content{
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;        /* respiro antes do rodapé */
}

/* rodapé fixo dentro do modal */
.modal__actions{
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
  padding-bottom: 12px;

  /* “sombra”/degradê pra mostrar que tem mais conteúdo acima */
  box-shadow: 0 -10px 20px rgba(0,0,0,.06);
}

/* opcional: hint só aparece quando tem scroll */
.modal__scrollHint{
  display: none;               /* o JS vai ligar quando precisar */
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  padding-bottom: 8px;
}
/* ===== X no canto certo ===== */
.modal__box{ position: relative; }

.modal__close{
  position: absolute;
  top: 10px;
  right: 10px;          /* <- canto direito */
  left: auto !important;
  z-index: 5;
}

/* dá espaço no topo pro X não “encostar” no título */
.modal__content{
  padding-top: 42px;    /* ajusta se quiser mais/menos */
}

/* ===== Hint mais embaixo / mais “premium” ===== */
.modal__actions{
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 16px;     /* mais espaço */
  padding-bottom: 12px;
  box-shadow: 0 -10px 20px rgba(0,0,0,.06);
}

.modal__scrollHint{
  margin-top: 6px;       /* desce um pouco */
  margin-bottom: 12px;   /* separa dos botões */
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}
