/* ============================================================
   APP MENINAS V2 — COMPLEMENTOS DA CONFIGURAÇÃO DE PRÊMIOS
   Upload de imagem e acesso à versão impressa.
   ============================================================ */

.reward-image-editor {
  margin-top: 2px;
}

.reward-image-editor__layout {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 13px;
  align-items: center;
  padding: 11px;
  border: 2px dashed rgba(39, 135, 183, .42);
  border-radius: 7px;
  background: rgba(255, 255, 255, .58);
}

.reward-image-editor__preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 112px;
  margin: 0;
  overflow: hidden;
  border: 3px solid #318fc0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 0 rgba(43, 112, 151, .18);
}

.reward-image-editor__preview::after {
  content: "Sem imagem";
  display: none;
  color: #7f91a0;
  font-family: var(--font-playful);
  font-size: 13px;
  font-weight: 700;
}

.reward-image-editor__preview.is-empty::after {
  display: block;
}

.reward-image-editor__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.reward-image-editor__preview.is-empty img {
  display: none;
}

.reward-image-editor__controls {
  min-width: 0;
}

.reward-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 7px 14px;
  border: 3px solid #8f1a69;
  color: #ffffff;
  background: linear-gradient(180deg, #f253a8 0%, #d71e82 100%);
  box-shadow: 0 4px 0 #7d135c, 0 7px 10px rgba(92, 23, 74, .17);
  font-family: var(--font-playful);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  cursor: pointer;
}

.reward-upload-button:hover {
  filter: brightness(1.05);
}

.reward-upload-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #7d135c;
}

.reward-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.is-uploading-reward .reward-upload-button {
  opacity: .62;
  cursor: wait;
}

.reward-upload-help,
.reward-upload-status {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.25;
}

.reward-upload-help {
  color: #607584;
}

.reward-upload-status {
  min-height: 16px;
  color: #256f94;
  font-weight: 700;
}

.reward-upload-status[data-type="success"] {
  color: #207947;
}

.reward-upload-status[data-type="error"] {
  color: #b41d53;
}

.reward-upload-status[data-type="loading"] {
  color: #8a2873;
}

.config-reward-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.config-reward-actions .comic-save-button {
  margin: 0;
}

.comic-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 42px;
  padding: 7px 17px;
  border: 3px solid #3c2e92;
  color: #ffffff;
  background: linear-gradient(180deg, #7866de 0%, #5945bd 100%);
  box-shadow: 0 4px 0 #3c2e92, 0 7px 10px rgba(72, 50, 130, .18);
  font-family: var(--font-playful);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
}

.comic-print-button:hover {
  filter: brightness(1.06);
}

.comic-print-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #3c2e92;
}

@media (max-width: 520px) {
  .reward-image-editor__layout {
    grid-template-columns: 1fr;
  }

  .reward-image-editor__preview {
    width: 100%;
    max-width: 230px;
    height: 150px;
    margin: 0 auto;
  }

  .reward-image-editor__controls {
    text-align: center;
  }

  .config-reward-actions {
    flex-direction: column;
    align-items: center;
  }

  .config-reward-actions .comic-save-button,
  .comic-print-button {
    width: min(100%, 270px);
  }
}
