/* Ajustes das telas sobre o Bootstrap 5 (mobile first). A identidade visual e o layout estão em marca.css. */

.celula-email {
  max-width: 60vw;
}

.dados dt {
  font-weight: 500;
  color: var(--bs-secondary-color);
}

.opcoes-checkbox .form-check-inline {
  margin-bottom: .25rem;
}

.tabela-matriz td:first-child {
  min-width: 180px;
}

.tabela-matriz .form-check-input {
  width: 1.25em;
  height: 1.25em;
}

/* No celular, a barra de salvar fica sempre visível no rodapé. */
@media (max-width: 575.98px) {
  .barra-acoes {
    position: sticky;
    bottom: 0;
    background: var(--bs-tertiary-bg);
    padding: .75rem 0;
    z-index: 10;
  }

  .barra-acoes .btn {
    flex: 1;
  }
}

/* Fotos (templates/estoque/_fotos.html) */
.foto-selo {
  position: absolute;
  top: .4rem;
  left: .4rem;
}

.foto-adicionar {
  cursor: pointer;
  border-style: dashed !important;
  background: var(--bs-tertiary-bg);
}

.foto-adicionar:hover,
.foto-adicionar:focus-within {
  border-color: var(--bs-primary) !important;
}

.recorte {
  position: relative;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background: #212529;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.recorte.arrastando {
  cursor: grabbing;
}

.recorte canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.miniatura {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
}

.miniatura img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ramos secundários: lista em colunas, com rolagem quando o catálogo é grande. */
.ramos-secundarios .opcoes-checkbox {
  columns: 2 16rem;
  max-height: 16rem;
  overflow-y: auto;
}

.ramos-secundarios .form-check-inline {
  display: block;
}

/* Foto da oferta: quadrada e contida (não ocupa a tela inteira no celular nem metade da página no desktop). */
.foto-oferta {
  max-width: 18rem;
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .foto-oferta {
    max-width: 14rem;
  }
}

/* Vouchers: QR Code do comprador e leitor da câmera do emissor */
.voucher-qr {
  max-width: 20rem;
  background: #fff;
  border-radius: .5rem;
  padding: .5rem;
}
.voucher-qr img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.voucher-icone {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.min-w-0 {
  min-width: 0;
}
.leitor-qr {
  position: relative;
  max-width: 28rem;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: .5rem;
  background: #000;
}
.leitor-qr video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.leitor-qr-mira {
  position: absolute;
  inset: 18%;
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: .75rem;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  pointer-events: none;
}

/* Foto de perfil (avatar): imagem redonda ou as iniciais do nome */
.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  font-weight: 600;
  font-size: .8rem;
  line-height: 1;
  user-select: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-lg {
  width: 6rem;
  height: 6rem;
  font-size: 1.75rem;
}
.avatar-md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: .95rem;
}
/* Recorte da foto de perfil: guia redonda (a imagem salva continua quadrada) */
.recorte-redondo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
  pointer-events: none;
}

.avatar-quadrado {
  border-radius: .5rem;
}
.avatar-xs {
  width: 1.25rem;
  height: 1.25rem;
  font-size: .55rem;
  border-radius: .25rem;
}
.voucher-icone {
  overflow: hidden;
}
.voucher-icone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
