/* ===== Motif Maker — integração visual com o site ===== */
#motif-maker {
  --accent: #12B3B6;
  --accent-light: #E4F9FA;
  --accent-dark: #0E8E90;
  --line: #dfe3e8;
  --text: #111;

  /* Radius system */
  --radius-ui: 10px;
  --radius-card: 16px;

  /* Sistema estrutural unificado */
  --btn-padding-y: 10px;
  --btn-padding-x: 20px;
  --ui-shadow: 0 3px 10px rgba(0,0,0,0.12);

  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  padding: 0 1rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
  box-sizing: border-box;
}

/* ===== Toggles ===== */
#motif-maker .mm-toggles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* ===== Toggle estilo alinhado com botões ===== */
#motif-maker .pill.toggle {
  --on-bg: #F5C84C;
  --off-bg: #f3f4f6;
  --on-color: #000;
  --off-color: #555;

  display: inline-flex;
  align-items: center;
  justify-content: space-between;

  border-radius: var(--radius-ui);
  padding: 3px;
  width: auto;
  border: none;

  background: var(--off-bg);
  cursor: pointer;

  transition: all 0.25s ease-in-out;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;

  box-shadow: var(--ui-shadow);
  position: relative;
  z-index: 1;
}

/* Labels pills */
#motif-maker .pill.toggle span {
  display: inline-block;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--radius-ui);
  font-size: 13px;
  position: relative;
  z-index: 2;
  transition: color 0.25s ease;
}

/* fundo móvel */
#motif-maker .pill.toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 50%;
  border-radius: var(--radius-ui);
  background: var(--on-bg);
  transition: transform 0.25s ease;
  z-index: 1;
}

/* destaque à esquerda */
#motif-maker .pill.toggle[aria-checked="true"]::before {
  transform: translateX(0%);
}

/* destaque à direita */
#motif-maker .pill.toggle[aria-checked="false"]::before {
  transform: translateX(100%);
}

#motif-maker .pill.toggle .on {
  color: var(--on-color);
}

#motif-maker .pill.toggle .off {
  color: var(--off-color);
}

/* ===== Botões principais (Gerar motivo + Play) ===== */
#motif-maker .mm-btn,
#motif-maker .mm-play,
#motif-maker .mm-audio-btn,
#motif-maker .mm-card button {

  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--radius-ui);

  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;

  cursor: pointer;
  transition: all 0.25s ease;
}

/* Botão principal mantém cores originais */
#motif-maker .mm-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  letter-spacing: 0.03em;

  box-shadow: 0 3px 10px rgba(18, 179, 182, 0.25);
}

#motif-maker .mm-btn:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botão Play / Reproduzir */
#motif-maker .mm-play,
#motif-maker .mm-audio-btn,
#motif-maker .mm-card button {
  box-shadow: var(--ui-shadow);
}

/* Hover coerente */
#motif-maker .mm-play:hover,
#motif-maker .mm-audio-btn:hover,
#motif-maker .mm-card button:hover {
  transform: translateY(-1px);
}

/* ===== Cartão da pauta ===== */
#motif-maker .mm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-top: 1.6rem;
}

#motif-maker .mm-card h3 {
  text-align: center;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#motif-maker .mm-canvas-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
}

#motif-maker canvas {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* ===== Responsivo ===== */
@media (max-width: 600px) {
  #motif-maker .mm-btn,
  #motif-maker .mm-play,
  #motif-maker .mm-audio-btn,
  #motif-maker .mm-card button {
    padding: 8px 14px;
    font-size: 14px;
  }

  #motif-maker .mm-card {
    padding: 16px;
  }

  #motif-maker .pill.toggle span {
    padding: 4px 10px;
    font-size: 12.5px;
  }
}
