/* ==========================================================================
   Malune Ateliê — editor de personalização
   Mobile-first: a maioria das clientes monta a caneca pelo celular.
   Cores herdadas da identidade visual (carmim #C51F3B, tinta #3A2226).
   ========================================================================== */

#malune-editor-personalizacao {
  margin: 22px 0 26px;
}

.malune-ed-painel {
  background: #fff;
  border: 1px solid #f0dfe2;
  border-radius: 16px;
  padding: 20px 16px 18px;
  box-shadow: 0 6px 22px rgba(58, 34, 38, 0.07);
  transition: border-color 0.2s ease;
}

.malune-ed-painel--aprovado {
  border-color: #2f8f4e;
  box-shadow: 0 6px 22px rgba(47, 143, 78, 0.14);
}

.malune-ed-titulo {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  color: #3a2226;
  line-height: 1.25;
}

.malune-ed-sub {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #7a5c60;
}

/* --- palco do canvas --- */
.malune-ed-palco {
  display: flex;
  justify-content: center;
  background: #faf6f5;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
}

.malune-ed-palco canvas {
  max-width: 100%;
  height: auto !important;
  border-radius: 8px;
  touch-action: none; /* o Fabric cuida do toque; sem isso a página rola ao arrastar */
}

.malune-ed-palco .canvas-container {
  max-width: 100%;
  height: auto !important;
}

/* --- botões --- */
.malune-ed-acoes {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.malune-ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  min-height: 46px; /* alvo de toque confortável */
  padding: 11px 16px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.malune-ed-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.malune-ed-btn--secundario {
  background: #fff;
  color: #c51f3b;
  border-color: #eccdd3;
}

.malune-ed-btn--secundario:hover {
  background: #fdf5f6;
}

.malune-ed-btn--principal {
  background: #c51f3b;
  color: #fff;
  box-shadow: 0 6px 18px rgba(197, 31, 59, 0.28);
}

.malune-ed-btn--principal:hover:not(:disabled) {
  background: #b01a34;
}

.malune-ed-btn--principal:disabled {
  background: #e4d3d6;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

.malune-ed-btn--remover {
  flex: 0 0 auto;
  background: #fff;
  color: #8a6a6f;
  border-color: #e8dcde;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 16px;
}

.malune-ed-btn--remover:hover {
  color: #c51f3b;
  border-color: #eccdd3;
}

/* --- controles do objeto selecionado --- */
.malune-ed-controles-obj {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #faf6f5;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.malune-ed-grupo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.malune-ed-select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #e8dcde;
  border-radius: 8px;
  background: #fff;
  color: #3a2226;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}

.malune-ed-cores {
  display: flex;
  gap: 6px;
}

.malune-ed-cor {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddc9cd;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}

.malune-ed-cor:hover {
  transform: scale(1.15);
}

/* --- aviso --- */
.malune-ed-aviso {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.malune-ed-aviso--erro {
  background: #fdecef;
  color: #9c1730;
  border: 1px solid #f5cdd4;
}

.malune-ed-aviso--ok {
  background: #eaf6ee;
  color: #1f6b39;
  border: 1px solid #c4e6d1;
}

/* --- rodapé --- */
.malune-ed-rodape {
  display: flex;
  gap: 10px;
}

/* --- desktop --- */
@media (min-width: 720px) {
  .malune-ed-painel {
    padding: 26px 24px 22px;
  }
  .malune-ed-titulo {
    font-size: 21px;
  }
  .malune-ed-acoes .malune-ed-btn {
    flex: 0 1 auto;
    min-width: 190px;
  }
  .malune-ed-rodape .malune-ed-btn {
    flex: 0 1 auto;
    min-width: 210px;
  }
}

/* --- efeitos na foto (IA e tratamento) --- */
.malune-ed-efeitos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.malune-ed-efeito {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 100px;
  border: 1.5px solid #eccdd3;
  background: #fff;
  color: #8a6a6f;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.malune-ed-efeito:hover:not(:disabled) {
  border-color: #c51f3b;
  color: #c51f3b;
}

.malune-ed-efeito--ligado {
  background: #c51f3b;
  border-color: #c51f3b;
  color: #fff;
}

.malune-ed-efeito:disabled {
  opacity: 0.55;
  cursor: wait;
}
