/* -------------------------------
   RESET E BASE
---------------------------------- */
:root {
  font-size: 1rem;
}

/* Fundo escuro semi-transparente */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1em; /* evita que o modal encoste nas bordas em telas pequenas */
}

/* Caixa do modal */
.modal {
  background: #ffffff;
  border-radius: 14px;
  padding: 2em 1.5em;
  max-width: 450px;
  width: 100%;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.3s ease-out;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Título do modal */
.modal h3 {
  margin-top: 0;
  font-size: 1.4em;
  color: #333;
}

/* Lista de instruções */
.modal ul {
  padding-left: 1.5em;
  margin: 1em 0;
  color: #555;
}

.modal li {
  margin-bottom: 0.6em;
  line-height: 1.4;
}

/* Área dos botões */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8em; /* espaço entre os botões */
  margin-top: 1.5em;
}

/* Botões */
.btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.4em;
  font-size: 1em;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background-color: #28a745;
  color: #fff;
}

.btn-primary:hover {
  background-color: #218838;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* Animação de fade-in do modal */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsividade em telas pequenas */
@media (max-width: 500px) {
  .modal {
    padding: 1.5em 1em;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.6em;
  }

  .btn {
    width: 100%;
  }
}


* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: #117044;
}

img {
  max-width: 100%;
  display: block;
}


/* -------------------------------
   LAYOUT E ESTRUTURA
---------------------------------- */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  flex: 1;
}

.container {
  padding-inline: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  width: 100%;
  flex: 1;
}

header, footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

header {
  padding: 1em;
  color: white;
  background: linear-gradient(163deg, rgba(17, 112, 68, 1) 0%, rgba(54, 150, 94, 1) 51%, rgba(113, 189, 140, 1) 98%);
}

footer {
  border-top: #ccc 2px solid;
  padding: 1em;
}


/* -------------------------------
   TIPOGRAFIA
---------------------------------- */
h2 {
  text-align: center;
  font-weight: 700;
}

#pixValor {
  font-size: 1.2rem;
  text-align: center;
}

.font-bold {
  font-weight: bold;
}


/* -------------------------------
   COMPONENTES - BOTÃO
---------------------------------- */
button, .btn-custom {
  padding: 1em 2em;
  font-size: 1em;
  background-color: #198754;
  color: white;
  border: none;
  border-radius: .5em;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  margin: .1em 0;
}


/* -------------------------------
   COMPONENTES - CÓDIGO PIX
---------------------------------- */
#codigo, .codigo-pix {
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 5px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#codigo {
  background: #eee;
}

.codigo-pix {
  padding: 10px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.codigo-pix.show {
  opacity: 1;
}


/* -------------------------------
   COMPONENTES - QR CODE
---------------------------------- */
#imagemQRCode {
  width: 381px;
  height: 381px;
  position: relative;
}

#imagemQRCode img {
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
}

.qrcode-img {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.qrcode-img.show {
  opacity: 1;
}


/* -------------------------------
   COMPONENTES - VALOR PIX
---------------------------------- */
#pixValorContent {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 20px;
  min-width: 50px;
  position: relative;
  font-size: 1.4em;
}

#valor {
  display: inline-block;
  font-weight: bold;
  min-width: 50px;
  min-height: 20px;
}

.valor-pix {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  font-weight: bold;
  z-index: 1;
}

.valor-pix.show {
  opacity: 1;
}


/* -------------------------------
   SKELETON LOADERS
---------------------------------- */
.skeleton-loader {
  width: 100%;
  height: 100%;
  background-color: #ddd;
  animation: pulse 1.5s infinite ease-in-out;
  border-radius: 8px;
}

@keyframes pulse {
  0% {
    background-color: #e0e0e0;
  }
  50% {
    background-color: #f0f0f0;
  }
  100% {
    background-color: #e0e0e0;
  }
}


/* -------------------------------
   ACESSIBILIDADE (SR-ONLY)
---------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* -------------------------------
   IFRAME (CASO USADO)
---------------------------------- */
.iframe-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.iframe-container iframe {
  width: 100%;
  height: 100%; /* ou auto, se quiser ajustar */
  border: 2px solid #ccc;
  border-radius: 8px;
  display: block;
}

.iframe-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.0);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  font-weight: bold;
  color: #000;
  text-align: center;
  pointer-events: all;
}


/* -------------------------------
   RESPONSIVIDADE
---------------------------------- */

@media screen and (max-width: 600px) {
  :root {
    font-size: 0.875rem;
  }
}

.container section {
    width: 100%;
    max-width: 600px;
    padding: 1em;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex: 1;
    justify-content: center;
}

.d-none {
    display: none !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-center {
  justify-content: center !important;
}

.align-items-center {
  align-items: center !important;
}

.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}
