/* 🔵 Modal Overlay */
.gpv-modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpv-modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  top: 0;
  left: 0;
}

.gpv-modal-content {
  position: relative;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gpv-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

.gpv-close:hover {
  color: #000;
}

/* 🔵 Steps (Visibilidade) */
.gpv-step {
  display: none;
}

.gpv-step:not(.gpv-hidden) {
  display: block;
}

/* 🔵 Campos */
.gpv-modal-content input[type="text"],
.gpv-modal-content input[type="file"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.gpv-modal-content label {
  font-weight: bold;
  display: block;
  margin-top: 10px;
  color: #333;
}

/* 🔵 Botões */
.gpv-modal-content button {
  background-color: #0073aa;
  color: white;
  padding: 10px 18px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  margin-right: 8px;
  transition: background-color 0.2s;
}

.gpv-modal-content button:hover {
  background-color: #005a8c;
}

.gpv-modal-content button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* 🔵 Status Message */
#gpv-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  display: none;
}

#gpv-status.info {
  background: #e8f4fd;
  color: #2563eb;
}

#gpv-status.success {
  background: #dcfce7;
  color: #15803d;
}

#gpv-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

/* 🔵 Imagem de Resultado */
#gpv-result-preview {
  width: 100%;
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: none;
}

/* 🔵 Spinner */
.gpv-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* 🔵 Utility */
.gpv-hidden {
  display: none;
}

/* 🔵 Animação */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#gpv-result-iframe {
  width: 100%;
  height: 460px;
  display: none;
  border: none;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border-radius: 8px;
}

.gpv-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gpv-flex-row input {
  width: 48%;
}

@media (max-width: 600px) {
  .gpv-flex-row input {
    width: 100%;
  }
}

@media (max-width: 600px) {
  #gpv-result-preview {
    height: 65vh;
  }
}

.gpv-continue-center {
  width: 35%;
  margin: 20px auto 0;
  display: block;
  animation: fadeIn 0.4s ease;
}

.gpv-highlight {
  font-size: 16px;
  font-weight: 600;
  color: #0073aa;
  margin-bottom: 10px;
}

.gpv-waiting-feedback {
  text-align: center;
  font-size: 15px;
  color: #444;
  margin-top: 20px;
}

#gpv-add-to-cart-btn {
  background-color: #38a169;
  color: #fff;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin: 20px auto 0;
  display: block;
  transition: background-color 0.2s ease-in-out;
}

#gpv-add-to-cart-btn:hover {
  background-color: #2f855a;
}

.gpv-view-preview-cart {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.9em;
  padding: 4px 8px;
}

/* 🔵 Step 4 – Pós‐adição ao carrinho */
#gpv-step-4 {
  text-align: center;
  margin-top: 20px;
}

/* Botão principal: Prosseguir para checkout */
#gpv-go-to-checkout {
  width: 100%;
  background-color: #3182ce;  /* cor do checkout */
  color: #fff;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  margin-bottom: 1em;
  transition: background-color 0.2s;
}
#gpv-go-to-checkout:hover {
  background-color: #2b6cb0;
}

/* Container dos botões secundários (inline‐style já define flex/ gap) */
#gpv-step-4 > div {
  /* caso queira garantir o flex via CSS em vez de inline */
  display: flex !important;
  gap: 1em !important;
}

/* Botões secundários: gerar novamente / continuar comprando */
#gpv-generate-again,
#gpv-continue-shopping {
  flex: 1 1 50%;
  width: 100%;
  background-color: #718096;  /* cor secundária */
  color: #fff;
  padding: 10px;
  font-size: 15px;
  border-radius: 6px;
  transition: background-color 0.2s;
}
#gpv-generate-again:hover,
#gpv-continue-shopping:hover {
  background-color: #4a5568;
}

/* largura fixa para a coluna de Preview */
.gpv-preview-col {
  width: 100px;
  text-align: center;
}

#gpv-mock-stage{
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 1 / 1; /* chaveiro quadrado */
}
#gpv-mock-stage .mock-layer{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#gpv-mock-stage .mock-layer.shading{ pointer-events:none; mix-blend-mode:multiply; opacity:.85; }
